- 追加された行はこの色です。
- 削除された行はこの色です。
*参照元 [#wb4be31e]
#backlinks
*説明 [#xba1b1fd]
-パス: [[linux-4.4.1/include/sound/soc-dai.h]]
-FIXME: これは何?
--説明
**参考 [#c817f9c7]
**参考: private_data について [#o59f0f56]
-取得: snd_soc_dai_get_drvdata()
--内部の struct device *dev のプライベートデータを返すだけ。
-設定: なし
--強いて言うなら dev_set_drvdata() か?
--ドライバが snd_soc_register_component() に渡した struct device * が使われる。
snd_soc_register_component()
-> snd_soc_component_initialize()
引数に渡した struct device * が、
struct snd_soc_component の struct device *dev にコピーされる。
-> snd_soc_register_dais()
struct snd_soc_component の dev が、
struct snd_soc_dai の struct device *dev にコピーされる。
-リンク
--[[linux-4.4.1/snd_soc_dai_get_drvdata()]]
--[[linux-4.4.1/device]]
--[[linux-4.4.1/dev_set_drvdata()]]
--[[linux-4.4.1/snd_soc_register_component()]]
--[[linux-4.4.1/snd_soc_component_initialize()]]
--[[linux-4.4.1/snd_soc_register_dais()]]
--[[linux-4.4.1/snd_soc_component]]
--[[linux-4.4.1/snd_soc_dai]]
--[[linux-4.4.1/device]]
*実装 [#m5bc7c0c]
/*
* Digital Audio Interface runtime data.
*
* Holds runtime data for a DAI.
*/
struct snd_soc_dai {
const char *name;
int id;
struct device *dev;
-
--[[linux-4.4.1/device]]
/* driver ops */
struct snd_soc_dai_driver *driver;
-
--[[linux-4.4.1/snd_soc_dai_driver]]
/* DAI runtime info */
unsigned int capture_active:1; /* stream is in use */
unsigned int playback_active:1; /* stream is in use */
unsigned int symmetric_rates:1;
unsigned int symmetric_channels:1;
unsigned int symmetric_samplebits:1;
unsigned int active;
unsigned char probed:1;
struct snd_soc_dapm_widget *playback_widget;
struct snd_soc_dapm_widget *capture_widget;
-
--[[linux-4.4.1/snd_soc_dapm_widget]]
/* DAI DMA data */
void *playback_dma_data;
void *capture_dma_data;
/* Symmetry data - only valid if symmetry is being enforced */
unsigned int rate;
unsigned int channels;
unsigned int sample_bits;
/* parent platform/codec */
struct snd_soc_codec *codec;
struct snd_soc_component *component;
-
--[[linux-4.4.1/snd_soc_codec]]
--[[linux-4.4.1/snd_soc_component]]
/* CODEC TDM slot masks and params (for fixup) */
unsigned int tx_mask;
unsigned int rx_mask;
struct list_head list;
-
--[[linux-4.4.1/list_head]]
};
*コメント [#r930f736]