[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0aa1cff-33c9-a44d-b17b-d2e4e42d60f1@linux.intel.com>
Date: Wed, 8 Jul 2020 11:58:21 -0500
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
broonie@...nel.org
Cc: alsa-devel@...a-project.org, ckeepax@...nsource.cirrus.com,
lgirdwood@...il.com, linux-kernel@...r.kernel.org, tiwai@...e.com,
vkoul@...nel.org
Subject: Re: [PATCH 10/11] ASoC: qdsp6-dai: add gapless support
>> right, but the key point is 'switch between streams'. That means a
>> more complex/capable implementation that should be advertised as such
>> to applications. This is not the default behavior assumed initially:
>> to allow for minimal implementations in memory-constrained devices, we
>> assumed gapless was supported with a single decoder.
>>
>> Maybe the right way to do this is extend the snd_compr_caps structure:
>>
>> /**
>> * struct snd_compr_caps - caps descriptor
>> * @codecs: pointer to array of codecs
>> * @direction: direction supported. Of type snd_compr_direction
>> * @min_fragment_size: minimum fragment supported by DSP
>> * @max_fragment_size: maximum fragment supported by DSP
>> * @min_fragments: min fragments supported by DSP
>> * @max_fragments: max fragments supported by DSP
>> * @num_codecs: number of codecs supported
>> * @reserved: reserved field
>> */
>> struct snd_compr_caps {
>> __u32 num_codecs;
>> __u32 direction;
>> __u32 min_fragment_size;
>> __u32 max_fragment_size;
>> __u32 min_fragments;
>> __u32 max_fragments;
>> __u32 codecs[MAX_NUM_CODECS];
>> __u32 reserved[11];
>> } __attribute__((packed, aligned(4)));
>>
>>
>> and use a reserved field to provide info on capabilities, and filter
>> the set_codec_params() addition based this capability - i.e. return
>> -ENOTSUP in 'traditional' implementations based on a single
>> 'stream'/decoder instance.
I think this is also what Mark was referring to earlier.
> Sounds good!
> I will give it a go and see how it ends up!
Glad to see this discussion progressing.
We may also want to document the 3 possible ways of supporting gapless
playback while we are at it:
a) with the existing single decoder assumption
b) with your suggested solution with a switch at the DSP level
c) with 2 streams at the userspace level and a switch/x-fade at the DSP
level - which may simplify userspace quite a bit and was the initial
design in a non-Linux OS.
Powered by blists - more mailing lists