[alsa-devel] wm8776_dai vs. cs4270_dai
Mark,
In wm8776.c, the DAI structure is defined as an array of two elements, one for playback and one for capture:
struct snd_soc_dai_driver wm8776_dai[] = { { .name = "WM8776 Playback", .playback = { .stream_name = "Playback", .channels_min = 2, .channels_max = 2, .rates = WM8776_RATES, .formats = WM8776_FORMATS, }, .ops = &wm8776_dac_ops, }, { .name = "WM8776 Capture", .capture = { .stream_name = "Capture", .channels_min = 2, .channels_max = 2, .rates = WM8776_RATES, .formats = WM8776_FORMATS, }, .ops = &wm8776_adc_ops, }, };
In my CS4270 driver, I have these combined into one structure:
struct snd_soc_dai_driver cs4270_dai = { .name = "cs4270", .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_CONTINUOUS, .rate_min = 4000, .rate_max = 216000, .formats = CS4270_FORMATS, }, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_CONTINUOUS, .rate_min = 4000, .rate_max = 216000, .formats = CS4270_FORMATS, }, .ops = &cs4270_dai_ops, };
Should the CS4270 driver be changed to use two structures?
On Thu, Jul 08, 2010 at 05:59:44PM -0500, Timur Tabi wrote:
Should the CS4270 driver be changed to use two structures?
Depends on the hardware and how you feel. In WM8776 there is little visible connection in the digital domain between the DAC and ADC sections of the device, even the MCLKs can be separate, which is why I decided to split the DAIs. If the same is true for the CS4270 then it might be worth thinking about, but if they are more interconnected then it doesn't make sense to do this.
participants (2)
-
Mark Brown
-
Timur Tabi