From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
broonie@kernel.org
Cc: alsa-devel@alsa-project.org, ckeepax@opensource.cirrus.com,
tiwai@suse.com, lgirdwood@gmail.com,
linux-kernel@vger.kernel.org, vkoul@kernel.org
Subject: Re: [RFC PATCH v2 6/6] ASoC: q6asm-dai: add support to set_codec_params
Date: Wed, 22 Jul 2020 09:59:51 +0100 [thread overview]
Message-ID: <13cb597d-996a-1772-e3db-ffece4a70fb8@linaro.org> (raw)
In-Reply-To: <970e7065-4731-e553-f07f-896aaa57c5dc@linux.intel.com>
Thanks Pierre for quick review.
On 21/07/2020 21:09, Pierre-Louis Bossart wrote:
>
>
> On 7/21/20 12:00 PM, Srinivas Kandagatla wrote:
>> Make use of new set_codec_params callback to allow decoder switching
>> during gapless playback.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.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");
>> + return ret;
>> + }
>> +
>> + ret = __q6asm_dai_compr_set_codec_params(component, stream, codec,
>> + prtd->next_track_stream_id);
>> + if (ret < 0) {
>> + pr_err("q6asm_open_write failed\n");
>> + return ret;
>> + }
>> +
>> + ret = q6asm_stream_remove_initial_silence(prtd->audio_client,
>> + prtd->next_track_stream_id,
>> + prtd->initial_samples_drop);
>> + prtd->next_track_stream_id = 0;
>
> same comment as in the other patchset, the stream_id toggles between 1
> and 2, it's not clear to me what 0 means.
Valid stream ids start from 1. to achieve gapless we toggle between 1 and 2.
--srini
>
> off-by-one bug or feature?
next prev parent reply other threads:[~2020-07-22 8:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 17:00 [RFC PATCH v2 0/6] ALSA: compress: add support to change codec profile in gapless playback Srinivas Kandagatla
2020-07-21 17:00 ` [RFC PATCH v2 1/6] ALSA: compress: move codec parameter check to a function Srinivas Kandagatla
2020-07-21 19:56 ` Pierre-Louis Bossart
2020-07-21 17:00 ` [RFC PATCH v2 2/6] ALSA: compress: add new ioctl for setting codec parameters Srinivas Kandagatla
2020-07-21 20:05 ` Pierre-Louis Bossart
2020-07-22 8:59 ` Srinivas Kandagatla
2020-07-22 15:36 ` Pierre-Louis Bossart
2020-07-23 4:47 ` Vinod Koul
2020-07-23 13:17 ` Pierre-Louis Bossart
2020-07-21 17:00 ` [RFC PATCH v2 3/6] ALSA: compress: add flags to snd_compr_caps to expose dsp caps Srinivas Kandagatla
2020-07-21 17:00 ` [RFC PATCH v2 4/6] ASoC: compress: add snd_soc_dai_compr_set_codec_params() Srinivas Kandagatla
2020-07-21 17:00 ` [RFC PATCH v2 5/6] ALSA: compress: bump the version Srinivas Kandagatla
2020-07-21 17:00 ` [RFC PATCH v2 6/6] ASoC: q6asm-dai: add support to set_codec_params Srinivas Kandagatla
2020-07-21 20:09 ` Pierre-Louis Bossart
2020-07-22 8:59 ` Srinivas Kandagatla [this message]
2020-07-22 14:04 ` Daniel Baluta
2020-07-23 12:38 ` [RFC PATCH v2 0/6] ALSA: compress: add support to change codec profile in gapless playback Takashi Iwai
2020-07-23 13:05 ` Vinod Koul
2020-07-23 13:17 ` Takashi Iwai
2020-07-23 15:56 ` Vinod Koul
2020-07-23 20:33 ` Takashi Iwai
2020-08-06 11:08 ` Vinod Koul
2020-08-06 16:28 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13cb597d-996a-1772-e3db-ffece4a70fb8@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox