Commit graph

55 commits

Author SHA1 Message Date
Maciej S. Szmigiero
d67e42c139 pcm: add and describe SND_PCM_FORMAT_{S, U}20
This patch adds and describes in various functions that query format
properties SND_PCM_FORMAT_{S,U}20 formats that were recently added to the
kernel as SNDRV_PCM_FORMAT_{S,U}20.

These formats are similar to existing 20-bit PCM formats
SND_PCM_FORMAT_{S,U}20_3, however they occupy 4 bytes instead of 3.

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:40:36 +01:00
Jaroslav Kysela
5b9041bced Change FSF address (Franklin Street)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:29:26 +01:00
Natanael Copa
adab355f35 cleanup: Use uint*_t instead of u_int*_t everythwere
Use the standard uint{8,16,32,64}_t everywhere instead of the
non-standard u_int{8,16,32,64}_t.

This changes the types in the public headers and removes the u_int*_t
defines. This may break things. However, indentifiers ending with _t are
reserved by POSIX[1]; defining those can lead to undefined behavior.

So if you rely on alsa-lib defining those for you, then you want the
compiler to error so things can be fixed properly.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-15 09:50:17 +02:00
Thomas Klausner
e0d52fdd8a Introduce bswap.h for portable definitions of byte swap macros.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-03 16:18:10 +01:00
Jussi Laako
b14c49ab3d pcm: Fix DSD sample format endianess and add big-endian format
This patch adds big-endian DSD sample format and fixes return value of DSD
formats for snd_pcm_format_little_endian().

Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-21 15:11:05 +01:00
Jurgen Kramer
e59ffbf30e pcm: add new 32-bit DSD sample format
Add the new DSD_U32_LE sample format to alsa-lib.

NB include/pcm.h and include/sound/asound.h are updated so a new sync with the
kernel headers is not needed

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-10 09:10:50 +02:00
Jurgen Kramer
b9f58dcc6f pcm: 2nd round of pcm_misc DSD fixes
Functions 'snd_pcm_format_silence_64' and 'snd_pcm_format_size' also need to be
able to handle the DSD smaple format.

Changes from v1:
- Correct silence pattern for DSD

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22 11:15:30 +02:00
Takashi Iwai
e8e5481133 pcm: Add missing signed and endianess definitions for DSD formats
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-11 11:55:03 +02:00
Jurgen Kramer
87df9f3b7a pcm: Fix DSD formats userland usability
Support for DSD sample formats has been added a while ago. This patch makes
those sample formats beter usable from userland (e.g. aplay).

[These implementation details have been forgotten in the previous DSD
 support patch -- tiwai]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-11 11:51:04 +02:00
Diego E. 'Flameeyes' Pettenò
8ed98db259 Make some static tables and strings constants.
By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.

The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 13:04:41 +01:00
Jaroslav Kysela
d25e281230 Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:24:55 +02:00
Takashi Iwai
2f71b8753b Fix type-punning
Fixed compile warnings on the latest gcc about type-punning.
Removed unnecessary casts.
2005-09-29 19:11:50 +00:00
Takashi Iwai
087184b0f9 Fix doxygen documents
Fix the warnings of doxygen parsing.
Add some missing documentation.
2005-05-24 14:14:28 +00:00
Takashi Iwai
73008debc3 Add snd_pcm_parse_control_id()
Added a new function snd_pcm_parse_control_id() for the user controls.
This can be used in external plugins, too.
2005-03-09 11:57:54 +00:00
Takashi Iwai
4032563aad fixed the bit width of IEC958_SUBFRAME_* formats from 24 to 32. 2004-05-04 15:10:38 +00:00
Takashi Iwai
965222c3d9 fixed compile warnings. 2004-04-15 12:52:49 +00:00
Jaroslav Kysela
8750215edb Added missing break for 24bit formats (silence) 2002-12-18 12:03:28 +00:00
Jaroslav Kysela
2db6b18b39 Fixed silence_64 and added support for 24-bit samples to area_silence 2002-07-21 08:19:40 +00:00
Jaroslav Kysela
16b3bf447c Enhanced bitmasks in PCM - added support for more formats by Takashi and me 2002-06-26 02:04:11 +00:00
Jaroslav Kysela
853304bbf4 Corrections by Kevin Conder <kconder@interaccess.com> 2002-03-12 20:14:33 +00:00
Jaroslav Kysela
3e3df2d32b Updated GNU GPL license (address).
Changed GNU LGPL licence from 2.0 to 2.1.
2001-12-30 09:22:54 +00:00
Jaroslav Kysela
bb749766d4 Added lfloat plugin code (not finished) 2001-11-26 16:08:49 +00:00
Jaroslav Kysela
b3a8b42c0e Fixed silence for 24-bit format 2001-11-11 19:19:02 +00:00
Jaroslav Kysela
c20c954f3d Added documentation for instrument and midi event functions.
Removed snd_enum_() macros.
Documentation changes in asoundlib.h.
2001-07-11 14:09:01 +00:00
Abramo Bagnara
5b50ec848a Lot of cleanings with the help of gcc3 2001-03-29 17:50:28 +00:00
Jaroslav Kysela
306a6d206d Removed __KERNEL__ includes 2001-03-27 11:16:17 +00:00
Abramo Bagnara
ddc9a186cf Completed PCM documentation 2001-03-24 16:14:44 +00:00
Jaroslav Kysela
10a2d4267f Fixed paths when __KERNEL__ 2001-03-23 22:50:04 +00:00
Abramo Bagnara
445e2b0c07 First part of PCM documentation 2001-03-23 11:05:41 +00:00
Abramo Bagnara
8f0cb26fdf Control API encapsulation. Better names for kernel API. Simpler PCM hw_params API. Added missing const. 2001-02-06 23:48:10 +00:00
Abramo Bagnara
5bf23ae9a1 Encapsulated hwdep. Converted all enums to type safety 2001-02-05 15:44:42 +00:00
Abramo Bagnara
a7561a9c7e Corrected and completed encapsulation for PCM and rawmidi. Remove SND_PCM_HW_PARAM_* and use functions. Separated rawmidi info between streams 2001-02-04 17:03:17 +00:00
Abramo Bagnara
70809b1835 First step toward encapsulation 2001-01-29 14:27:53 +00:00
Abramo Bagnara
cc90e32557 New PCM model with fragment concept removal and two interrupt sources
Renamed size_t/ssize_t to snd_pcm_sframes_t/snd_pcm_uframes_t
2001-01-15 11:06:53 +00:00
Abramo Bagnara
b9916fd7fe Cleaned all hw_info. Removed snd_pcm_hw_{info,params}_rules* and changed strategy to allow the same functionality. Cleaned names tables. Added informative failure 2000-11-29 08:32:36 +00:00
Jaroslav Kysela
41bb7068f2 Merged pcmfinal branch. 2000-11-20 20:10:46 +00:00
Jaroslav Kysela
6962a9d6ce Merged pcmplug branch. 2000-09-24 09:57:26 +00:00
Abramo Bagnara
c9722d7be1 Fixed a few typo 2000-07-18 10:08:05 +00:00
Abramo Bagnara
c46cf38f93 Fixed typo 2000-07-07 11:32:13 +00:00
Abramo Bagnara
8ab37ed29c Fixed silence patterns 2000-07-07 11:14:16 +00:00
Abramo Bagnara
63386fb14a Fixed long long constants syntax 2000-07-06 20:57:34 +00:00
Abramo Bagnara
e8cac7de4d Changed ALSA unit from bytes to frames. Splitted mmap control structs. Better midlevel interrupt handler 2000-06-10 12:39:51 +00:00
Abramo Bagnara
f9eacbfc9e Removed duplicated #include 2000-05-31 07:19:04 +00:00
Abramo Bagnara
6a95bf1516 Endianess cleaning 2000-05-30 18:54:44 +00:00
Abramo Bagnara
1a7f88d10e Better names for ALSA API. Added min_fragments, max_fragments. 2000-05-27 16:52:17 +00:00
Abramo Bagnara
14b1742ff2 Moved format descriptions out of kernel space. Exported setup dump function. 2000-05-25 08:36:58 +00:00
Jaroslav Kysela
1cd6778173 Merged pcm2 branch. 2000-05-08 18:53:38 +00:00
Jaroslav Kysela
749f2ffd77 Added snd_pcm_format_physical_width... 2000-03-30 13:21:26 +00:00
Abramo Bagnara
afbaf0fde9 moved silence byte function 2000-03-22 16:12:59 +00:00
Abramo Bagnara
c569de6883 get rid of a gcc warning 2000-01-09 22:45:28 +00:00