[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEnQRZA6Y99znD3ZtpuGhc+i-WVDtUW-jP1sF3MTg289S_Mr_g@mail.gmail.com>
Date: Wed, 22 Jul 2020 17:04:30 +0300
From: Daniel Baluta <daniel.baluta@...il.com>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc: Mark Brown <broonie@...nel.org>,
Linux-ALSA <alsa-devel@...a-project.org>,
ckeepax@...nsource.cirrus.com, Takashi Iwai <tiwai@...e.com>,
Liam Girdwood <lgirdwood@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Vinod Koul <vkoul@...nel.org>
Subject: Re: [RFC PATCH v2 6/6] ASoC: q6asm-dai: add support to set_codec_params
On Tue, Jul 21, 2020 at 8:03 PM Srinivas Kandagatla
<srinivas.kandagatla@...aro.org> wrote:
>
> Make use of new set_codec_params callback to allow decoder switching
> during gapless playback.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> ---
> sound/soc/qcom/qdsp6/q6asm-dai.c | 33 ++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
> index b5c719682919..a8cfb1996614 100644
> --- a/sound/soc/qcom/qdsp6/q6asm-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
> @@ -876,6 +876,37 @@ static int __q6asm_dai_compr_set_codec_params(struct snd_soc_component *componen
> return 0;
> }
>
> +static int q6asm_dai_compr_set_codec_params(struct snd_soc_component *component,
> + struct snd_compr_stream *stream,
> + struct snd_codec *codec)
> +{
> + struct snd_compr_runtime *runtime = stream->runtime;
> + struct q6asm_dai_rtd *prtd = runtime->private_data;
> + int ret;
> +
> + ret = q6asm_open_write(prtd->audio_client, prtd->next_track_stream_id,
> + codec->id, codec->profile, prtd->bits_per_sample,
> + true);
> + if (ret < 0) {
> + pr_err("q6asm_open_write failed\n");
Since you have component->dev here I think it is worth it to use
dev_err instead of pr_err.
Same for the rest of the code.
Powered by blists - more mailing lists