src: utils: Add ccaps to query compress device capabilities - #39
Open
ujfalusi wants to merge 1 commit into
Open
Conversation
Add a small utility to dump the capabilities of a compress device.
It uses the same device selection style as cplay (-c card, -d device)
and prints the protocol version, direction, fragment size/count limits
and the list of supported codecs.
For each codec the SNDRV_COMPRESS_GET_CODEC_CAPS descriptors are
printed as well. Drivers not implementing the codec caps ioctl are
reported instead of treated as an error.
The direction is derived from the open flags by the core, so by default
the device is opened for playback first and for capture as fallback.
It can be forced with -D p|c.
Example output:
$ ccaps -c0 -d50
Compress device hw:0,50
protocol version: 0.4.1
direction: playback
fragment size: 38400 - 131072 bytes
fragments: 3 - 64
codecs: 4
[0] AAC (0x6)
[1] MP3 (0x2)
[2] VORBIS (0x9)
[3] PCM (0x1)
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Member
|
I would probably prefer a longer name than 'ccaps' like 'sndccaps' or `sndcompcaps'. The play/record words identifies the relation to the audio so an additional identification is not required IMHO. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a small utility to dump the capabilities of a compress device. It uses the same device selection style as cplay (-c card, -d device) and prints the protocol version, direction, fragment size/count limits and the list of supported codecs.
For each codec the SNDRV_COMPRESS_GET_CODEC_CAPS descriptors are printed as well. Drivers not implementing the codec caps ioctl are reported instead of treated as an error.
The direction is derived from the open flags by the core, so by default the device is opened for playback first and for capture as fallback. It can be forced with -D p|c.
Example output:
$ ccaps -c0 -d50
Compress device hw:0,50
protocol version: 0.4.1
direction: playback
fragment size: 38400 - 131072 bytes
fragments: 3 - 64
codecs: 4
[0] AAC (0x6)
[1] MP3 (0x2)
[2] VORBIS (0x9)
[3] PCM (0x1)