没有合适的资源?快使用搜索试试~ 我知道了~
首页mt_soc_snd_init.pdf
mt_soc_snd_init.pdf
需积分: 20 214 浏览量
更新于2023-05-25
评论 1
收藏 35KB PDF 举报
mt_soc_snd_init 结构体图
资源详情
资源评论
资源推荐

1 / 1
snd_soc_card
指针赋值给driver_data
+rtd是个数组,数组大小等
于dai_link大小
snd_kcontrol
通过snd_ctl_new1
创建snd_kcontrol_new
snd_soc_dai_link
+
+
+
+
+
+
+
+
+
+
+
const char *name
const char *cpu_name
const char *cpu_dai_name
const char *codec_name
const char *codec_dai_name
struct snd_soc_dai_link_component *
codecs
const struct snd_soc_pcm_stream *params
const struct snd_soc_ops *ops;
const char *platform_name
struct device_node *cpu_of_node
struct device_node *codec_of_node
: char
: int
: int
: int
: int
: snd_soc_dai_link_component
: int
: int
: int
: int
: int
snd_soc_pcm_stream
+
+
+
+
+
+
const char *stream_name
unsigned int rates
unsigned int rate_min
unsigned int rate_max
unsigned int channels_min
unsigned int channels_max
:
:
:
:
:
:
snd_pcm_substream
+
+
+
+
+
+
+
+
+
struct snd_pcm *pcm
struct snd_pcm_str *pstr
void *private_data
char name[32]
int stream
const struct snd_pcm_ops *ops
struct snd_pcm_runtime *runtime
struct snd_pcm_substream *next;
struct list_head link_list
:
:
:
:
:
:
:
:
:
snd_soc_pcm_runtime
+
+
+
+
+
+
+
+
+
+
+
struct device *dev
struct snd_soc_card *card;
struct snd_pcm_ops ops;
struct snd_pcm *pcm;
struct snd_soc_dai_link *dai_link
struct snd_soc_codec *codec;
struct snd_soc_platform *platform
struct snd_soc_dai *codec_dai
struct snd_soc_dai *cpu_dai
struct snd_soc_component *component
struct snd_soc_dai **codec_dais
snd_card
+
+
+
+
+
+
char id[16]
char driver[16]
struct list_head devices
struct device ctl_dev
struct list_head controls
struct device *dev
:
:
:
:
:
:
+ void *private_data ()
snd_soc_card
+
+
+
+
+
+
+
const char *name
const char *driver_name;
struct device *dev
struct snd_card *snd_card
struct snd_soc_dai_link *dai_link
struct snd_soc_pcm_runtime *rtd
const struct snd_kcontrol_new *controls
:
:
:
:
:
:
:
+ int (*probe)(struct snd_soc_card *card)
()
mt_soc_snd_init
device
+
+
+
+
+
struct device *parent;
struct device_driver *driver
void *platform_data
void *driver_data
const struct device_type *type
:
:
:
:
:
+dai_link 数组
snd_soc_dai_link_component
+
+
+
const char *name
struct device_node *of_node
const char *dai_name
:
:
:
mt_snd_soc_card_mt 填充
snd_soc_dai
+
+
+
+
+
-
const char *name
struct device *dev
struct snd_soc_dai_driver *driver
struct snd_soc_codec *codec;
struct snd_soc_component *component
struct list_head list
:
:
:
:
:
:
snd_soc_platform
+
+
+
+
struct device *dev;
const struct snd_soc_platform_driver *
driver
struct list_head list
structsnd_soc_component component
:
:
:
:
snd_soc_codec
+
+
+
+
+
struct device *dev
const struct snd_soc_codec_driver *
driver;
struct list_head list;
struct list_head card_list;
struct snd_soc_component component
:
:
:
:
:
通过soc_bind_dai_link 绑定对应的cpu_dai
code_dai codec platform
+codec
+platform
+code_dai/cpu_dai
snd_pcm
+
+
+
+
struct snd_card *card;
struct list_head list;
struct snd_pcm_str streams[2]
void *private_data
:
:
:
:
snd_pcm_str
+
+
+
+
+
+
+
int stream
struct snd_pcm *pcm
unsigned int substream_count
struct snd_pcm_substream *substream
unsigned int substream_opened;
struct device dev
struct snd_kcontrol *chmap_kctl
:
:
:
:
:
:
:
snd_pcm_ops
+
+
+
+
+
+
int (*open)(struct snd_pcm_substream *
substream) ()
int (*close)(struct snd_pcm_substream *
substream); ()
int (*hw_params)(struct snd_pcm_
substream *substream,
struct snd_
pcm_hw_params *params) ()
int (*hw_free)(struct snd_pcm_
substream *substream) ()
int (*ioctl)(struct snd_pcm_substream *
substream,
unsigned int cmd,
void *arg); ()
snd_pcm_uframes_t (*pointer)(struct snd_
pcm_substream *substream) ()
+ops
+pcm
snd_kcontrol_new
+
+
+
+
+
+
+
snd_ctl_elem_iface_t iface
unsigned int device;
unsigned int subdevice
const unsigned char *name
snd_kcontrol_info_t
snd_kcontrol_get_t
snd_kcontrol_put_t
:
:
:
:
:
:
:
snd_kcontrol
+
+
+
+
+
struct list_head list
struct snd_ctl_elem_id id;
unsigned int count;
snd_kcontrol_get_t *get
snd_kcontrol_put_t *put
:
:
:
:
:
+snd_card

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0