[PATCH v2 8/9] ASoC: qdsp6-dai: add gapless support
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Wed Jul 22 17:31:54 CEST 2020
>>> @@ -917,6 +1018,14 @@ static int q6asm_dai_compr_trigger(struct
>>> snd_soc_component *component,
>>> ret = q6asm_cmd_nowait(prtd->audio_client, prtd->stream_id,
>>> CMD_PAUSE);
>>> break;
>>> + case SND_COMPR_TRIGGER_NEXT_TRACK:
>>> + prtd->next_track = true;
>>> + prtd->next_track_stream_id = (prtd->stream_id == 1 ? 2 : 1);
>>
>> it's rather odd, the initialization above uses next_track_stream_id = 0?
>
> Vaild stream ids start from 1, So we are toggling this between 1 and 2.
> So when we set next_track_stream_id to 0, that means we have opened the
> new next stream id and is set to prtd->stream_id. This logic is to
> ensure that we are not going to open next stream id twice!
ok, adding a comment would be good to show this was intentional and not
a mistake.
More information about the Alsa-devel
mailing list