[alsa-devel] [RFC] ASoC: core: Add support for DAI multicodec

Mark Brown broonie at kernel.org
Wed Mar 12 23:51:25 CET 2014

On Tue, Mar 11, 2014 at 12:17:24PM +0100, Benoit Cousson wrote:

> +struct snd_soc_dai_link_codec {
> +	const char *codec_name;
> +	const struct device_node *codec_of_node;
> +	const char *codec_dai_name;
> +
> +	struct snd_soc_codec *codec;
> +	struct snd_soc_dai *codec_dai;
> +
> +	int (*hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
> +			       struct snd_pcm_hw_params *params);
> +	struct snd_pcm_hw_params hw_params;
> +};

The implementation looks basically fine, it's possible there's something
nasty in there but the patch is rather large and not quite repetitive
enough.  Most of the interface seems good - I'm not super thrilled with
having the separate CODECs list but equally well the idea of updating
all the machine drivers isn't super awesome either and should be punted
for a cleanup run later.

I would like to see something nicer for the fixup though - I think we
can avoid doing it if we use the TDM API to specify the slots that are
in use by a CODEC.  Xiubo has done some nice work there recently which
is handy.  Instead of having a fixup function if we specified a TDM
and channel map configuration then the core core could override the
params so that the channel count was clamped by how many channels are
actually being sent to the device - so if there's two TDM slots active
the device would be told to play stereo.  Would that work for your use
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140312/895c7641/attachment.sig>

More information about the Alsa-devel mailing list