alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* wm8776_dai vs. cs4270_dai
@ 2010-07-08 22:59 Timur Tabi
  2010-07-08 23:49 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2010-07-08 22:59 UTC (permalink / raw)
  To: Mark Brown, ALSA development

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: wm8776_dai vs. cs4270_dai
  2010-07-08 22:59 wm8776_dai vs. cs4270_dai Timur Tabi
@ 2010-07-08 23:49 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2010-07-08 23:49 UTC (permalink / raw)
  To: Timur Tabi; +Cc: ALSA development

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-08 23:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-08 22:59 wm8776_dai vs. cs4270_dai Timur Tabi
2010-07-08 23:49 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).