[alsa-devel] [PATCH] [v2] ASoC: support all possible sample rates in the WM8776 driver

Timur Tabi timur at freescale.com
Fri Sep 16 18:54:02 CEST 2011


Mark Brown wrote:
>> > But how is the machine driver supposed to know what those sample rates
>> > are?  It would need to know how which dividers that codec uses.  That
>> > would mean that the machine driver has to be hard-codec with
>> > information on the internals of the codec.

> You'd have to look at the CODEC datasheet and figure out what it's
> capable of given the clocks you're able to give it.  Depending on the
> flexibility you've got and power you're willing to spend there may be no
> need to do anything as you may be able to generate any clocks the device
> may need (for example with devices that have FLLs).

Well, my point was that this introduces a lot of information that's specific to
the internals of the codec into the machine driver.  Today, the only thing the
machine driver needs to know is the name of the DAIs:

	mdata->dai[0].codec_dai_name = "wm8776-hifi-playback";
	mdata->dai[1].codec_dai_name = "wm8776-hifi-capture";

and it might even be possible to avoid this.

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the Alsa-devel mailing list