src: utils: Add ccaps to query compress device capabilities

GitHub pull_request - opened <[email protected]>
Newsgroups org.alsa-project.alsa-devel
Message-ID <[email protected]>
alsa-project/tinycompress pull request #39 was opened from ujfalusi:

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)

Request URL   : https://github.com/alsa-project/tinycompress/pull/39
Patch URL     : https://github.com/alsa-project/tinycompress/pull/39.patch
Repository URL: https://github.com/alsa-project/tinycompress
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.