Re: [RFC PATCH] ALSA: pcm: Introduce MSBITS subformat API extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18. 09. 23 15:55, Cezary Rojewski wrote:

+    if (!runtime->subformat_constraint) {

I'd try to avoid another special-bit in the runtime space. But I might
be wrong here and it's unavoidable. Let me ask though, why cannot we do
the constraint unconditionally?

This is for a special case when the drivers do not set
snd_pcm_hw_constraint_subformats (all current drivers). In this case,
the default is to handle STD and MAX subformat bits.

This constraint should be applied only one time. So this prevents to
install it twice.

I believe we could avoid special-case approach. Have a copy/intersection
helpers in place and utilize iterations-with-sentinel-entry. Provided
such in v2 of my series.

I don't think that it's required to carry the format->subformat map in struct snd_pcm_hardware. Only few drivers will use it, so the separate constraint is fine. Also, you can remove a lot of your added code to the pcm_misc and ASoC core (copy, masking, allocating) when the affected drivers install the map using the constraint call.

Few points:

1) PCM API interface changes should be separate, you mixing unused helpers and separating vital functionality for drivers

2) if you copy 90% of my code, I don't think that Suggested-by: tag is fine

Could you do your work on top of my patch?

					Jaroslav

--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux