[alsa-devel] [TINYCOMPRESS][PATCH 1/1] compress: no need to set metadata before calling next_track
pierre-louis.bossart at linux.intel.com
Mon Mar 3 15:57:10 CET 2014
> Any format, or any use-case, where we don't need to send metadata. I said "other formats do not
> _necessarily_ require any additional metadata". I'm not saying that _no_ other format needs metadata,
> just that it's not something that's always going to be mandatory. Also you shouldn't think only in
> terms of gapless play, you can chain track together for other reasons than gapless (for example to
> make best use of the DSP buffering and allow maximum host sleep time across multiple tracs) and still
> want to be able to do partial drains to know when the DSP starts decoding the next track.
My point was that it's way simpler to use regular playback if you don't
need the gapless functionality. I don't buy the argument on power
savings either, if the transition lasts 500ms with 3mn tracks, we are
talking about optimizing a state that represents 0.27% of the AP activity.
> Also there's no reason why the kernel should be enforcing this restriction - the core ALSA state
> machine doesn't need the metadata so it should be left to the DSP driver and/or firmware to decide
> whether metadata is mandatory in the current situation.
The problem is that you removed checks at the kernel and tinycompress
levels, essentially moving error management to the HAL and firmware. I
would agree to the change at the kernel level but it makes sense to have
a common approach in tinycompress to make the integration work lighter.
If you truly want to be generic we should provide information at the
codec level on whether gapless is supported and if there is a need for
metadata - e.g. reclaim a reserved field from snd_codec_desc in
compress_params.h, and do the check only if needed.
More information about the Alsa-devel