Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
464c2f8
conf: USB-Audio: Disable IEC958 on Lenovo ThinkStation P620
khfeng Aug 3, 2020
82cb27c
pcm: dmix: fix access to sum-buffer in non-interleaved mixing mode
vijaypalaniswamy Jul 23, 2020
fece807
README: add patch submission instructions
tanuk Aug 15, 2020
e097dd4
control: Add documentation for snd_ctl_elem_list_*.
tanjeff Aug 14, 2020
ed75249
conf: quote also strings with '*' and '#' characters in string_print()
perexg Aug 18, 2020
1ac9651
topology: decode: Fix channel map memory allocation
Aug 31, 2020
346a5ef
topology: decode: Fix infinite loop in decoding enum control
Aug 31, 2020
11d4a5a
topology: decode: Remove decoding values for enum control
Aug 31, 2020
f143520
topology: decode: Add enum control texts as separate element
Aug 31, 2020
56a096c
topology: decode: Fix printing texts section
Aug 31, 2020
c324986
topology: decode: Change declaration of enum decoding function
Aug 31, 2020
acbb0e3
topology: decode: Fix decoding PCM formats and rates
Aug 31, 2020
d93b346
topology: decode: Print sig_bits field in PCM capabilities section
Aug 31, 2020
6b0fb2b
topology: decode: Add DAI name printing
Aug 31, 2020
d04e72c
topology: Make buffer for saving dynamic size
Aug 31, 2020
dc778ba
topology: return correct value in tplg_save_printf()
perexg Aug 31, 2020
6ca1ddf
topology: fix some gcc10 warnings (labs, signess)
perexg Aug 31, 2020
84c6aee
topology: fix sort_config()
perexg Aug 31, 2020
ab73253
topology: fix the unaligned access
perexg Aug 31, 2020
472ab5d
topology: improve the printf buffer management
perexg Aug 31, 2020
84185b5
control: Improve general control interface documentation.
tanjeff Sep 2, 2020
c1e7246
control: Add documentation for snd_ctl_elem_value_*.
tanjeff Sep 2, 2020
e80f356
ucm: Handle 'Error' keyword in the master file
perexg Oct 6, 2020
22d5ca8
ucm: add a check for the empty configuration
perexg Oct 6, 2020
61749cf
ucm: substitute the comment string also in the main configuration file
perexg Oct 6, 2020
2b217b7
ucm: rename once_list to boot_list
perexg Oct 6, 2020
4f90392
pcm: fix the snd_pcm_plugin_status() avail and delay fields
perexg Oct 9, 2020
8580c08
dlsym: add support for ALSA_PLUGIN_DIR environment variable
perexg Oct 13, 2020
2a204a5
dlmisc, pcm: export the old symbols (for -flto)
perexg Oct 13, 2020
aa89ad9
dlsym: use the only alsa plugins directory for the internal modules
perexg Oct 13, 2020
a6c8ac0
pcm: meter / s16 - add protection for the maximum copied frames
perexg Oct 13, 2020
6d06fcc
pcm: introduce pcm_frame_diff and pcm_frame_diff2 helpers
perexg Oct 13, 2020
ebe2f8b
pcm: dshare - apply the boundary wrap in snd_pcm_dshare_sync_area()
perexg Oct 13, 2020
0128af6
pcm: fix the pcm_frames_diff -> pcm_frame_diff typo
perexg Oct 14, 2020
e191b23
pcm: file plugin - implement safe_write
perexg Oct 15, 2020
cebe0fe
tplg: fix the unaligned_get32/put32 helpers for big endian
perexg Oct 15, 2020
d77fb47
ucm: handle correctly Linked configuration
perexg Oct 19, 2020
5c1cb56
topology: save_config - fix the error path handling
perexg Oct 19, 2020
e91b1c0
topology: straight printf and error path fixes
perexg Oct 19, 2020
49bd4b1
Release v1.2.4
perexg Oct 19, 2020
ad8c8e5
dlmisc: the snd_plugin_dir_set / snd_plugin_dir must be declared even…
perexg Oct 22, 2020
1d993b3
dlmisc: fix snd_plugin_dir locking for not DL_ORIGIN_AVAILABLE
perexg Oct 29, 2020
2757191
pcm: snd_pcm_mmap_readi - fix typo in comment
perexg Oct 29, 2020
39bd0e1
topology: use inclusive language for bclk
plbossart Nov 12, 2020
7061923
topology: use inclusive language for fsync
plbossart Nov 12, 2020
e5c350d
topology: use inclusive language in documentation
plbossart Nov 12, 2020
7d36895
pcm: set the snd_pcm_ioplug_status() tstamp field
Nov 4, 2020
2a99fd9
topology: ctl: Fix parsing of enum kcontrol texts.
lrgirdwo Jan 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ http://www.alsa-project.org/alsa-doc/alsa-lib/

You may give a look for more information about the ALSA project to URL
http://www.alsa-project.org.

### Submitting patches

The preferred way to submit patches is by sending them by email to the
alsa-devel mailing list. Sending mail to the list requires subscription,
subscribe here: https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Add Takashi Iwai `<tiwai@suse.de>` and/or Jaroslav Kysela `<perex@perex.cz>` to
Cc so that your patch won't be missed.

Patches are also accepted as GitHub pull requests.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(alsa-lib, 1.2.3.2)
AC_INIT(alsa-lib, 1.2.4)

AC_CONFIG_SRCDIR([src/control/control.c])
AC_CONFIG_MACRO_DIR([m4])
Expand Down
142 changes: 136 additions & 6 deletions include/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,127 @@ typedef struct _snd_ctl_card_info snd_ctl_card_info_t;
/** CTL element identifier container */
typedef struct _snd_ctl_elem_id snd_ctl_elem_id_t;

/** CTL element identifier list container */
/** CTL element list container
*
* This is a list of CTL elements. The list contains management
* information (e.g. how many elements the sound card has) as well as
* the element identifiers. All functions which operate on the list
* are named snd_ctl_elem_list_*().
*
* \par Memory management
*
* There are two memory areas to deal with: The list container itself
* and the memory for the element identifiers.
*
* To manage the area for the list container, the following functions
* are used:
*
* - snd_ctl_elem_list_malloc() / snd_ctl_elem_list_free() to allocate
* and free memory on the heap, or
* - snd_ctl_elem_list_alloca() to allocate the memory on the
* stack. This memory is auto-released when the stack is unwound.
*
* To manage the space for the element identifiers, the
* snd_ctl_elem_list_alloc_space() and snd_ctl_elem_list_free_space()
* are used. Allocating the right amount of space can be achieved by
* first obtaining the number of elements and then calling
* snd_ctl_elem_list_alloc_space():
*
* \code
* snd_ctl_elem_list_t* list;
* int count;
*
* // Initialise list
* snd_ctl_elem_list_malloc(&list);
*
* // Get number of elements
* snd_ctl_elem_list(ctl, list);
* count = snd_ctl_elem_list_get_count(list);
*
* // Allocate space for identifiers
* snd_ctl_elem_list_alloc_space(list, count);
*
* // Get identifiers
* snd_ctl_elem_list(ctl, list); // yes, this is same as above :)
*
* // Do something useful with the list...
*
* // Cleanup
* snd_ctl_elem_list_free_space(list);
* snd_ctl_elem_list_free(list);
* \endcode
*
*
* \par The Elements
*
* The elements in the list are accessed using an index. This index is
* the location in the list; Don't confuse it with the 'index' of the
* element identifier. For example:
*
* \code
* snd_ctl_elem_list_t list;
* unsigned int element_index;
*
* // Allocate space, fill list ...
*
* element_index = snd_ctl_elem_list_get_index(&list, 2);
* \endcode
*
* This will access the 3rd element in the list (index=2) and get the
* elements index from the driver (which might be 13, for example).
*/
typedef struct _snd_ctl_elem_list snd_ctl_elem_list_t;

/** CTL element info container */
typedef struct _snd_ctl_elem_info snd_ctl_elem_info_t;

/** CTL element value container */
/** CTL element value container
*
* Contains the value(s) (i.e. members) of a single element. All
* values of a given element are of the same type.
*
* \par Memory management
*
* To access a value, a snd_ctl_elem_value_t must be allocated using
* snd_ctl_elem_value_alloca() or snd_ctl_elem_value_malloc(). When
* using the latter, it must be freed again using
* snd_ctl_elem_value_free().
*
* \par Identifier
*
* Then, the ID must be filled. It is sufficient to fill only the
* numid, if known. Otherwise, interface type, device, subdevice,
* name, index must all be given. The following functions can be used
* to fill the ID:
*
* - snd_ctl_elem_value_set_id(): Set the ID. Requires an
* snd_ctl_elem_id_t object.
* - snd_ctl_elem_value_set_numid(): Set the numid.
* - Or use all of the following:
*
* - snd_ctl_elem_value_set_interface()
* - snd_ctl_elem_value_set_device()
* - snd_ctl_elem_value_set_subdevice()
* - snd_ctl_elem_value_set_name()
* - snd_ctl_elem_value_set_index()
*
* When communicating with the driver (snd_ctl_elem_read(),
* snd_ctl_elem_write()), and the numid was given, the interface,
* device, ... are filled (even if you set the before). When the numid
* is unset (i.e. it is 0), it is filled.
*
* \par Communicating with the driver
*
* After the value container was created and filled with the ID of the
* desired element, the value(s) can be fetched from the driver (and
* thus from the hardware) or written to the driver.
*
* To fetch a value, use snd_ctl_elem_read(). Thereafter, use the
* snd_ctl_elem_value_get_*() functions to obtain the actual value.
*
* To write a new value, first use a snd_ctl_elem_value_set_*() to set
* it, then call snd_ctl_elem_write() to write it to the driver.
*/
typedef struct _snd_ctl_elem_value snd_ctl_elem_value_t;

/** CTL event container */
Expand Down Expand Up @@ -354,11 +468,18 @@ void snd_ctl_event_copy(snd_ctl_event_t *dst, const snd_ctl_event_t *src);
snd_ctl_event_type_t snd_ctl_event_get_type(const snd_ctl_event_t *obj);

size_t snd_ctl_elem_list_sizeof(void);

/** \hideinitializer
* \brief allocate an invalid #snd_ctl_elem_list_t using standard alloca
* \param ptr returned pointer
*
* \brief Allocate a #snd_ctl_elem_list_t using standard alloca.
*
* The memory is allocated on the stack and will automatically be
* released when the stack unwinds (i.e. no free() is needed).
*
* \param ptr Pointer to allocated memory.
*/
#define snd_ctl_elem_list_alloca(ptr) __snd_alloca(ptr, snd_ctl_elem_list)

int snd_ctl_elem_list_malloc(snd_ctl_elem_list_t **ptr);
void snd_ctl_elem_list_free(snd_ctl_elem_list_t *obj);
void snd_ctl_elem_list_clear(snd_ctl_elem_list_t *obj);
Expand Down Expand Up @@ -454,11 +575,20 @@ int snd_ctl_elem_add_iec958(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id);
int snd_ctl_elem_remove(snd_ctl_t *ctl, snd_ctl_elem_id_t *id);

size_t snd_ctl_elem_value_sizeof(void);

/** \hideinitializer
* \brief allocate an invalid #snd_ctl_elem_value_t using standard alloca
* \param ptr returned pointer
* \brief Allocate an invalid #snd_ctl_elem_value_t on the stack.
*
* Allocate space for a value object on the stack. The allocated
* memory need not be freed, because is on the stack.
*
* See snd_ctl_elem_value_t for details.
*
* \param ptr Pointer to a snd_ctl_elem_value_t pointer. The address
* of the allocated space will returned here.
*/
#define snd_ctl_elem_value_alloca(ptr) __snd_alloca(ptr, snd_ctl_elem_value)

int snd_ctl_elem_value_malloc(snd_ctl_elem_value_t **ptr);
void snd_ctl_elem_value_free(snd_ctl_elem_value_t *obj);
void snd_ctl_elem_value_clear(snd_ctl_elem_value_t *obj);
Expand Down
22 changes: 14 additions & 8 deletions include/sound/uapi/asoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,22 @@
#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3)

/* DAI topology BCLK parameter
* For the backwards capability, by default codec is bclk master
* For the backwards capability, by default codec is bclk provider
*/
#define SND_SOC_TPLG_BCLK_CM 0 /* codec is bclk master */
#define SND_SOC_TPLG_BCLK_CS 1 /* codec is bclk slave */
#define SND_SOC_TPLG_BCLK_CP 0 /* codec is bclk provider */
#define SND_SOC_TPLG_BCLK_CC 1 /* codec is bclk consumer */
/* keep previous definitions for compatibility */
#define SND_SOC_TPLG_BCLK_CM SND_SOC_TPLG_BCLK_CP
#define SND_SOC_TPLG_BCLK_CS SND_SOC_TPLG_BCLK_CC

/* DAI topology FSYNC parameter
* For the backwards capability, by default codec is fsync master
* For the backwards capability, by default codec is fsync provider
*/
#define SND_SOC_TPLG_FSYNC_CM 0 /* codec is fsync master */
#define SND_SOC_TPLG_FSYNC_CS 1 /* codec is fsync slave */
#define SND_SOC_TPLG_FSYNC_CP 0 /* codec is fsync provider */
#define SND_SOC_TPLG_FSYNC_CC 1 /* codec is fsync consumer */
/* keep previous definitions for compatibility */
#define SND_SOC_TPLG_FSYNC_CM SND_SOC_TPLG_FSYNC_CP
#define SND_SOC_TPLG_FSYNC_CS SND_SOC_TPLG_FSYNC_CC

/*
* Block Header.
Expand Down Expand Up @@ -335,8 +341,8 @@ struct snd_soc_tplg_hw_config {
__u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */
__u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */
__u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */
__u8 bclk_master; /* SND_SOC_TPLG_BCLK_ value */
__u8 fsync_master; /* SND_SOC_TPLG_FSYNC_ value */
__u8 bclk_provider; /* SND_SOC_TPLG_BCLK_ value */
__u8 fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */
__u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */
__le16 reserved; /* for 32bit alignment */
__le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */
Expand Down
8 changes: 4 additions & 4 deletions include/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ extern "C" {
*
* id "1" # used for binding to the config
* format "I2S" # physical audio format.
* bclk "master" # Platform is master of bit clock
* fsync "slave" # Platform is slave of fsync
* bclk "codec_provider" # Codec provides the bit clock
* fsync "codec_consumer" # Codec follows the fsync
* }
* </pre>
*
Expand Down Expand Up @@ -1028,8 +1028,8 @@ struct snd_tplg_hw_config_template {
unsigned char clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */
unsigned char invert_bclk; /* 1 for inverted BCLK, 0 for normal */
unsigned char invert_fsync; /* 1 for inverted frame clock, 0 for normal */
unsigned char bclk_master; /* SND_SOC_TPLG_BCLK_ value */
unsigned char fsync_master; /* SND_SOC_TPLG_FSYNC_ value */
unsigned char bclk_provider; /* SND_SOC_TPLG_BCLK_ value */
unsigned char fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */
unsigned char mclk_direction; /* SND_SOC_TPLG_MCLK_ value */
unsigned short reserved; /* for 32bit alignment */
unsigned int mclk_rate; /* MCLK or SYSCLK freqency in Hz */
Expand Down
2 changes: 2 additions & 0 deletions src/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,8 @@ static void string_print(char *str, int id, snd_output_t *out)
case ']':
case '\'':
case '"':
case '*':
case '#':
goto quoted;
default:
if (*p <= 31 || *p >= 127)
Expand Down
2 changes: 2 additions & 0 deletions src/conf/cards/USB-Audio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ USB-Audio.pcm.iec958_device {
"Scarlett 2i4 USB" 999
"Sennheiser USB headset" 999
"SWTOR Gaming Headset by Razer" 999
"ThinkStation P620 Main" 999
"ThinkStation P620 Rear" 999
"Thunderbolt Dock Audio Headset" 999
"Thunderbolt Dock Audio Module" 999
"USB Device 0x46d_0x821" 999
Expand Down
Loading