[alsa-devel] [PATCH] ASoC: codecs: Replace instances of rtd->codec with dai->codec
Jyri Sarha
jsarha at ti.com
Fri Mar 14 11:15:20 CET 2014
On 03/13/2014 10:24 PM, Lars-Peter Clausen wrote:
> With CODEC to CODEC links rtd->codec does not necessarily point to the driver's
> CODEC. CODEC drivers should always use dai->codec and never even look at the PCM
> runtime.
>
> Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
> ---
[...]
> diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
> index d3517a9..cc1c9c2 100644
> --- a/sound/soc/codecs/tlv320aic31xx.c
> +++ b/sound/soc/codecs/tlv320aic31xx.c
> @@ -753,10 +753,9 @@ static int aic31xx_setup_pll(struct snd_soc_codec *codec,
>
> static int aic31xx_hw_params(struct snd_pcm_substream *substream,
> struct snd_pcm_hw_params *params,
> - struct snd_soc_dai *tmp)
> + struct snd_soc_dai *dai)
> {
> - struct snd_soc_pcm_runtime *rtd = substream->private_data;
> - struct snd_soc_codec *codec = rtd->codec;
> + struct snd_soc_codec *codec = dai->codec;
> u8 data = 0;
>
> dev_dbg(codec->dev, "## %s: format %d width %d rate %d\n",
[...]
Concerning the part above.
Acked-by: Jyri Sarha <jsarha at ti.com>
Best regards,
Jyri
More information about the Alsa-devel
mailing list