The Advanced Linux Sound Architecture (ALSA) - library
Find a file
Maciej S. Szmigiero 0c081ebbed pcm: linear, route: handle linear formats with 20-bit sample on 4 bytes
The previous patch has added 20-bit PCM formats SND_PCM_FORMAT_{S,U}20 to
alsa-lib.
We need to extend the linear format conversion code with handling of these
sample formats so they can also be utilized by applications that only
recognize the more typical ones like SND_PCM_FORMAT_S16.

Since the conversion arrays are indexed by a format bit width divided by 8
the easiest way to handle these formats is to treat them like they were
40-bit wide (the next free integer multiple of 8 bits).
This doesn't create a collision risk with a future format since there can't
really be a 40-bit sample format that occupies 4 bytes.

Make sure we use the getput conversion method for these formats since a
direct conversion from / to them is not supported.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-18 15:41:08 +01:00
alsalisp Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
aserver Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
doc doxygen: Suppress timestamp 2016-06-23 16:29:07 +02:00
include pcm: add and describe SND_PCM_FORMAT_{S, U}20 2017-12-18 15:40:36 +01:00
m4 Add the attributes.m4 macro file from xine/lscube. 2008-11-21 13:04:19 +01:00
modules configure.ac: build extra mixer modules conditionally 2017-11-27 21:48:20 +01:00
src pcm: linear, route: handle linear formats with 20-bit sample on 4 bytes 2017-12-18 15:41:08 +01:00
test test: correct emulation for channel-map TLV 2017-11-24 13:47:17 +01:00
utils autotools: update style 2014-02-26 08:16:22 +01:00
.gitignore Add pcm-multi-thread to .gitignore 2016-07-07 16:30:54 +02:00
acinclude.m4 fixed for the recent autoconf. 2004-01-26 15:52:17 +00:00
ChangeLog * update to libtool 1.3.3 1999-07-22 12:18:42 +00:00
configure.ac conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs 2017-12-05 23:33:37 +01:00
COPYING Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
gitcompile configure.ac: do not enable alisp code by default 2017-11-27 21:48:20 +01:00
INSTALL pcm: Add thread-safety to PCM API 2016-07-11 15:25:30 +02:00
Makefile.am autotools: update style 2014-02-26 08:16:22 +01:00
MEMORY-LEAK Initial version 2003-02-04 14:56:07 +00:00
NOTES Change assert condition in error message handler 2007-10-24 12:53:08 +02:00
TODO Added snd_config_load_override(). 2002-01-09 21:28:15 +00:00