ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2014年8月18日 星期一

/* SoC machine DAI configuration, glues a codec and cpu DAI together */
struct snd_soc_pcm_runtime {
 struct device *dev;
 struct snd_soc_card *card;
 struct snd_soc_dai_link *dai_link;
 struct mutex pcm_mutex;
 enum snd_soc_pcm_subclass pcm_subclass;
 struct snd_pcm_ops ops;

 unsigned int dev_registered:1;

 /* Dynamic PCM BE runtime data */
 struct snd_soc_dpcm_runtime dpcm[2];

 long pmdown_time;
 unsigned char pop_wait:1;

 /* runtime devices */
 struct snd_pcm *pcm;
 struct snd_compr *compr;
 struct snd_soc_codec *codec;
 struct snd_soc_platform *platform;
 struct snd_soc_dai *codec_dai;
 struct snd_soc_dai *cpu_dai;

 struct delayed_work delayed_work;
#ifdef CONFIG_DEBUG_FS
 struct dentry *debugfs_dpcm_root;
 struct dentry *debugfs_dpcm_state;
#endif
};
還有 soc_soc_dai_link:
struct snd_soc_dai_link {
 /* config - must be set by machine driver */
 const char *name;   /* Codec name */
 const char *stream_name;  /* Stream name */
 /*
  * You MAY specify the link's CPU-side device, either by device name,
  * or by DT/OF node, but not both. If this information is omitted,
  * the CPU-side DAI is matched using .cpu_dai_name only, which hence
  * must be globally unique. These fields are currently typically used
  * only for codec to codec links, or systems using device tree.
  */
 const char *cpu_name;
 const struct device_node *cpu_of_node;
 /*
  * You MAY specify the DAI name of the CPU DAI. If this information is
  * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
  * only, which only works well when that device exposes a single DAI.
  */
 const char *cpu_dai_name;
 /*
  * You MUST specify the link's codec, either by device name, or by
  * DT/OF node, but not both.
  */
 const char *codec_name;
 const struct device_node *codec_of_node;
 /* You MUST specify the DAI name within the codec */
 const char *codec_dai_name;
 /*
  * You MAY specify the link's platform/PCM/DMA driver, either by
  * device name, or by DT/OF node, but not both. Some forms of link
  * do not need a platform.
  */
 const char *platform_name;
 const struct device_node *platform_of_node;
 int be_id; /* optional ID for machine driver BE identification */

 const struct snd_soc_pcm_stream *params;

 unsigned int dai_fmt;           /* format to set on init */

 enum snd_soc_dpcm_trigger trigger[2]; /* trigger type for DPCM */

 /* Keep DAI active over suspend */
 unsigned int ignore_suspend:1;

 /* Symmetry requirements */
 unsigned int symmetric_rates:1;

 /* Do not create a PCM for this DAI link (Backend link) */
 unsigned int no_pcm:1;

 /* This DAI link can route to other DAI links at runtime (Frontend)*/
 unsigned int dynamic:1;

 /* pmdown_time is ignored at stop */
 unsigned int ignore_pmdown_time:1;

 /* codec/machine specific init - e.g. add machine controls */
 int (*init)(struct snd_soc_pcm_runtime *rtd);

 /* optional hw_params re-writing for BE and FE sync */
 int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
   struct snd_pcm_hw_params *params);

 /* machine stream operations */
 const struct snd_soc_ops *ops;
 const struct snd_soc_compr_ops *compr_ops;
};

沒有留言:

標籤

網誌存檔