Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pcm: Add MSBITS subformat options #342

Conversation

crojewsk-intel
Copy link
Contributor

@crojewsk-intel crojewsk-intel commented Aug 4, 2023

Improve granularity of format selection for S32/U32 formats by adding masks representing 20, 24 and 32 most significant bits. As a preparation step introduce snd_pcm_subformat_value() for easy name-to-subformat conversions.

While at it, fix few warnings that pop up in subformat-related code during compilation.

Allow userspace applications to select subformats easily just like in
snd_pcm_format_t case - by string conversion.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
@crojewsk-intel
Copy link
Contributor Author

Related alsa-utils PR: aplay: Add option for specifying subformat.

@crojewsk-intel
Copy link
Contributor Author

crojewsk-intel commented Aug 4, 2023

This will be paired with relevant kernel updates, posting as RFC for now. Will link the alsa-devel thread once the patchset is there.

The patchset ALSA/ASoC: hda: Address format selection limitations and ambiguity has been posted on alsa-devel.

@crojewsk-intel crojewsk-intel changed the title [RFC] pcm: Add MSBITS_20 and MSBITS_24 subformat options [RFC] pcm: Add MSBITS subformat options Aug 11, 2023
@crojewsk-intel
Copy link
Contributor Author

Changes in v2:

  • added MSBITS_32 so that 32/32 is possible

Improve granularity of format selection for S32/U32 formats by adding
masks representing 20, 24 and 32 most significant bits.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Update snd_pcm_subformat_t getters and setters so they no longer throw
warnings when building.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
@crojewsk-intel
Copy link
Contributor Author

Bumping the subject.

Dropping [RFC] as the kernel series [PATCH v5 00/16] ALSA/ASoC: hda: Address format selection limitations and ambiguity has been merged into Takashi's for-next.

@crojewsk-intel crojewsk-intel changed the title [RFC] pcm: Add MSBITS subformat options pcm: Add MSBITS subformat options Dec 6, 2023
@perexg perexg closed this in f33284e Dec 8, 2023
perexg pushed a commit that referenced this pull request Dec 8, 2023
Improve granularity of format selection for S32/U32 formats by adding
masks representing 20, 24 and 32 most significant bits.

Closes: #342
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Dec 8, 2023
Update snd_pcm_subformat_t getters and setters so they no longer throw
warnings when building.

Closes: #342
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant