Detailed changes v1.1.9 v1.2.1: Difference between revisions

From AlsaProject
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
 
(11 intermediate revisions by the same user not shown)
Line 7: Line 7:
==alsa-lib==
==alsa-lib==
===Core===
===Core===
- Release v1.2.1
<code>
<code>
- Release v1.2.1
- conf: implement snd_config_add_before() and snd_config_add_after()
 
</code>
<code>
<code>
- conf: implement snd_config_add_before() and snd_config_add_after()
- topology: remove configuration files (moved to alsa-topology-conf repository)
 
</code>
<code>
<code>
- topology: remove configuration files (moved to alsa-topology-conf repository)
- create separated libatopology library with the topology routines
 
</code>
<code>
<code>
- create separated libatopology library with the topology routines
- ucm: remove configuration files (moved to alsa-ucm-conf repository)
 
</code>
<code>
<code>
- ucm: remove configuration files (moved to alsa-ucm-conf repository)
- conf: improve the include paths code
 
</code>
<code>
<code>
- conf: improve the include paths code
 
  - various cleanups (more straight code and allocations)
  - do not add the base config path /usr/share/alsa to the
    explicit include list of directories
    (it's not wanted for ucm configs)
 
</code>
<code>
<code>
  - Use __func__ instead of __FUNCTION__
  - various cleanups (more straight code and allocations)
 
- do not add the base config path /usr/share/alsa to the
   They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
   explicit include list of directories
   for backwards compatibility with old gcc versions.
   (it's not wanted for ucm configs)</code>
 
- Use __func__ instead of __FUNCTION__
</code>
<code>
<code>
- rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)
 
  Use proper reference counting for the dynamic symbol.
 
</code>
<code>
<code>
  - ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles
  They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
 
for backwards compatibility with old gcc versions.</code>
  Adding a new Conexant CX2072X codec profile and reusing the existing
- rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)
  BYT/CHT platform snippets.
<code>
 
<code>
  Currently tested only on ASUS E200HA laptop.
Use proper reference counting for the dynamic symbol.</code>
 
- ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles
</code>
<code>
<code>
Adding a new Conexant CX2072X codec profile and reusing the existing
BYT/CHT platform snippets.
Currently tested only on ASUS E200HA laptop.</code>
===Config API===
===Config API===
- conf: implement snd_config_add_before() and snd_config_add_after()
<code>
- ucm: change the If block parsing
<code>
<code>
<code>
  - conf: implement snd_config_add_before() and snd_config_add_after()
  - evaluate always If before the other blocks</code>
 
- ucm: add If condition block
</code>
<code>
<code>
- ucm: change the If block parsing
 
  - evaluate always If before the other blocks
</code>
<code>
<code>
  - ucm: add If condition block
  The syntax is simple:
 
  The syntax is simple:
If./any-if-identificator/ {
 
  Condition {
  If./any-if-identificator/ {
    Type /type_here/
    Condition {
    /optional defines/
      Type /type_here/
      /optional defines/
    }
    True {
      /block used when condition is evaluated as true/
    }
    False {
      /block used when condition is evaluated as false/
    }
   }
   }
    
   True {
  The Type "ControlExists" is implemented:
    /block used when condition is evaluated as true/
    
   }
   Condition {
   False {
     Type ControlExists
     /block used when condition is evaluated as false/
    Device "hw:${CardId}"
    Control "iface=CARD,name='Headphone Jack'"
   }
   }
    
}
</code>
The Type "ControlExists" is implemented:
Condition {
  Type ControlExists
  Device "hw:${CardId}"
   Control "iface=CARD,name='Headphone Jack'"
}</code>
===Control API===
===Control API===
- control_shm: add missing socket close to the error path (coverity)
<code>
<code>
- control_shm: add missing socket close to the error path (coverity)
- control_shm: remove duplicate code (coverity)
 
</code>
<code>
<code>
- control_shm: remove duplicate code (coverity)
 
</code>
===Mixer API===
===Mixer API===
- mixer: simple - add snd_mixer_selem_id_parse() from amixer
<code>
<code>
- mixer: simple - add snd_mixer_selem_id_parse() from amixer
 
</code>
===PCM API===
===PCM API===
- pcm: the maximal rate is 768000Hz, fix the remain code
<code>
- pcm: fix the period_size for direct plugins (dmix, dsnoop, dshare)
<code>
<code>
BugLink: https://github.com/alsa-project/alsa-lib/issues/8</code>
- pcm: Fix the wrong PCM object passed for locking/unlocking
<code>
<code>
Most of PCM API functions have snd_pcm_lock()/unlock() wraps for the
actual calls of ops, and some plugins try to unlock/relock internally
for the given PCM object.  This, unfortunately, causes a problem in
some configurations and leads to the unexpected behavior or deadlock.
The main problem is that we call snd_pcm_lock() with the given PCM
object, while calling the ops with pcm-&gt;op_arg or pcm-&gt;fast_op_arg as
the slave PCM object.  Meanwhile the plugin code assumes that the
passed PCM object is already locked, and calls snd_pcm_unlock().
This bug doesn't hit always because in most cases pcm-&gt;op_arg and
fast_op_arg are identical with pcm itself.  But in some configurations
they have different values, so the problem surfaces.
This patch is an attempt to resolve these inconsistencies.  It
replaces most of snd_pcm_lock()/unlock() calls with either pcm-&gt;op_arg
or pcm-&gt;fast_op_arg, depending on the call pattern, so that the plugin
code can safely run snd_pcm_unlock() to the given PCM object.</code>
- pcm: chmap: Fix memory leak at snd_pcm_set_chmap()
<code>
<code>
snd_pcm_set_chmap() leaks the memory returned from snd_pcm_get_chmap()
without releasing.  Add the missing free() call as well as a slight
code refactoring.
BugLink: https://github.com/alsa-project/alsa-lib/pull/11</code>
- pcm: dshare: allow missing bindings
<code>
<code>
allow opening the device and start the audio clock without blocking
any channel
this is required if the audio clock has to be available all the time,
even when application is not streaming audio data</code>
- pcm: return -ENOSYS when ops or fast_ops callback is NULL
<code>
<code>
function is allowed to continue until it checks for error variable, as to
not conflict with original implementation flow
for simple functions involving only one line, return error immediately in
case callback is NULL</code>
- pcm_file: improve error checking in write_wav_header function
<code>
<code>
previously errno would be returned even for cases where it may have
not been populated, for example one of the write functions failing,
or writing only partial buffer,
now progress through write operations separately and report errno when
appropriate</code>
- pcm_file: in case of failed write clear file buffer variables
<code>
<code>
previously, in case of failed write to output file, error is returned
from snd_pcm_writei/read APIs, user could run pcm_drain as fallback and
encounter an assert, since drain would try to write remaining file
buffer to a file
if failed to write to output file in first place, it makes sense to clear
current internal pmc_file file buffer variables</code>
- pcm_file: use EIO instead of EPIPE when failing to write output file
<code>
<code>
EPIPE is defined as XRUN which is not entirely correct in this condition
failing to write to a file in pcm_file plugin can not be simply recovered
by a retry as user of the api might be led to believe when receiving EPIPE
use EIO instead to indicate a different kid of error that may not be
recoverable by retry</code>
- pcm_file: return errno in case of a failed write operation
<code>
<code>
allows correct error code propagation for snd_pcm_file_write_bytes caller</code>
- pcm_file: remove double line
<code>
<code>
snd_pcm_file_add_frames called two times by mistake, introduced in
2a800c0c4f259043c9217a4aa6a57afaf9f77477</code>
- pcm_file: report write output file error to api user
<code>
<code>
<code>
  - pcm: the maximal rate is 768000Hz, fix the remain code
  when writing to output file fails, api user is notified and can handle
 
recovery</code>
</code>
- pcm_file: do not disrupt playback on output file write fail
<code>
<code>
- pcm: fix the period_size for direct plugins (dmix, dsnoop, dshare)
 
  BugLink: https://github.com/alsa-project/alsa-lib/issues/8
</code>
<code>
<code>
  - pcm: Fix the wrong PCM object passed for locking/unlocking
  previously playback could be interrupted by snd_pcm_file_add_frames:
 
    assert(file-&gt;wbuf_used_bytes &lt; file-&gt;wbuf_size_bytes)
  Most of PCM API functions have snd_pcm_lock()/unlock() wraps for the
   
  actual calls of ops, and some plugins try to unlock/relock internally
in case snd_pcm_file_write_bytes fails to write full amount of bytes
  for the given PCM object.  This, unfortunately, causes a problem in
  to file, variable wbuf_used_bytes would not be fully decremented by
  some configurations and leads to the unexpected behavior or deadlock.
  requested amount of bytes function was called with
 
  The main problem is that we call snd_pcm_lock() with the given PCM
for the assert to trigger, multiple write fails need to happen, so
  object, while calling the ops with pcm-&gt;op_arg or pcm-&gt;fast_op_arg as
that wbuf_used_bytes overflows wbuf_size_bytes,
  the slave PCM object. Meanwhile the plugin code assumes that the
  passed PCM object is already locked, and calls snd_pcm_unlock().
this patch will allow application to report error code to api user
  This bug doesn't hit always because in most cases pcm-&gt;op_arg and
who might have an idea how to recover, before assert is triggered,
  fast_op_arg are identical with pcm itself. But in some configurations
also reporting error along with the print out message might give user
  they have different values, so the problem surfaces.
a better idea of what is going on, where previously reason for
 
mentioned assert was not immediately clear</code>
  This patch is an attempt to resolve these inconsistencies. It
- pcm: rate: Avoid pointer arithmetic on `void *`
  replaces most of snd_pcm_lock()/unlock() calls with either pcm-&gt;op_arg
  or pcm-&gt;fast_op_arg, depending on the call pattern, so that the plugin
  code can safely run snd_pcm_unlock() to the given PCM object.
 
  Fixes: 54931e5a5455 ("pcm: Add thread-safety to PCM API")
  Reported-by: Ben Russell &lt;thematrixeatsyou@gmail.com&gt;
</code>
<code>
<code>
- pcm: chmap: Fix memory leak at snd_pcm_set_chmap()
 
  snd_pcm_set_chmap() leaks the memory returned from snd_pcm_get_chmap()
  without releasing.  Add the missing free() call as well as a slight
  code refactoring.
 
  Reported-by: Conrad Jones
  BugLink: https://github.com/alsa-project/alsa-lib/pull/11
  Fixes: d20e24e5d161 ("chmap: Always succeed setting the map to what it already is")
</code>
<code>
<code>
  - pcm: dshare: allow missing bindings
  The pointer operand to the binary `+` operator must be to a complete
 
object type.</code>
  allow opening the device and start the audio clock without blocking
- pcm: direct: Remove unused empty struct
  any channel
 
  this is required if the audio clock has to be available all the time,
  even when application is not streaming audio data
 
</code>
<code>
<code>
- pcm: return -ENOSYS when ops or fast_ops callback is NULL
- pcm: Make sure parameter qualifiers match between declaration and definition
 
  function is allowed to continue until it checks for error variable, as to
  not conflict with original implementation flow
 
  for simple functions involving only one line, return error immediately in
  case callback is NULL
 
</code>
<code>
<code>
- pcm_file: improve error checking in write_wav_header function
- pcm: hw: Don't return in a void function
 
  previously errno would be returned even for cases where it may have
  not been populated, for example one of the write functions failing,
  or writing only partial buffer,
 
  now progress through write operations separately and report errno when
  appropriate
 
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
</code>
<code>
<code>
- pcm_file: in case of failed write clear file buffer variables
 
  previously, in case of failed write to output file, error is returned
  from snd_pcm_writei/read APIs, user could run pcm_drain as fallback and
  encounter an assert, since drain would try to write remaining file
  buffer to a file
 
  if failed to write to output file in first place, it makes sense to clear
  current internal pmc_file file buffer variables
 
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
</code>
<code>
<code>
  - pcm_file: use EIO instead of EPIPE when failing to write output file
  A return statement with an expression in a function returning void is
 
a constraint violation.</code>
  EPIPE is defined as XRUN which is not entirely correct in this condition
- Use __func__ instead of __FUNCTION__
 
  failing to write to a file in pcm_file plugin can not be simply recovered
  by a retry as user of the api might be led to believe when receiving EPIPE
 
  use EIO instead to indicate a different kid of error that may not be
  recoverable by retry
 
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
</code>
<code>
<code>
- pcm_file: return errno in case of a failed write operation
 
  allows correct error code propagation for snd_pcm_file_write_bytes caller
 
</code>
<code>
<code>
  - pcm_file: remove double line
  They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
 
for backwards compatibility with old gcc versions.</code>
  snd_pcm_file_add_frames called two times by mistake, introduced in
- pcm_file: another locking fix (coverity)
  2a800c0c4f259043c9217a4aa6a57afaf9f77477
 
</code>
<code>
<code>
- pcm_file: report write output file error to api user
- pcm_file: coverity fixes (including double locking)
 
  when writing to output file fails, api user is notified and can handle
  recovery
 
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
</code>
<code>
<code>
- pcm_file: do not disrupt playback on output file write fail
- pcm_hw: close file descriptor in the error path in snd_pcm_hw_open() (coverity)
 
  previously playback could be interrupted by snd_pcm_file_add_frames:
      assert(file-&gt;wbuf_used_bytes &lt; file-&gt;wbuf_size_bytes)
 
  in case snd_pcm_file_write_bytes fails to write full amount of bytes
  to file, variable wbuf_used_bytes would not be fully decremented by
  requested amount of bytes function was called with
 
  for the assert to trigger, multiple write fails need to happen, so
  that wbuf_used_bytes overflows wbuf_size_bytes,
 
  this patch will allow application to report error code to api user
  who might have an idea how to recover, before assert is triggered,
  also reporting error along with the print out message might give user
  a better idea of what is going on, where previously reason for
  mentioned assert was not immediately clear
 
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
</code>
<code>
<code>
- pcm: rate: Avoid pointer arithmetic on `void *`
- pcm_file: call pclose() correctly for popen() (coverity)
 
  The pointer operand to the binary `+` operator must be to a complete
  object type.
 
</code>
<code>
<code>
- pcm: direct: Remove unused empty struct
- pcm: fix memory leak in _snd_pcm_parse_config_chmaps() (coverity)
 
</code>
<code>
<code>
- pcm: Make sure parameter qualifiers match between declaration and definition
- pcm: file: add infile read support for mmap mode
 
</code>
<code>
<code>
- pcm: hw: Don't return in a void function
 
  A return statement with an expression in a function returning void is
  a constraint violation.
 
</code>
<code>
<code>
  - Use __func__ instead of __FUNCTION__
  mmap_begin callback is used to copy data from input file to mmaped
 
buffer
  They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
  for backwards compatibility with old gcc versions.
guard for corner use of api (multiple mmap_begin calls by user) is
 
introduced to check if next continuous buffer was already overwritten
</code>
buffer is overwritten with input file data only in case of stream capture</code>
- pcm: add mmap_begin callback to snd_pcm_fast_ops_t api
<code>
<code>
- pcm_file: another locking fix (coverity)
 
</code>
<code>
<code>
  - pcm_file: coverity fixes (including double locking)
  main motivation for adding the callback is to use it to enable operation
 
on mmaped buffer before user access for pcm_file plugin
</code>
support for MMAP read access with masking by data from input file is not
implemented for pcm_file plugin, by adding this callback implementing
such feature can be done by rewriting next continuous portion of buffer
on each mmap_begin call
plugins like softvol use pcm_plugin interface and overwrite the buffer by
looping around it in avail_update callback, this patch hopes to simplify
the task by adding new api callback, removing the need for rewriting
pcm_file (to use pcm_plugin callbacks) and careful checking when looping
around whole mmaped buffer</code>
- pcm: file: add missing unlock on early return
<code>
<code>
- pcm_hw: close file descriptor in the error path in snd_pcm_hw_open() (coverity)
- pcm: file: use snd_pcm_file_areas_read_infile for readi
 
</code>
<code>
<code>
- pcm_file: call pclose() correctly for popen() (coverity)
 
</code>
<code>
<code>
  - pcm: fix memory leak in _snd_pcm_parse_config_chmaps() (coverity)
  use previously introduced helper function, this commit unifies behavior
 
of readi and readn
</code>
corner case behavior of readi is changed by this commit, previously,
in case 0 bytes were red from file (EOF), frames = 0 was returned,
signaling api user as if no data was red from slave, after the patch,
amount of frames red from slave with data red from slave stored in buffer
is returned when EOF is reached</code>
- pcm: file: add support for infile reading in non interleaved mode
<code>
<code>
- pcm: file: add infile read support for mmap mode
 
  mmap_begin callback is used to copy data from input file to mmaped
  buffer
 
  guard for corner use of api (multiple mmap_begin calls by user) is
  introduced to check if next continuous buffer was already overwritten
 
  buffer is overwritten with input file data only in case of stream capture
 
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
</code>
<code>
<code>
  - pcm: add mmap_begin callback to snd_pcm_fast_ops_t api
  add helper function to copy input file data to buffer mapped by areas,
 
in case of an error, do not fill the areas, allowing device read buffer
  main motivation for adding the callback is to use it to enable operation
to be provided to api caller
  on mmaped buffer before user access for pcm_file plugin
 
previously unused rbuf variable is reused for this purpose</code>
  support for MMAP read access with masking by data from input file is not
- pcm: dsnoop: Added "hw_ptr_alignment" option in configuration for slave pointer alignment
  implemented for pcm_file plugin, by adding this callback implementing
  such feature can be done by rewriting next continuous portion of buffer
  on each mmap_begin call
 
  plugins like softvol use pcm_plugin interface and overwrite the buffer by
  looping around it in avail_update callback, this patch hopes to simplify
  the task by adding new api callback, removing the need for rewriting
  pcm_file (to use pcm_plugin callbacks) and careful checking when looping
  around whole mmaped buffer
 
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
</code>
<code>
<code>
- pcm: file: add missing unlock on early return
 
</code>
<code>
<code>
  - pcm: file: use snd_pcm_file_areas_read_infile for readi
  This change adapt the fix commit 6b058fda9dce
 
("pcm: dmix: Add option to allow alignment of slave pointers")
  use previously introduced helper function, this commit unifies behavior
for dsnoop plugin
  of readi and readn
 
Issue is that snd_pcm_wait() goes back to waiting because the hw_ptr
  corner case behavior of readi is changed by this commit, previously,
is not period aligned. Therefore snd_pcm_wait() will block for a longer
  in case 0 bytes were red from file (EOF), frames = 0 was returned,
time as required.
  signaling api user as if no data was red from slave, after the patch,
  amount of frames red from slave with data red from slave stored in buffer
With these rcar driver changes the exact position of the dma is returned.
  is returned when EOF is reached
During snd_pcm_start they read hw_ptr as reference, and this hw_ptr
 
is now not period aligned, and is a little ahead over the period while it
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
is read. Therefore when the avail is calculated during snd_pcm_wait(),
</code>
it is missing the avail_min by a few frames.
An additional option hw_ptr_alignment is provided to dsnoop configuration,
to allow the user to configure the slave application and hw pointer
alignment at startup</code>
- pcm: dshare: Added "hw_ptr_alignment" option in configuration for alignment of slave pointers
<code>
<code>
- pcm: file: add support for infile reading in non interleaved mode
 
  add helper function to copy input file data to buffer mapped by areas,
  in case of an error, do not fill the areas, allowing device read buffer
  to be provided to api caller
 
  previously unused rbuf variable is reused for this purpose
 
  Reviewed-by: Timo Wischer &lt;twischer@de.adit-jv.com&gt;
</code>
<code>
<code>
  - pcm: dsnoop: Added "hw_ptr_alignment" option in configuration for slave pointer alignment
  This change adapt the fix commit 6b058fda9dce
 
("pcm: dmix: Add option to allow alignment of slave pointers")
  This change adapt the fix commit 6b058fda9dce
for dshare plugin
  ("pcm: dmix: Add option to allow alignment of slave pointers")
  for dsnoop plugin
Issue is that snd_pcm_wait() goes back to waiting because the hw_ptr
 
is not period aligned. Therefore snd_pcm_wait() will block for a longer
  Issue is that snd_pcm_wait() goes back to waiting because the hw_ptr
time as required.
  is not period aligned. Therefore snd_pcm_wait() will block for a longer
  time as required.
With these rcar driver changes the exact position of the dma is returned.
 
During snd_pcm_start they read hw_ptr as reference, and this hw_ptr
  With these rcar driver changes the exact position of the dma is returned.
is now not period aligned, and is a little ahead over the period while it
  During snd_pcm_start they read hw_ptr as reference, and this hw_ptr
is read. Therefore when the avail is calculated during snd_pcm_wait(),
  is now not period aligned, and is a little ahead over the period while it
it is missing the avail_min by a few frames.
  is read. Therefore when the avail is calculated during snd_pcm_wait(),
  it is missing the avail_min by a few frames.
An additional option hw_ptr_alignment is provided to dshare configuration,
 
to allow the user to configure the slave application and hw pointer
  An additional option hw_ptr_alignment is provided to dsnoop configuration,
alignment at startup</code>
  to allow the user to configure the slave application and hw pointer
- pcm: direct: Add generic hw_ptr_alignment function for dmix, dshare and dsnoop
  alignment at startup
 
</code>
<code>
<code>
- pcm: dshare: Added "hw_ptr_alignment" option in configuration for alignment of slave pointers
 
  This change adapt the fix commit 6b058fda9dce
  ("pcm: dmix: Add option to allow alignment of slave pointers")
  for dshare plugin
 
  Issue is that snd_pcm_wait() goes back to waiting because the hw_ptr
  is not period aligned. Therefore snd_pcm_wait() will block for a longer
  time as required.
 
  With these rcar driver changes the exact position of the dma is returned.
  During snd_pcm_start they read hw_ptr as reference, and this hw_ptr
  is now not period aligned, and is a little ahead over the period while it
  is read. Therefore when the avail is calculated during snd_pcm_wait(),
  it is missing the avail_min by a few frames.
 
  An additional option hw_ptr_alignment is provided to dshare configuration,
  to allow the user to configure the slave application and hw pointer
  alignment at startup
 
</code>
<code>
<code>
  - pcm: direct: Add generic hw_ptr_alignment function for dmix, dshare and dsnoop
  Move the code snd_pcm_direct_reset_slave_ptr() from pcm_dmix.c
 
to pcm_direct.c and its header so that the helper function can be
  Move the code snd_pcm_direct_reset_slave_ptr() from pcm_dmix.c
re-used by other direct-pcm plugins.
  to pcm_direct.c and its header so that the helper function can be
There is no change in the behavior or the functionality.</code>
  re-used by other direct-pcm plugins.
  There is no change in the behavior or the functionality.
 
</code>
===PCM Plugin API===
===PCM Plugin API===
- pcm: the maximal rate is 768000Hz, fix the remain code
<code>
<code>
- pcm: the maximal rate is 768000Hz, fix the remain code
 
</code>
===RawMidi API===
===RawMidi API===
- rawmidi_hw: add sanity check for the invalid stream arguments (coverity)
<code>
<code>
- rawmidi_hw: add sanity check for the invalid stream arguments (coverity)
- rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)
 
</code>
<code>
<code>
  - rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)
<code>
 
  Use proper reference counting for the dynamic symbol.</code>
  Use proper reference counting for the dynamic symbol.
 
</code>
===Topology API===
===Topology API===
- create separated libatopology library with the topology routines
<code>
<code>
- create separated libatopology library with the topology routines
- topology: Fix variable overflow in split_format
 
</code>
<code>
<code>
- topology: Fix variable overflow in split_format
 
  The 1 which was 32-bit long, when left-shifted by more than 31 caused
  an overflow, which resulted in some of the formats being not supported.
 
</code>
<code>
<code>
  - topology: add support to parse private data for pcm
  The 1 which was 32-bit long, when left-shifted by more than 31 caused
 
an overflow, which resulted in some of the formats being not supported.</code>
  We have private data section in struct snd_soc_tplg_pcm, but alsatplg
- topology: add support to parse private data for pcm
  doesn't support handling it yet, here add handling in tplg_parse_pcm()
  to enable it.
 
</code>
<code>
<code>
- topology: next round of coverity fixes
 
</code>
<code>
<code>
  - topology: various coverity fixes
  We have private data section in struct snd_soc_tplg_pcm, but alsatplg
 
doesn't support handling it yet, here add handling in tplg_parse_pcm()
</code>
to enable it.</code>
- topology: next round of coverity fixes
<code>
- topology: various coverity fixes
<code>
===Use Case Manager API===
===Use Case Manager API===
- ucm: add possibility to keep order of childs for If blocks
<code>
<code>
Because of the nature of the structured parser, it is not guaranteed
that the order of the parsed tree is equal to the lines in the source.
Add possibility to insert the If results before or after the selected
identifier like:
SectionDevice."Speaker" {
  ...
}
If.1 {
        Condition { ... }
        Before.SectionDevice "Speaker"
        True { ... }
}
If.2 {
        Condition { ... }
        After.SectionDevice "Speaker"
        True { ... }
}
If the "After" or "Before" identifiers are not found, the result is added
after the last entry in the block.</code>
- ucm: change the If block parsing
<code>
<code>
- ucm: add possibility to keep order of childs for If blocks
 
  Because of the nature of the structured parser, it is not guaranteed
  that the order of the parsed tree is equal to the lines in the source.
 
  Add possibility to insert the If results before or after the selected
  identifier like:
 
  SectionDevice."Speaker" {
    ...
  }
 
  If.1 {
          Condition { ... }
          Before.SectionDevice "Speaker"
          True { ... }
  }
  If.2 {
          Condition { ... }
          After.SectionDevice "Speaker"
          True { ... }
  }
 
  If the "After" or "Before" identifiers are not found, the result is added
  after the last entry in the block.
 
</code>
<code>
<code>
  - ucm: change the If block parsing
  - evaluate always If before the other blocks</code>
 
- ucm: docs: Add MinBufferLevel value
  - evaluate always If before the other blocks
<code>
</code>
<code>
Allows ucm to override minimum buffer level for platforms that
incorrectly report their buffer level.</code>
- ucm: docs: Add EDID File value
<code>
<code>
Add a sys path to the EDID file for the corresponding HDMI device so
userspace can use if needed</code>
- use-case header file: add more references to correct ASCII ID parsers for CTL/mixer IDs
<code>
- ucm: add snd_use_case_parse_selem_id()
<code>
<code>
and add strict ucm_id checks to snd_use_case_parse_ctl_elem_id()</code>
- ucm: add If.Condition.RegexMatch
<code>
<code>
If.1 {
        Condition {
                Type RegexMatch
                String "something to match"
                Regex ".*(thing)"
        }
        ...
}</code>
- ucm: add ${CardComponents} substitution to the value string processing
<code>
- ucm: evaluate nested If blocks also in True/False blocks
<code>
<code>
- ucm: docs: Add MinBufferLevel value
- ucm: add If.Condition.String to match strings and substrings
 
  Allows ucm to override minimum buffer level for platforms that
  incorrectly report their buffer level.
 
</code>
<code>
<code>
- ucm: docs: Add EDID File value
 
  Add a sys path to the EDID file for the corresponding HDMI device so
  userspace can use if needed
 
</code>
<code>
<code>
  - use-case header file: add more references to correct ASCII ID parsers for CTL/mixer IDs
  Case insensitive string match:
 
</code>
If.1 {
        Condition {
                Type String
                String1 "aa"
                String2 "bb"
        }
        True {
                ...
        }
}
Substring is present (case sensitive):
If.1 {
        Condition {
                Type String
                Haystack "White Horse"
                Needle "Horse"
        }
        True {
                ...
        }
}</code>
- ucm: add snd_use_case_parse_ctl_elem_id()
<code>
<code>
- ucm: add snd_use_case_parse_selem_id()
- ucm: add PlaybackCTL and CaptureCTL default values when they are not set
 
  and add strict ucm_id checks to snd_use_case_parse_ctl_elem_id()
 
</code>
<code>
<code>
- ucm: add If.Condition.RegexMatch
- ucm: small cosmetic uc_error change in execute_sequence()
 
  If.1 {
          Condition {
                  Type RegexMatch
                  String "something to match"
                  Regex ".*(thing)"
          }
          ...
  }
 
</code>
<code>
<code>
- ucm: add ${CardComponents} substitution to the value string processing
- ucm: add If condition block
 
</code>
<code>
<code>
- ucm: evaluate nested If blocks also in True/False blocks
 
</code>
<code>
<code>
  - ucm: add If.Condition.String to match strings and substrings
  The syntax is simple:
 
  Case insensitive string match:
If./any-if-identificator/ {
 
  Condition {
  If.1 {
    Type /type_here/
          Condition {
    /optional defines/
                  Type String
                  String1 "aa"
                  String2 "bb"
          }
          True {
                  ...
          }
   }
   }
    
   True {
  Substring is present (case sensitive):
    /block used when condition is evaluated as true/
 
  If.1 {
          Condition {
                  Type String
                  Haystack "White Horse"
                  Needle "Horse"
          }
          True {
                  ...
          }
   }
   }
    
   False {
</code>
    /block used when condition is evaluated as false/
  }
}
The Type "ControlExists" is implemented:
Condition {
  Type ControlExists
  Device "hw:${CardId}"
  Control "iface=CARD,name='Headphone Jack'"
}</code>
- ucm: do not cache all control devices in get_card_long_name()
<code>
<code>
- ucm: add snd_use_case_parse_ctl_elem_id()
- ucm: parser - use less memory for integer/real values in parse_value()
 
</code>
<code>
<code>
- ucm: add PlaybackCTL and CaptureCTL default values when they are not set
- ucm: save the whole ctl info to the ctl_list structure
 
</code>
<code>
<code>
- ucm: small cosmetic uc_error change in execute_sequence()
- ucm: add the run-time variable substitution
 
</code>
<code>
<code>
- ucm: add If condition block
 
  The syntax is simple:
 
  If./any-if-identificator/ {
    Condition {
      Type /type_here/
      /optional defines/
    }
    True {
      /block used when condition is evaluated as true/
    }
    False {
      /block used when condition is evaluated as false/
    }
  }
 
  The Type "ControlExists" is implemented:
 
  Condition {
    Type ControlExists
    Device "hw:${CardId}"
    Control "iface=CARD,name='Headphone Jack'"
  }
 
</code>
<code>
<code>
  - ucm: do not cache all control devices in get_card_long_name()
  Those two variables are supported:
    
</code>
  ${ConfName}      - configuration file name
  ${CardId}        - card identification string (like PCH)
  ${CardName}      - card name (driver)
   ${CardLongName}  - card long name (driver)
  ${env:ENV_NAME}  - returns the environment variable ENV_NAME</code>
- ucm: fix memory leaks for cdev, bin-file and tlv elements
<code>
<code>
- ucm: parser - use less memory for integer/real values in parse_value()
- ucm: do not report failure when long name configuration does not exist
 
</code>
<code>
<code>
- ucm: save the whole ctl info to the ctl_list structure
- ucm: add support for multiple control devices, more aggresive caching
 
</code>
<code>
<code>
- ucm: add the run-time variable substitution
- ucm: extend snd_use_case_mgr_open() to address the sound card directly
 
  Those two variables are supported:
 
    ${ConfName}      - configuration file name
    ${CardId}        - card identification string (like PCH)
    ${CardName}      - card name (driver)
    ${CardLongName}  - card long name (driver)
    ${env:ENV_NAME}  - returns the environment variable ENV_NAME
 
</code>
<code>
<code>
- ucm: fix memory leaks for cdev, bin-file and tlv elements
 
</code>
<code>
<code>
  - ucm: do not report failure when long name configuration does not exist
  Some clients like pulseaudio wants to access the multiple instances
 
of sound cards. This patch adds prefixes like "hw:" to the card_name
</code>
argument to handle this. The card index (value) or card identification
(string) can be used for this prefix.
Also the prefix "strict:" was added to avoid the driver name and
driver long name matching. It might be useable for use case
configurations which are not bound to the one sound card.</code>
- ucm: switch to ucm2 directory and v2 format, keep backward compatibility
<code>
<code>
- ucm: add support for multiple control devices, more aggresive caching
- conf: improve the include paths code
 
</code>
<code>
<code>
- ucm: extend snd_use_case_mgr_open() to address the sound card directly
 
  Some clients like pulseaudio wants to access the multiple instances
  of sound cards. This patch adds prefixes like "hw:" to the card_name
  argument to handle this. The card index (value) or card identification
  (string) can be used for this prefix.
 
  Also the prefix "strict:" was added to avoid the driver name and
  driver long name matching. It might be useable for use case
  configurations which are not bound to the one sound card.
 
</code>
<code>
<code>
  - ucm: switch to ucm2 directory and v2 format, keep backward compatibility
  - various cleanups (more straight code and allocations)
    
- do not add the base config path /usr/share/alsa to the
</code>
   explicit include list of directories
  (it's not wanted for ucm configs)</code>
- ucm: parse_verb_file() - remove folder_name variable and extra logic
<code>
<code>
- conf: improve the include paths code
 
  - various cleanups (more straight code and allocations)
  - do not add the base config path /usr/share/alsa to the
    explicit include list of directories
    (it's not wanted for ucm configs)
 
</code>
<code>
<code>
  - ucm: parse_verb_file() - remove folder_name variable and extra logic
  The member uc_mgr-&gt;conf_file_name already contains the used directory
 
name.</code>
  The member uc_mgr-&gt;conf_file_name already contains the used directory
- ucm: fix uc_mgr_scan_master_configs() - skip correctly component directories
  name.
 
</code>
<code>
<code>
- ucm: fix uc_mgr_scan_master_configs() - skip correctly component directories
- ucm: cosmetic fix in get_card_long_name()
 
</code>
<code>
<code>
- ucm: cosmetic fix in get_card_long_name()
- ucm: another coverity fix in uc_mgr_config_load()
 
</code>
<code>
<code>
- ucm: another coverity fix in uc_mgr_config_load()
- ucm: coverity fixes
</code>
<code>
<code>
- ucm: coverity fixes
 
</code>
===/Makefile.am===
===/Makefile.am===
- create separated libatopology library with the topology routines
<code>
<code>
- create separated libatopology library with the topology routines
 
</code>
===/src/Makefile.am===
===/src/Makefile.am===
- create separated libatopology library with the topology routines
<code>
<code>
- create separated libatopology library with the topology routines
 
</code>
===ALSA Server===
===ALSA Server===
- Use __func__ instead of __FUNCTION__
<code>
<code>
<code>
  - Use __func__ instead of __FUNCTION__
  They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
 
for backwards compatibility with old gcc versions.</code>
  They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
- aserver: fix resource leak coverity
  for backwards compatibility with old gcc versions.
 
</code>
<code>
<code>
- aserver: fix resource leak coverity
 
</code>
===Configuration===
===Configuration===
- conf: implement snd_config_add_before() and snd_config_add_after()
<code>
<code>
- conf: implement snd_config_add_before() and snd_config_add_after()
- topology: remove configuration files (moved to alsa-topology-conf repository)
 
</code>
<code>
<code>
- topology: remove configuration files (moved to alsa-topology-conf repository)
- ucm: remove configuration files (moved to alsa-ucm-conf repository)
 
</code>
<code>
<code>
- ucm: remove configuration files (moved to alsa-ucm-conf repository)
- conf: improve the include paths code
 
</code>
<code>
<code>
- conf: improve the include paths code
 
  - various cleanups (more straight code and allocations)
  - do not add the base config path /usr/share/alsa to the
    explicit include list of directories
    (it's not wanted for ucm configs)
 
</code>
<code>
<code>
  - conf: List cases in range explicitly
  - various cleanups (more straight code and allocations)
 
- do not add the base config path /usr/share/alsa to the
   Case ranges are a GNU extension, and provide only a slight readability
   explicit include list of directories
  improvement.
   (it's not wanted for ucm configs)</code>
    
- conf: List cases in range explicitly
</code>
<code>
<code>
- config: parse_string() fix the dynamic buffer allocation failure code (coverity)
 
</code>
<code>
<code>
  - src/conf.c: add missing va_end() call (coverity)
  Case ranges are a GNU extension, and provide only a slight readability
 
improvement.</code>
</code>
- config: parse_string() fix the dynamic buffer allocation failure code (coverity)
<code>
<code>
- ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles
- src/conf.c: add missing va_end() call (coverity)
 
<code>
  Adding a new Conexant CX2072X codec profile and reusing the existing
- ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles
  BYT/CHT platform snippets.
<code>
 
<code>
  Currently tested only on ASUS E200HA laptop.
Adding a new Conexant CX2072X codec profile and reusing the existing
 
BYT/CHT platform snippets.
</code>
Currently tested only on ASUS E200HA laptop.</code>
===Dynamic Loader helpers===
===Dynamic Loader helpers===
- rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)
<code>
<code>
  - rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)
<code>
 
  Use proper reference counting for the dynamic symbol.</code>
  Use proper reference counting for the dynamic symbol.
 
</code>
===Utils===
===Utils===
- create separated libatopology library with the topology routines
<code>
<code>
- create separated libatopology library with the topology routines
 
</code>
==alsa-utils==
==alsa-utils==
===Core===
===Core===
- Release v1.2.1
<code>
<code>
- Release v1.2.1
 
</code>
===Audio Transfer utility===
===Audio Transfer utility===
- axfer: handle -ETIMEDOUT before non-block I/O operation
<code>
<code>
- axfer: handle -ETIMEDOUT before non-block I/O operation
 
  When running for IRQ-based scheduling model, transmission backend is
  expected to queue PCM event in different context from the main thread.
  When queueing no events during time equivalent to one period of PCM
  buffer, the backend has problems.
 
  This commit outputs report it for non-blocking operation for IRQ-based
  scheduling model. The timeout is equivalent to all frames in buffer,
  instead of period for safe.
 
</code>
<code>
<code>
  - axfer: code refactoring for a helper function to wait for avail buffer space
  When running for IRQ-based scheduling model, transmission backend is
 
expected to queue PCM event in different context from the main thread.
  This commit applies code refactoring for waiting PCM event queued
When queueing no events during time equivalent to one period of PCM
  per period of PCM buffer in copying operation for IRQ-based scheduling
buffer, the backend has problems.
  model.
 
This commit outputs report it for non-blocking operation for IRQ-based
</code>
scheduling model. The timeout is equivalent to all frames in buffer,
instead of period for safe.</code>
- axfer: code refactoring for a helper function to wait for avail buffer space
<code>
<code>
- axfer: handle -ETIMEDOUT before handle mmap I/O operation
 
  When running for IRQ-based scheduling model, transmission backend is
  expected to queue PCM event in different context from the main thread.
  When queueing no events during time equivalent to one period of PCM
  buffer, the backend has problems.
 
  This commit outputs report it for mmap operation for IRQ-based
  scheduling model. The timeout is equivalent to all frames in buffer,
  instead of period for safe.
 
</code>
<code>
<code>
  - axfer: return ETIMEDOUT when no event occurs after waiter expiration
  This commit applies code refactoring for waiting PCM event queued
 
per period of PCM buffer in copying operation for IRQ-based scheduling
  Although the waiter abstraction handles timeout as success, it should
model.</code>
  report for callers to know timeout.
- axfer: handle -ETIMEDOUT before handle mmap I/O operation
 
  This commit takes the waiter to return -ETIMEDOUT when timeout expires.
 
</code>
<code>
<code>
- axfer: fix to return error code when a call of select(2) fails
 
  A call of select(2) returns negative code and report errors via errno
  local variable, howver current waiter implementation for select(2)
  returns the negative code instead of errno.
 
  This commit fixes it.
 
</code>
<code>
<code>
  - axfer: return the number of file descriptors for I/O events from select(2) waiter
  When running for IRQ-based scheduling model, transmission backend is
 
expected to queue PCM event in different context from the main thread.
  A call of select(2) returns error code at failure, the number of file
When queueing no events during time equivalent to one period of PCM
  descriptors available I/O at success. Current implementation of
buffer, the backend has problems.
  waiter abstraction for select(2) returns 0 at success and callers
  can't get the number.
This commit outputs report it for mmap operation for IRQ-based
 
scheduling model. The timeout is equivalent to all frames in buffer,
  This commit fixes it.
instead of period for safe.</code>
 
- axfer: return ETIMEDOUT when no event occurs after waiter expiration
</code>
<code>
<code>
- axfer: test: fix invalid comparison of 64 bit storage in ILP32 data type
 
  In system V ABIs with ILP32 data model, bit shift for '1ul' can brings
  undefined behaviour when the calculation result is over 32 bit width.
 
  This commit fixes the bug.
 
  Reported-by: Rolf Eike Beer &lt;eike@sf-mail.de&gt;
  Reference: https://bugs.gentoo.org/681652
  Reference: https://github.com/alsa-project/alsa-utils/issues/23
</code>
<code>
<code>
  - axfer: mapper: fix parameter check for demuxer
  Although the waiter abstraction handles timeout as success, it should
 
report for callers to know timeout.
  Each container should be configured to store one saple per frame in
  demuxer case. This commit fixes the bug.
This commit takes the waiter to return -ETIMEDOUT when timeout expires.</code>
 
- axfer: fix to return error code when a call of select(2) fails
  Fixes: 25c8e3bebb53 ('axfer: add support for a mapper for multiple target')
<code>
</code>
<code>
A call of select(2) returns negative code and report errors via errno
local variable, howver current waiter implementation for select(2)
returns the negative code instead of errno.
This commit fixes it.</code>
- axfer: return the number of file descriptors for I/O events from select(2) waiter
<code>
<code>
A call of select(2) returns error code at failure, the number of file
descriptors available I/O at success. Current implementation of
waiter abstraction for select(2) returns 0 at success and callers
can't get the number.
This commit fixes it.</code>
- axfer: test: fix invalid comparison of 64 bit storage in ILP32 data type
<code>
<code>
In system V ABIs with ILP32 data model, bit shift for '1ul' can brings
undefined behaviour when the calculation result is over 32 bit width.
This commit fixes the bug.
Reference: https://bugs.gentoo.org/681652
Reference: https://github.com/alsa-project/alsa-utils/issues/23</code>
- axfer: mapper: fix parameter check for demuxer
<code>
<code>
Each container should be configured to store one saple per frame in
demuxer case. This commit fixes the bug.</code>
- axfer: remove unused variable warnings
<code>
<code>
- axfer: remove unused variable warnings
 
</code>
===alsamixer===
===alsamixer===
- alsamixer: Remove exp10 usage
<code>
<code>
  - alsamixer: Remove exp10 usage
<code>
 
  exp10 is a GNU extension and not available everywhere (eg. uClibc-ng).</code>
  exp10 is a GNU extension and not available everywhere (eg. uClibc-ng).
 
</code>
===alsatplg (topology)===
===alsatplg (topology)===
- alsaucm, topology: LDADD cleanups and add support for libatopology
<code>
<code>
- alsaucm, topology: LDADD cleanups and add support for libatopology
 
</code>
===alsaucm===
===alsaucm===
- alsaucm: fix the implicit card open
<code>
<code>
- alsaucm: fix the implicit card open
- alsaucm, topology: LDADD cleanups and add support for libatopology
 
</code>
<code>
<code>
- alsaucm, topology: LDADD cleanups and add support for libatopology
- alsaucm: do the implicit ucm open only when the command requires it
 
</code>
<code>
<code>
- alsaucm: do the implicit ucm open only when the command requires it
- alsaucm: call snd_config_update_free_global() to make valgrind more happy
 
</code>
<code>
<code>
- alsaucm: call snd_config_update_free_global() to make valgrind more happy
 
</code>
===amixer===
===amixer===
- amixer: do not double LF for container type
<code>
<code>
- amixer: do not double LF for container type
 
</code>
===aplay/arecord===
===aplay/arecord===
- aplay: fix memory leak when setup_chmap() fail
<code>
<code>
  - aplay: fix memory leak when setup_chmap() fail
<code>
 
  setup_chmap() will return with error number if hw_map calloc fail or
  setup_chmap() will return with error number if hw_map calloc fail or
channels doesn't match with hw_params, but memory free was ignored when
  channels doesn't match with hw_params, but memory free was ignored when
error occurs.</code>
  error occurs.
 
  Reviewed-by: Takashi Sakamoto o-takashi@sakamocchi.jp
</code>
==alsa-plugins==
==alsa-plugins==
===Core===
===Core===
- Release v1.2.1
<code>
<code>
- Release v1.2.1
 
</code>
===PulseAudio -&gt; ALSA plugin===
===PulseAudio -&gt; ALSA plugin===
- pulse: Add DEVICE parameter
<code>
<code>
  - pulse: Add DEVICE parameter
<code>
 
  Basically this patch adds the DEVICE parameter to pulse PCM and
  Basically this patch adds the DEVICE parameter to pulse PCM and
control plugins, so that users may pass the specific pulse device
  control plugins, so that users may pass the specific pulse device
for multiple opens.  Along with the addition of the DEVICE parameter
  for multiple opens.  Along with the addition of the DEVICE parameter
in the config definition, the plugin code is slightly modified for
  in the config definition, the plugin code is slightly modified for
allowing to receive the empty strings that are treated as the
  allowing to receive the empty strings that are treated as the
"default" mode (= NULL).</code>
  "default" mode (= NULL).
 
</code>
=Detailed changelog between 0.0.0 and 1.2.1 releases=
=Detailed changelog between 0.0.0 and 1.2.1 releases=
=Changelog between 1.0.29 and 1.2.1 releases=
=Changelog between 1.0.29 and 1.2.1 releases=
==alsa-ucm-conf==
==alsa-ucm-conf==
===Configuration===
===Configuration===
- sof-hda-dsp: add MixerId values, change order for BassSpeaker
<code>
<code>
- do not set the speaker volume for the BassSpeaker
- do not set ConflictingDevice for HeadphoneMic
  (one way should be enough in DigitalMic)</code>
- add ucm/README.md and ucm2/README.md
<code>
- VEYRON-I2S: adapt to ucm2
<code>
- skylake-rt286: adapt to ucm2
<code>
- SDP4430: adapt to ucm2
<code>
- PAZ00: adapt to ucm2
<code>
- PandaBoardES: adapt to ucm2
<code>
- PandaBoard: adapt to ucm2
<code>
- HDAudio-Lenovo-DualCodecs: adapt to ucm2
<code>
- HDAudio-Gigabyte-ALC1220DualCodecs: adapt to ucm2
<code>
- GoogleNyan: adapt to ucm2
<code>
- Dell-WD15-Dock: adapt to ucm2
<code>
- DB820c: adapt to ucm2
<code>
- DB410c: adapt to ucm2
<code>
- DAISY-I2S: adapt to ucm2
<code>
- broxton-rt298: adapt to ucm2
<code>
- broadwell-rt286: adapt to ucm2
<code>
- sof-hda-dsp: adapt to latest alsa-lib
<code>
<code>
- move to ucm2
- add 'Syntax 2' to the main configuration files
- use condition for 'Headphone Jack' / 'Headphone Mic Jack' selection
- remove cdev (not required)
- use ${CardId} where appropriate
- merge config for Lenovo Carbon X1 7th gen to main HiFi.conf</code>
- sof-hda-dsp: the JackHWMute definition should be in the Headphone device
<code>
- sof-hda-dsp: fix the volume/switch values in HiFi
<code>
- sof-hda-dsp: add ValueDefaults sections with correct CTL devices
<code>
- sof-hda-dsp: do not touch the analog part for HDMI/DP
<code>
- sof-hda-dsp: use more user friendly names for Dmic
<code>
<code>
Also correct the names in ConflictingDevice sections
(must be device name - not comment text).</code>
- sof-hda-dsp: Fix the Hdmi config for the Lenovo Carbon X1 (7th gen)
<code>
- sof-hda-dsp: improve the Hdmi use case comment
<code>
- sof-hda-dsp: fix the capture device names (use sofhdadsp)
<code>
- SOF/HDA/SKL UCM: rename from sof-skl_hda_card to sof-hda-dsp
<code>
<code>
Follow the kernel change and rename everything to more clear
sof-hda-dsp.</code>
- sof-skl_hda: change to use common HDMI codec driver
<code>
<code>
Modify UCM sequences to use user-space interface of the common
HDMI codec driver. Use of hdac-hdmi driver is no longer supported
by this UCM file.
To use this UCM file, kernel must be compiled with
SND_SOC_SOF_HDA_COMMON_HDMI_CODEC</code>
- sof-skl_hda: move hdmi as separate use case
<code>
<code>
Move hdmi definitions as separate use case and conf file. This will
enable Pulseaudio to create separate profile for hdmi and make routing
much more fluent than with single profile.</code>
- sof-skl_hda: add PlaybackVolume and CaptureVolume definitions
<code>
<code>
PlaybackVolume and CaptureVolume are not defined currently and these are
needed in the future for example with Pulseaudio to enable hardware
volume control.</code>
- sof-skl_hda: add device definition to speaker disable sequence
<code>
<code>
For example Pulseaudio is not able to run the disable sequence
if the device is not defined. So add the definition.</code>
- sof-skl_hda: remove volume setting in enable/disable sequences
<code>
<code>
If the volume setting is defined in enable sequence you will
always get that exact volume when switching outputs in some
user space software like Pulseaudio. Pulseaudio will itself
keep track of the volume previously set.</code>
- skylake-rt298: cleanups, add .conf suffixes
<code>
- broxton-rt298: cleanups, add .conf suffixes
<code>
- kblrt5660: cleanups, add .conf suffixes
<code>
- broadwell-rt286: cleanups, add .conf suffixes
<code>
<code>
- sof-hda-dsp: add MixerId values, change order for BassSpeaker
- DB410c: cleanups, add .conf suffixes
 
  - do not set the speaker volume for the BassSpeaker
  - do not set ConflictingDevice for HeadphoneMic
    (one way should be enough in DigitalMic)
 
</code>
<code>
<code>
- add ucm/README.md and ucm2/README.md
- DB820c: cleanups, add .conf suffixes
 
</code>
<code>
<code>
- VEYRON-I2S: adapt to ucm2
- SDP4430: cleanups, add .conf suffixes, upper/lower case
 
</code>
<code>
<code>
- skylake-rt286: adapt to ucm2
- PandaBoardES: cleanups, add .conf suffixes, upper/lower case
 
</code>
<code>
<code>
- SDP4430: adapt to ucm2
- PandaBoard: cleanups, add .conf suffixes, upper/lower case
 
</code>
<code>
<code>
- PAZ00: adapt to ucm2
- add configuration for Lenovo ThinkPad Carbon X1 7th gen (Bass Speaker)
 
</code>
<code>
<code>
- PandaBoardES: adapt to ucm2
- remove 'Bass Speaker' from the generic sof_skl_hda-card config
 
</code>
<code>
<code>
- PandaBoard: adapt to ucm2
- Add initial support for generic SOF Skylake driver (DMIC)
 
</code>
<code>
<code>
- HDAudio-Lenovo-DualCodecs: adapt to ucm2
 
</code>
<code>
<code>
  - HDAudio-Gigabyte-ALC1220DualCodecs: adapt to ucm2
  Based on: https://github.com/RanderWang/intel-UCM/tree/hdmi/sof-skl_hda_card
 
</code>
Cleanups, remove commented or empty configuration.</code>
- conf/ucm: cht-bsw-rt5672: Add board specific profile for Lenovo Thinkpad 8 tablet
<code>
<code>
- GoogleNyan: adapt to ucm2
 
</code>
<code>
<code>
  - Dell-WD15-Dock: adapt to ucm2
  The Lenovo Thinkpad 8 tablet has stereo speakers and its internal DMIC
 
on DMIC1, at a device specific profile for this.</code>
</code>
- conf/ucm: Add UCM profile for cht-bsw-rt5672 boards
<code>
<code>
- DB820c: adapt to ucm2
 
</code>
<code>
<code>
  - DB410c: adapt to ucm2
  Add an UCM profile for Intel boards with a RT5672 codec.
 
</code>
Re-use the existing platform enable and disable sequences for BYT/CHT SST
support and add a codecs/rt5672 dir with codec specific enable / disable
sequences for the various inputs and outputs.
This is partly based on earlier work done here:
https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672</code>
- ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles
<code>
<code>
- DAISY-I2S: adapt to ucm2
 
</code>
<code>
<code>
  - broxton-rt298: adapt to ucm2
  Adding a new Conexant CX2072X codec profile and reusing the existing
 
BYT/CHT platform snippets.
</code>
Currently tested only on ASUS E200HA laptop.</code>
- ucm: bytcr/PlatformEnableSeq.conf update some comments
<code>
<code>
- broadwell-rt286: adapt to ucm2
 
</code>
<code>
<code>
  - sof-hda-dsp: adapt to latest alsa-lib
  Commit f91cc3c7d6b7 ("Update chtrt5645 ucm variants to use
 
bytcr/PlatformEnableSeq.conf component") updated the
  - move to ucm2
following 2 comments:
  - add 'Syntax 2' to the main configuration files
  - use condition for 'Headphone Jack' / 'Headphone Mic Jack' selection
  # codec0_out settings (used if SSP2 is connected to aif1)
  - remove cdev (not required)
  # modem_out settings (used if SSP0 is connected to aif2)
  - use ${CardId} where appropriate
  - merge config for Lenovo Carbon X1 7th gen to main HiFi.conf
Specifically it added the " to aif1" resp. " to aif2" part of the comments.
 
</code>
This is not correct, AIF1 / AIF2 are something which is present on
Realtek codecs only, and either one can be used indepedent of
SSP0 or SSP2 being used (the comments in the chtrt5645 UCM profile
before this change were wrong / outdated).
Besides there not being any relationship between SSP0 or SSP2 being
used, bytcr/PlatformEnableSeq.conf is also used with other codecs,
e.g. the ESS8316 codec where this is not applicable at all.
Therefor this commit removes the " to aif?" part of the comments again
to avoid confusing people reading this in the future.</code>
- ucm: Add ucm files for DB820c board
<code>
<code>
- sof-hda-dsp: the JackHWMute definition should be in the Headphone device
 
</code>
<code>
<code>
  - sof-hda-dsp: fix the volume/switch values in HiFi
  DB820c board is based of MSM8996 Qualcomm SoC, which has support for both
 
Digital and Analog audio. Digital audio is over HDMI and analog is over
</code>
WCD9335 codec via SLIMbus.
Board itself has HDMI port, a 3.5mm audio Jack and an Audio expansion
connector.
This patch adds support for HDMI port and 3.5mm jack.</code>
- Revert "conf/ucm: Add a UCM profile for Dell WD19 Dock USB-audio"
<code>
<code>
- sof-hda-dsp: add ValueDefaults sections with correct CTL devices
 
</code>
<code>
<code>
  - sof-hda-dsp: do not touch the analog part for HDMI/DP
  This reverts commit 914327e00b7626b1acd176d498f35f7b4e213dd3 .
 
</code>
The USB driver defines identical profile as for WD15.</code>
- conf/ucm: Add a UCM profile for Dell WD19 Dock USB-audio
<code>
<code>
- sof-hda-dsp: use more user friendly names for Dmic
 
  Also correct the names in ConflictingDevice sections
  (must be device name - not comment text).
 
</code>
<code>
<code>
  - sof-hda-dsp: Fix the Hdmi config for the Lenovo Carbon X1 (7th gen)
  USB-audio device on Dell WD19 docking station provides two individual
 
output PCM streams, one for headphone Jack and another for speaker out
</code>
Jack. A UCM profile gives the proper roles for these.</code>
- conf/ucm: bytcht-es8316: Add long-name UCM profiles
<code>
<code>
- sof-hda-dsp: improve the Hdmi use case comment
 
</code>
<code>
<code>
  - sof-hda-dsp: fix the capture device names (use sofhdadsp)
  After recent kernel work, the kernel now sets a long-name for bytcht-es8316
 
boards which indicates if a single (mono) speaker or stereo speakers are
</code>
used and if in1 or in2 is used for the internal mic (the headset mic will
be on the other input).
This commit adds UCM profiles for bytcht-es8316 boards using these new
long-names, based on the generic bytcht-es8316 profile.</code>
- conf/ucm: Add UCM profile for bytcht-es8316 boards
<code>
<code>
- SOF/HDA/SKL UCM: rename from sof-skl_hda_card to sof-hda-dsp
 
  Follow the kernel change and rename everything to more clear
  sof-hda-dsp.
 
</code>
<code>
<code>
  - sof-skl_hda: change to use common HDMI codec driver
  Add an UCM profile for Bay Trail and Cherry Trail boards with an
 
ES8316 codec.
  Modify UCM sequences to use user-space interface of the common
  HDMI codec driver. Use of hdac-hdmi driver is no longer supported
Re-use the existing platform enable and disable sequences for BYT/CHT SST
  by this UCM file.
support and add a codecs/es8316 dir with codec specific enable / disable
 
sequences for the various inputs and outputs.</code>
  To use this UCM file, kernel must be compiled with
- Create device component for rt5645 Internal Analog Mic UCM
  SND_SOC_SOF_HDA_COMMON_HDMI_CODEC
 
</code>
<code>
<code>
- sof-skl_hda: move hdmi as separate use case
 
  Move hdmi definitions as separate use case and conf file. This will
  enable Pulseaudio to create separate profile for hdmi and make routing
  much more fluent than with single profile.
 
</code>
<code>
<code>
  - sof-skl_hda: add PlaybackVolume and CaptureVolume definitions
  Since the Internal Analog Microphone device configuration is
 
identical for the rt5645 and rt5645 mono speaker UCMs, move
  PlaybackVolume and CaptureVolume are not defined currently and these are
the entire definition to a component.</code>
  needed in the future for example with Pulseaudio to enable hardware
- Factor out rt5645 variants Headset+Digital Mic UCM shared {en,dis}able sequences
  volume control.
 
</code>
<code>
<code>
- sof-skl_hda: add device definition to speaker disable sequence
- Factor out rt5645 variants Speaker+Headphones shared UCM enable sequences
 
  For example Pulseaudio is not able to run the disable sequence
  if the device is not defined. So add the definition.
 
</code>
<code>
<code>
- sof-skl_hda: remove volume setting in enable/disable sequences
 
  If the volume setting is defined in enable sequence you will
  always get that exact volume when switching outputs in some
  user space software like Pulseaudio. Pulseaudio will itself
  keep track of the volume previously set.
 
</code>
<code>
<code>
  - skylake-rt298: cleanups, add .conf suffixes
  Move common enable sequences for rt5645 variants and rt5650
 
UCM configurations into a shared component. The corresponding
</code>
disable sequences are only two lines each and do not seem worth
creating components for.</code>
- Create shared {En,Dis}ableSeq.conf components for rt5645 variants
<code>
<code>
- broxton-rt298: cleanups, add .conf suffixes
 
</code>
<code>
<code>
  - kblrt5660: cleanups, add .conf suffixes
  Factor out the common enable and disable sequences used
 
in rt5645 variants, including the rt5650. Move the sequences
</code>
into a new component directory codecs/rt5645/ along with
a Makefile.
Some lines like
    cset "name='Stereo1 ADC1 Mux' 1"
and
    cset "name='I2S2 Func Switch' on"
are not set set in the chtrt5650 UCM sequences and thus are not present
in the new component, in order to maximize reuse.</code>
- Update chtrt5645 ucm variants to use bytcr/PlatformEnableSeq.conf component
<code>
<code>
- broadwell-rt286: cleanups, add .conf suffixes
 
</code>
<code>
<code>
  - DB410c: cleanups, add .conf suffixes
  The Lenovo Ideapad Miix 320, Asus T100HA, and chtrt5645 mono variant
 
UCM configurations have not been updated to make use of the shared
</code>
bytcr/PlatfromEnableSeq.conf sequence. This commit deletes those
command sequences and loads the shared component directly.</code>
- conf/ucm: bytcr-rt5651: Document mono speaker wiring
<code>
<code>
- DB820c: cleanups, add .conf suffixes
 
</code>
<code>
<code>
  - SDP4430: cleanups, add .conf suffixes, upper/lower case
  During my recent work on the bytcht-es8316 UCM profile I realized that the
 
bytcr-rt5651 devices with a single speaker use a differential setup just
</code>
like the es8316 does. The tell-tale here is the speaker going quiet when
playing the exact same sound on both channels when things are configured
for stereo speakers.
I've run some tests and the rt5651 does have a special mono balanced out
mode for its line-out but using this results in the same sound (and the
same loudness / volume of the sound) as our current solution, so adding
support for this to the kernel buys us nothing.
This commit makes no changes, it just documents my findings in a big
comment for future reference.</code>
- conf/ucm: bytcr-rt5651: Add bytcr-rt5651-stereo-spk-dmic-mic config
<code>
<code>
- PandaBoardES: cleanups, add .conf suffixes, upper/lower case
 
</code>
<code>
<code>
  - PandaBoard: cleanups, add .conf suffixes, upper/lower case
  Add a config for boards which use a digital mic as internal mic,
 
combined with having the headset mic on in2.
</code>
An example of such a board is the Point of View TAB-P1006W-232 (v1.0) tablet.</code>
- conf/ucm: bytcr-rt5651: Add digital mic support
<code>
<code>
- add configuration for Lenovo ThinkPad Carbon X1 7th gen (Bass Speaker)
 
</code>
<code>
<code>
  - remove 'Bass Speaker' from the generic sof_skl_hda-card config
  Add a new ucm/codecs/rt5651/DigitalMic.conf snippet for digital mic support
 
and include this in the default non board-specific bytcr-rt5651.conf.</code>
</code>
- conf/ucm: bytcr-rt5651: Add support for a headset-mic on IN2
<code>
<code>
- Add initial support for generic SOF Skylake driver (DMIC)
 
  Based on: https://github.com/RanderWang/intel-UCM/tree/hdmi/sof-skl_hda_card
 
  Cleanups, remove commented or empty configuration.
 
</code>
<code>
<code>
  - conf/ucm: cht-bsw-rt5672: Add board specific profile for Lenovo Thinkpad 8 tablet
  The first design with the headset-mic on IN2 rather then the
 
default / reference-design IN3 has shown up.
  The Lenovo Thinkpad 8 tablet has stereo speakers and its internal DMIC
  on DMIC1, at a device specific profile for this.
Add a new ucm/codecs/rt5651/IN2-HeadsetMic.conf snippet to deal with this
 
and include this in the default non board-specific bytcr-rt5651.conf.</code>
</code>
- conf/ucm: bytcr-rt5651: Enable Stereo? ADC MIXL ADC? switches when enabling inputs
<code>
<code>
- conf/ucm: Add UCM profile for cht-bsw-rt5672 boards
 
  Add an UCM profile for Intel boards with a RT5672 codec.
 
  Re-use the existing platform enable and disable sequences for BYT/CHT SST
  support and add a codecs/rt5672 dir with codec specific enable / disable
  sequences for the various inputs and outputs.
 
  This is partly based on earlier work done here:
  https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672
 
</code>
<code>
<code>
  - ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles
  Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input,
 
rather then just enabling them all in ucm/codecs/rt5651/EnableSeq.conf .
  Adding a new Conexant CX2072X codec profile and reusing the existing
  BYT/CHT platform snippets.
This is a preparation patch for adding digital mic support.</code>
 
- conf/ucm: kblrt5660: Add ucm setting for Dell Edge IoT platform
  Currently tested only on ASUS E200HA laptop.
 
</code>
<code>
<code>
- ucm: bytcr/PlatformEnableSeq.conf update some comments
 
  Commit f91cc3c7d6b7 ("Update chtrt5645 ucm variants to use
  bytcr/PlatformEnableSeq.conf component") updated the
  following 2 comments:
 
    # codec0_out settings (used if SSP2 is connected to aif1)
    # modem_out settings (used if SSP0 is connected to aif2)
 
  Specifically it added the " to aif1" resp. " to aif2" part of the comments.
 
  This is not correct, AIF1 / AIF2 are something which is present on
  Realtek codecs only, and either one can be used indepedent of
  SSP0 or SSP2 being used (the comments in the chtrt5645 UCM profile
  before this change were wrong / outdated).
 
  Besides there not being any relationship between SSP0 or SSP2 being
  used, bytcr/PlatformEnableSeq.conf is also used with other codecs,
  e.g. the ESS8316 codec where this is not applicable at all.
 
  Therefor this commit removes the " to aif?" part of the comments again
  to avoid confusing people reading this in the future.
 
</code>
<code>
<code>
  - ucm: Add ucm files for DB820c board
  The new generation of Dell Edge IoT platform is based on Intel
 
Kabylake platform, and the audio codec is ALC3277 which is 100%
  DB820c board is based of MSM8996 Qualcomm SoC, which has support for both
compatible with RT5660 in I2S mode.
  Digital and Analog audio. Digital audio is over HDMI and analog is over
  WCD9335 codec via SLIMbus.
The audio design on this IoT platform is as below:
 
  - Intel kabylake platform
  Board itself has HDMI port, a 3.5mm audio Jack and an Audio expansion
  - connect the codec ALC3277 via SSP0
  connector.
  - line-out and line-in with Micbias jacks
  This patch adds support for HDMI port and 3.5mm jack.
  - line-out mute control and jack detection of line-out and line-in
 
  - two HDMI ports with audio capability</code>
</code>
- conf/ucm: chtrt5650: Add UCM config for chtrt5650
<code>
<code>
- Revert "conf/ucm: Add a UCM profile for Dell WD19 Dock USB-audio"
 
  This reverts commit 914327e00b7626b1acd176d498f35f7b4e213dd3 .
 
  The USB driver defines identical profile as for WD15.
 
</code>
<code>
<code>
  - conf/ucm: Add a UCM profile for Dell WD19 Dock USB-audio
  Add a UCM configuration for the rt5650 codec. Tested on
 
a Samsung Chromebook 3. Adapted with minor modifications
  USB-audio device on Dell WD19 docking station provides two individual
from GitHub user evan-a-a's gist:
  output PCM streams, one for headphone Jack and another for speaker out
https://gist.github.com/evan-a-a/86b2a698708074530e2d0ee7c6498767</code>
  Jack. A UCM profile gives the proper roles for these.
- ucm: Set default include path
 
</code>
<code>
<code>
- conf/ucm: bytcht-es8316: Add long-name UCM profiles
 
  After recent kernel work, the kernel now sets a long-name for bytcht-es8316
  boards which indicates if a single (mono) speaker or stereo speakers are
  used and if in1 or in2 is used for the internal mic (the headset mic will
  be on the other input).
 
  This commit adds UCM profiles for bytcht-es8316 boards using these new
  long-names, based on the generic bytcht-es8316 profile.
 
</code>
<code>
<code>
  - conf/ucm: Add UCM profile for bytcht-es8316 boards
  Many UCM profiles include the UCM profile components under ucm/*
 
subdirectories and thusly put &lt;searchdir:ucm&gt; at each place.  This is
  Add an UCM profile for Bay Trail and Cherry Trail boards with an
rather cumbersome.
  ES8316 codec.
 
This patch makes the UCM parser to set the default include path, so
  Re-use the existing platform enable and disable sequences for BYT/CHT SST
that each profile no longer needs to set searchdir.  All the
  support and add a codecs/es8316 dir with codec specific enable / disable
&lt;searchdir:ucm&gt; lines currently found in the profiles are removed
  sequences for the various inputs and outputs.
gracefully, too.
 
</code>
For the needed implementation, a new helper,
_snd_config_load_with_include() is introduced.  It's not exported,
only for the use inside alsa-lib.</code>
- conf: Move UCM profile snippets into components subdirectory
<code>
<code>
- Create device component for rt5645 Internal Analog Mic UCM
 
  Since the Internal Analog Microphone device configuration is
  identical for the rt5645 and rt5645 mono speaker UCMs, move
  the entire definition to a component.
 
</code>
<code>
<code>
  - Factor out rt5645 variants Headset+Digital Mic UCM shared {en,dis}able sequences
  We have placed UCM profile snippets to be included by the main config
    
files also in the same directory, src/conf/ucm, it confuses alsaucm
</code>
program that scans over all subdirectories.  It thinks such a file is
also the main config file, and spews errors like:
  % alsaucm
  ALSA lib utils.c:67:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm/bytcr/bytcr.conf
   ALSA lib parser.c:1427:(load_master_config) error: could not parse configuration for card bytcr
  alsaucm: unable to obtain card list: No such file or directory
Actually we already defined the subdirectory for such components, and
they are skipped at parsing the main configs.  So we just need to move
the files there -- this is what's done here.
One more thing done here is to add a new component subdirectory,
platforms, for definitions bytcr/* that don't match with neither the
existing ones (codecs nor dsps).
Suggested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;</code>
- conf/ucm/Dell-WD15-Dock: Fix incorrect device names
<code>
<code>
- Factor out rt5645 variants Speaker+Headphones shared UCM enable sequences
 
  Move common enable sequences for rt5645 variants and rt5650
  UCM configurations into a shared component. The corresponding
  disable sequences are only two lines each and do not seem worth
  creating components for.
 
</code>
<code>
<code>
  - Create shared {En,Dis}ableSeq.conf components for rt5645 variants
  The device name string for Dell WD15 (and its variants) dock is set as
 
"WD15Dock", while the actual device name to be used is "Dock".
  Factor out the common enable and disable sequences used
  in rt5645 variants, including the rt5650. Move the sequences
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1112292</code>
  into a new component directory codecs/rt5645/ along with
- conf/ucm: bytcr-rt5640: Improve human readable input/output names
  a Makefile.
 
  Some lines like
      cset "name='Stereo1 ADC1 Mux' 1"
  and
      cset "name='I2S2 Func Switch' on"
  are not set set in the chtrt5650 UCM sequences and thus are not present
  in the new component, in order to maximize reuse.
 
</code>
<code>
<code>
- Update chtrt5645 ucm variants to use bytcr/PlatformEnableSeq.conf component
 
  The Lenovo Ideapad Miix 320, Asus T100HA, and chtrt5645 mono variant
  UCM configurations have not been updated to make use of the shared
  bytcr/PlatfromEnableSeq.conf sequence. This commit deletes those
  command sequences and loads the shared component directly.
 
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5651: Document mono speaker wiring
  The Comment field is displayed tot the end user in various UIs as such
 
names like MonoSpeaker and DigitalMics without any spaces are no good.
  During my recent work on the bytcht-es8316 UCM profile I realized that the
  bytcr-rt5651 devices with a single speaker use a differential setup just
Also the names themselves as well as how they get displayed in the
  like the es8316 does. The tell-tale here is the speaker going quiet when
typical UI (in separate input / output tabs) makes the adding of
  playing the exact same sound on both channels when things are configured
playback and capture to the comment superfluous and this looks weird
  for stereo speakers.
in the UI, so drop it.</code>
 
- conf/ucm: bytcr-rt5651: Add bytcr-rt5651-mono-spk-in2-mic-hp-swapped config
  I've run some tests and the rt5651 does have a special mono balanced out
  mode for its line-out but using this results in the same sound (and the
  same loudness / volume of the sound) as our current solution, so adding
  support for this to the kernel buys us nothing.
 
  This commit makes no changes, it just documents my findings in a big
  comment for future reference.
 
</code>
<code>
<code>
- conf/ucm: bytcr-rt5651: Add bytcr-rt5651-stereo-spk-dmic-mic config
 
  Add a config for boards which use a digital mic as internal mic,
  combined with having the headset mic on in2.
 
  An example of such a board is the Point of View TAB-P1006W-232 (v1.0) tablet.
 
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5651: Add digital mic support
  Add a longname profile for devices with a mono speaker, the Internal Mic
 
hooked up to IN2 and the left and right channels of their headphones
  Add a new ucm/codecs/rt5651/DigitalMic.conf snippet for digital mic support
output swapped.</code>
  and include this in the default non board-specific bytcr-rt5651.conf.
- conf/ucm: bytcr-rt5651: Add long-name UCM profiles
 
</code>
<code>
<code>
- conf/ucm: bytcr-rt5651: Add support for a headset-mic on IN2
 
  The first design with the headset-mic on IN2 rather then the
  default / reference-design IN3 has shown up.
 
  Add a new ucm/codecs/rt5651/IN2-HeadsetMic.conf snippet to deal with this
  and include this in the default non board-specific bytcr-rt5651.conf.
 
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5651: Enable Stereo? ADC MIXL ADC? switches when enabling inputs
  After recent kernel work, the kernel now sets a long-name for bytcr-rt5651
 
boards which indicates if a single (mono) speaker or stereo speakers are
  Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input,
used and if in1, in2, or in1 and 2 are used for the internal mic(s) (the
  rather then just enabling them all in ucm/codecs/rt5651/EnableSeq.conf .
headset mic sofar is always on in3).
 
  This is a preparation patch for adding digital mic support.
This commit adds UCM profiles for bytcr-rt5651 boards using these new
 
long-names, based on the generic bytcr-rt5651 profile.</code>
</code>
- conf/ucm: bytcr-rt5651: Add mono speaker output profile
<code>
<code>
- conf/ucm: kblrt5660: Add ucm setting for Dell Edge IoT platform
 
  The new generation of Dell Edge IoT platform is based on Intel
  Kabylake platform, and the audio codec is ALC3277 which is 100%
  compatible with RT5660 in I2S mode.
 
  The audio design on this IoT platform is as below:
    - Intel kabylake platform
    - connect the codec ALC3277 via SSP0
    - line-out and line-in with Micbias jacks
    - line-out mute control and jack detection of line-out and line-in
    - two HDMI ports with audio capability
 
</code>
<code>
<code>
  - conf/ucm: chtrt5650: Add UCM config for chtrt5650
  Many rt5651 devices only have a single speaker and even though there is
 
some external mixing done on the PCB, the quality of that mixing is quite
  Add a UCM configuration for the rt5650 codec. Tested on
poor and various sounds come out garbled when relying on the on PCB mixing.
  a Samsung Chromebook 3. Adapted with minor modifications
  from GitHub user evan-a-a's gist:
Using the codecs builtin mixer to mix left + right to the left output works
  https://gist.github.com/evan-a-a/86b2a698708074530e2d0ee7c6498767
much better. This commits adds a new MonoSpeaker.conf output profile which
 
allows this.</code>
</code>
- conf/ucm: bytcr-rt5651: Split into 1 .conf file per input / output
<code>
<code>
- ucm: Set default include path
 
  Many UCM profiles include the UCM profile components under ucm/*
  subdirectories and thusly put &lt;searchdir:ucm&gt; at each place.  This is
  rather cumbersome.
 
  This patch makes the UCM parser to set the default include path, so
  that each profile no longer needs to set searchdir.  All the
  &lt;searchdir:ucm&gt; lines currently found in the profiles are removed
  gracefully, too.
 
  For the needed implementation, a new helper,
  _snd_config_load_with_include() is introduced.  It's not exported,
  only for the use inside alsa-lib.
 
</code>
<code>
<code>
  - conf: Move UCM profile snippets into components subdirectory
  Split the bytcr-rt5651 config into 1 .conf file per input / output as
 
  has already been done for the bytcr-rt5640 and the chtnau8824 profiles.
  We have placed UCM profile snippets to be included by the main config
   
  files also in the same directory, src/conf/ucm, it confuses alsaucm
This allows easy creation of long-name profiles with the specific input /
  program that scans over all subdirectories. It thinks such a file is
output combinations found on a board without needing to copy and paste
  also the main config file, and spews errors like:
things.</code>
    % alsaucm
- conf/ucm: bytcr-rt5651: Add support for mic input on various pins
    ALSA lib utils.c:67:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm/bytcr/bytcr.conf
    ALSA lib parser.c:1427:(load_master_config) error: could not parse configuration for card bytcr
    alsaucm: unable to obtain card list: No such file or directory
 
  Actually we already defined the subdirectory for such components, and
  they are skipped at parsing the main configsSo we just need to move
  the files there -- this is what's done here.
 
  One more thing done here is to add a new component subdirectory,
  platforms, for definitions bytcr/* that don't match with neither the
  existing ones (codecs nor dsps).
 
  Suggested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
  Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
  Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</code>
<code>
<code>
- conf/ucm/Dell-WD15-Dock: Fix incorrect device names
 
  The device name string for Dell WD15 (and its variants) dock is set as
  "WD15Dock", while the actual device name to be used is "Dock".
 
  Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1112292
  Fixes: 8ebb40c96970 ("conf/ucm: Add a UCM profile for Dell WD15 Dock USB-audio")
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5640: Improve human readable input/output names
  Note this commit replaces the pre-existing "Handset Microphone" and
 
"Main Microphone" options, these come from the first commit of the
  The Comment field is displayed tot the end user in various UIs as such
bytcr-rt5651 UCM profile and were based on wrong assumptions about the
  names like MonoSpeaker and DigitalMics without any spaces are no good.
input mappings. None of the existing devices has the Hand/Headset mic
 
on IN1 as these options assumed.
  Also the names themselves as well as how they get displayed in the
  typical UI (in separate input / output tabs) makes the adding of
The rt5651 is used in various configurations with the Internal Mic(s)
  playback and capture to the comment superfluous and this looks weird
hooked up to IN1, IN2, or to IN1 and IN2 and the Headset Mic hooked up
  in the UI, so drop it.
to IN3.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Add support for all these to the generic bytcr-rt5651 profile and name
</code>
them accotding to their input + functions.
A follow up commit will add specialized longname configs which
will only expose the inputs actually used on the board with that
longname.</code>
- conf/ucm: bytcr-rt5651: Fix ADC and Mic capture volumes
<code>
<code>
- conf/ucm: bytcr-rt5651: Add bytcr-rt5651-mono-spk-in2-mic-hp-swapped config
 
  Add a longname profile for devices with a mono speaker, the Internal Mic
  hooked up to IN2 and the left and right channels of their headphones
  output swapped.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5651: Add long-name UCM profiles
  Fix ADC and Mic capture volumes, so that the microphone inputs actually
 
work.</code>
  After recent kernel work, the kernel now sets a long-name for bytcr-rt5651
- conf/ucm: bytcr-rt5651: Use generic SSP enable + disable sequence, support SSP0
  boards which indicates if a single (mono) speaker or stereo speakers are
  used and if in1, in2, or in1 and 2 are used for the internal mic(s) (the
  headset mic sofar is always on in3).
 
  This commit adds UCM profiles for bytcr-rt5651 boards using these new
  long-names, based on the generic bytcr-rt5651 profile.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
- conf/ucm: bytcr-rt5651: Add mono speaker output profile
 
  Many rt5651 devices only have a single speaker and even though there is
  some external mixing done on the PCB, the quality of that mixing is quite
  poor and various sounds come out garbled when relying on the on PCB mixing.
 
  Using the codecs builtin mixer to mix left + right to the left output works
  much better. This commits adds a new MonoSpeaker.conf output profile which
  allows this.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5651: Split into 1 .conf file per input / output
  Use the generic SSP enable sequence from bytcr/PlatformEnableSeq.conf,
 
for boards using SSP2 this is identical the code it replaces and this
  Split the bytcr-rt5651 config into 1 .conf file per input / output as
adds support for boards using SSP0.
  has already been done for the bytcr-rt5640 and the chtnau8824 profiles.
 
This fixes sound not working on Bay Trail CR tablets with a rt5651 codec.
  This allows easy creation of long-name profiles with the specific input /
  output combinations found on a board without needing to copy and paste
This commit also calls the generic disable sequence on shutdown
  things.
(this is new).</code>
 
- conf/ucm: bytcr-rt5651: Change Speaker/Headphone en/disable sequences to fix switching
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
- conf/ucm: bytcr-rt5651: Add support for mic input on various pins
 
  Note this commit replaces the pre-existing "Handset Microphone" and
  "Main Microphone" options, these come from the first commit of the
  bytcr-rt5651 UCM profile and were based on wrong assumptions about the
  input mappings. None of the existing devices has the Hand/Headset mic
  on IN1 as these options assumed.
 
  The rt5651 is used in various configurations with the Internal Mic(s)
  hooked up to IN1, IN2, or to IN1 and IN2 and the Headset Mic hooked up
  to IN3.
 
  Add support for all these to the generic bytcr-rt5651 profile and name
  them accotding to their input + functions.
 
  A follow up commit will add specialized longname configs which
  will only expose the inputs actually used on the board with that
  longname.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5651: Fix ADC and Mic capture volumes
  pulseaudio will run the DisableSequence of the current playback device
 
before running the EnableSequence of the new playback device.
  Fix ADC and Mic capture volumes, so that the microphone inputs actually
  work.
This causes the Platform Clock and BIAS to temporarily get turned off which
 
on the rt5651 breaks audio-streams which are playing when switching.
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
This commit moves the disabling to the EnableSequence of the other device
fixing this.</code>
- conf/ucm: bytcr-rt5651: Start with all outputs and inputs disabled
<code>
<code>
- conf/ucm: bytcr-rt5651: Use generic SSP enable + disable sequence, support SSP0
 
  Use the generic SSP enable sequence from bytcr/PlatformEnableSeq.conf,
  for boards using SSP2 this is identical the code it replaces and this
  adds support for boards using SSP0.
 
  This fixes sound not working on Bay Trail CR tablets with a rt5651 codec.
 
  This commit also calls the generic disable sequence on shutdown
  (this is new).
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5651: Change Speaker/Headphone en/disable sequences to fix switching
  Start with all switches disabled, so that e.g. the
 
LOUT L/R Playback Switches are not left enabled when starting with
  pulseaudio will run the DisableSequence of the current playback device
headphones plugged in.
  before running the EnableSequence of the new playback device.
 
This fixes the platform clock being kept on by these in some cases.
  This causes the Platform Clock and BIAS to temporarily get turned off which
  on the rt5651 breaks audio-streams which are playing when switching.
While at also move the IN? Boost and IF1 ASRC Switch lines around
 
a bit to match the order from https://github.com/plbossart/UCM so
  This commit moves the disabling to the EnableSequence of the other device
the profiles can be more easily compared.</code>
  fixing this.
- conf/ucm: bytcr-rt5651: Configure all volumes at 0dB
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
- conf/ucm: bytcr-rt5651: Start with all outputs and inputs disabled
 
  Start with all switches disabled, so that e.g. the
  LOUT L/R Playback Switches are not left enabled when starting with
  headphones plugged in.
 
  This fixes the platform clock being kept on by these in some cases.
 
  While at also move the IN? Boost and IF1 ASRC Switch lines around
  a bit to match the order from https://github.com/plbossart/UCM so
  the profiles can be more easily compared.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5651: Configure all volumes at 0dB
  The volumes are taken from this commit:
 
https://github.com/plbossart/UCM/commit/753e2430cd0e6cafbf10c6b29b689dbd32ac5250
  The volumes are taken from this commit:
  https://github.com/plbossart/UCM/commit/753e2430cd0e6cafbf10c6b29b689dbd32ac5250
That commit also adds line-in support, so it has not been
 
taken in its entirety.</code>
  That commit also adds line-in support, so it has not been
- conf/ucm: bytcr-rt5651: Do not use both DAC1 and HPVOL inputs for HP
  taken in its entirety.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
- conf/ucm: bytcr-rt5651: Do not use both DAC1 and HPVOL inputs for HP
 
  The headphones can either be driven directly from DAC1, or through
  the HP volume mixer chain to allow volume control, both can be enabled
  at the same time, but this should not be done.
 
  Mix only DAC1 to the headphones and not the HP volume path, there
  are 2 reasons to choice the DAC1 path;
  1) It is the power-on-reset default
  2) We don't expose the volume control to e.g. pulseaudio anyways so it
      is not useful
 
  While at it also move the "HPO MIX DAC1" and "HPO MIX HPVOL" entries up a
  bit so that they are no longer inbetween the "HPO L Playback Switch" and
  "HPO R Playback Switch" entries.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5645: Use the generic bytcr/PlatformEnableSeq.conf
  The headphones can either be driven directly from DAC1, or through
 
the HP volume mixer chain to allow volume control, both can be enabled
  Use the generic Intel SSP bytcr/PlatformEnableSeq.conf file, it is
at the same time, but this should not be done.
  identical to all the cset statements this commit removes.
 
Mix only DAC1 to the headphones and not the HP volume path, there
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
are 2 reasons to choice the DAC1 path;
</code>
1) It is the power-on-reset default
2) We don't expose the volume control to e.g. pulseaudio anyways so it
    is not useful
While at it also move the "HPO MIX DAC1" and "HPO MIX HPVOL" entries up a
bit so that they are no longer inbetween the "HPO L Playback Switch" and
"HPO R Playback Switch" entries.</code>
- conf/ucm: bytcr-rt5645: Use the generic bytcr/PlatformEnableSeq.conf
<code>
<code>
- conf/ucm: VEYRON-I2S: Add internal speakers and mic, other fixes
 
  Other fixes include output/input names (comments) for UIs (pavucontrol)
  to display, and Playback/CapturePCM entries so pulseaudio initializes
  correctly on this hardware.
 
</code>
<code>
<code>
  - conf/ucm: chtnau8824: Add Cube iWork8 Air and Pipo W2S specific profiles
  Use the generic Intel SSP bytcr/PlatformEnableSeq.conf file, it is
 
identical to all the cset statements this commit removes.</code>
  The Cube iWork8 Air and Pipo W2S tablets both only have a single speaker.
- conf/ucm: VEYRON-I2S: Add internal speakers and mic, other fixes
  Add long-name profiles for them which are identical to the default
  chtnau8824 profile, except that they include the nau8824/MonoSpeaker.conf
  snippet instead of the nau8824/Speaker.conf one.
 
</code>
<code>
<code>
- conf/ucm: chtnau8824: Add UCM profile for chtnau8824 boards
 
  Add UCM profile for chtnau8824 boards based on:
  https://github.com/plbossart/UCM/blob/master/chtnau8824
 
  Split into multiple files in the same way as this was done for the
  bytcr-rt5640 support, re-using the existing ucm/PlatformEnableSeq.conf
  and ucm/PlatformDisableSeq.conf files for the SST mixer settings.
 
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5640: Add default DisableSequence
  Other fixes include output/input names (comments) for UIs (pavucontrol)
 
to display, and Playback/CapturePCM entries so pulseaudio initializes
  Add a disable sequence powering off the SST mixer elements, loosely
correctly on this hardware.</code>
  based on the default DisableSequence from:
- conf/ucm: chtnau8824: Add Cube iWork8 Air and Pipo W2S specific profiles
  https://github.com/plbossart/UCM/blob/master/chtnau8824/HiFi.conf
 
</code>
<code>
<code>
- conf/ucm: bytcr-rt5640: Add long-name UCM profiles
 
  With a recently merged kernel commit, the kernel now sets a long-name for
  bytcr-rt5640 boards which indicates if a single (mono) speaker or stereo
  speakers are used and wether dmic1, in1 or in3 is used for the internal
  mic (the headset mic sofar is always in2).
 
  This commit adds UCM profiles for bytcr-rt5640 boards using these new
  long-names, based on the generic bytcr-rt5640 profile.
 
  The added profiles have the unnecessary input / output options from the
  generic profile removed leaving only 2 input and 2 output options, which
  are automatically switched between by e.g. pulse based on jack-detect.
 
</code>
<code>
<code>
  - conf/ucm: bytcr-rt5640: Add generic bytcr-rt5640 UCM profile
  The Cube iWork8 Air and Pipo W2S tablets both only have a single speaker.
 
Add long-name profiles for them which are identical to the default
  This commit adds the generic UCM profile for bytcr-rt5640 boards from:
chtnau8824 profile, except that they include the nau8824/MonoSpeaker.conf
  https://github.com/plbossart/UCM, plus the fixes from this pull-req:
snippet instead of the nau8824/Speaker.conf one.</code>
  https://github.com/plbossart/UCM/pull/31
- conf/ucm: chtnau8824: Add UCM profile for chtnau8824 boards
 
  The profile has been split up into separate per input / output files to
  allow for creation of long-name profiles with the specific input / output
  combinations found on a board without needing to copy and paste things.
 
  Note this profile exports all inputs and both stereo/mono speaker setups
  even though a typical device will not use all. Ideally a long-name based
  device specific profile made up of the various parts should be used
  instead.
 
</code>
<code>
<code>
- conf/ucm: Add a UCM profile for Dell WD15 Dock USB-audio
 
  USB-audio device on Dell WD15 docking station provides two individual
  PCM streams, one for headphone and another for line out.  A UCM
  profile gives the proper roles for these.
 
</code>
<code>
<code>
  - conf/ucm: chtrt5645: At config for the Lenovo Ideapad Miix 320
  Add UCM profile for chtnau8824 boards based on:
 
https://github.com/plbossart/UCM/blob/master/chtnau8824
  The Lenovo Ideapad Miix 320 uses a digital mic connected to the DMIC2 input
  (unlike the Asus T100HA which has it connected to the DMIC1 input), add a
Split into multiple files in the same way as this was done for the
  long-name config specific for the Miix 320, which is a copy of the standard
bytcr-rt5640 support, re-using the existing ucm/PlatformEnableSeq.conf
  chtrt5645 config with the internal analog mic section replaced with one
and ucm/PlatformDisableSeq.conf files for the SST mixer settings.</code>
  for a digital mic connected to the DMIC2 input.
- conf/ucm: bytcr-rt5640: Add default DisableSequence
 
</code>
<code>
<code>
- conf/ucm: chtrt5645: At config for the Asus T100HA
 
  The Asus T100HA uses a digital mic rather then an analog one, add
  long-name config specific for the T100HA, which is a copy of the standard
  chtrt5645 config with the internal analog mic section replaced with one
  for the digital mic found on the Asus T100HA.
 
</code>
<code>
<code>
  - conf/ucm: chtrt5645: Fix recording from internal analog microphone
  Add a disable sequence powering off the SST mixer elements, loosely
 
based on the default DisableSequence from:
  The internal analog mic switch is called 'Int Analog Mic Switch'
https://github.com/plbossart/UCM/blob/master/chtnau8824/HiFi.conf</code>
  (not 'Int Mic Switch') and is connected to BST2 not BST1.
- conf/ucm: bytcr-rt5640: Add long-name UCM profiles
 
  Also change the analog mic volume levels so that we get better
  audio / less noise.
 
</code>
<code>
<code>
- conf/ucm: chtrt5645: Microphone recording fixes
 
  Apply microphone recording changes from:
  https://github.com/plbossart/UCM.git
 
  [hdegoede@redhat.com: Drop non generic DMIC changes]
</code>
<code>
<code>
  - conf/ucm: chtrt5645: Cleanup and playback fixes
  With a recently merged kernel commit, the kernel now sets a long-name for
 
bytcr-rt5640 boards which indicates if a single (mono) speaker or stereo
  Apply cleanup and playback fixes changes from:
speakers are used and wether dmic1, in1 or in3 is used for the internal
  https://github.com/plbossart/UCM.git
mic (the headset mic sofar is always in2).
 
  [hdegoede@redhat.com: Modify commit msg and paths for merging into alsa-lib]
This commit adds UCM profiles for bytcr-rt5640 boards using these new
</code>
long-names, based on the generic bytcr-rt5640 profile.
The added profiles have the unnecessary input / output options from the
generic profile removed leaving only 2 input and 2 output options, which
are automatically switched between by e.g. pulse based on jack-detect.</code>
- conf/ucm: bytcr-rt5640: Add generic bytcr-rt5640 UCM profile
<code>
<code>
- conf/ucm: increase the input volume for LineIn
 
  Otherwise, the boost value is 0, and the sound captured from that
  LineIn jack is too weak for users.
 
</code>
<code>
<code>
  - conf/ucm: Add chtrt5645-mono-speaker-analog-mic configuration
  This commit adds the generic UCM profile for bytcr-rt5640 boards from:
 
https://github.com/plbossart/UCM, plus the fixes from this pull-req:
  Add a configuration for Cherry Trail boards which use a rt5645 codec
https://github.com/plbossart/UCM/pull/31
  connected to a mono speaker and with an analog mic on IN2N + IN2P.
 
The profile has been split up into separate per input / output files to
  The chtrt5645-mono-speaker-analog-mic/HiFi.conf for this is based on the
allow for creation of long-name profiles with the specific input / output
  latest version from https://github.com/plbossart/UCM/tree/master/chtrt5645
combinations found on a board without needing to copy and paste things.
  with all the unused input options removed and some changes made to make
  the analog mic work.
Note this profile exports all inputs and both stereo/mono speaker setups
 
even though a typical device will not use all. Ideally a long-name based
  This commit also adds 2 ucm dirs with the longname of 2 boards known to use
device specific profile made up of the various parts should be used
  this setup, which simply contain a symlink to the generic
instead.</code>
  chtrt5645-mono-speaker-analog-mic entry.
- conf/ucm: Add a UCM profile for Dell WD15 Dock USB-audio
 
</code>
<code>
<code>
- conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs
 
  Like the previous Lenovo laptops, some Gigabyte mobos have dual
  HD-audio codecs and need to switch dynamically via UCM profile.
  Reuse the same profile as Lenovo dual codecs, so far.
 
</code>
<code>
<code>
  - conf/ucm: Add dual HD-audio codecs config for Lenovo
  USB-audio device on Dell WD15 docking station provides two individual
 
PCM streams, one for headphone and another for line out.  A UCM
  Some recent Lenovo laptops have dual codecs and we need to switch them
  profile gives the proper roles for these.</code>
  accordingly. The kernel side already contains a fix and gives the
- conf/ucm: chtrt5645: At config for the Lenovo Ideapad Miix 320
  unique longname string for identifying the board, and here we hook up
  the corresponding UCM profile.
 
  The profile was corrected and tested by Hui Wang on Lenovo p520.
 
  Tested-by: Kailang &lt;kailang@realtek.com&gt;
  Tested-by: Hui Wang &lt;hui.wang@canonical.com&gt;
</code>
<code>
<code>
- conf/ucm: rt5651: Mute speakers on boot
 
  The UCM configuration is enabling the speakers in the SectionDefaults.
  This is a problem when booting with an headset already connected since
  the audio output is routed at the same time both on speakers and
  heaphones until the jack is disconnected and reconnected again.
 
  Fix this disabling all the outputs in the default mixer configuration.
 
</code>
<code>
<code>
  - conf/ucm: rt5651: Add missing cdev
  The Lenovo Ideapad Miix 320 uses a digital mic connected to the DMIC2 input
 
(unlike the Asus T100HA which has it connected to the DMIC1 input), add a
</code>
long-name config specific for the Miix 320, which is a copy of the standard
chtrt5645 config with the internal analog mic section replaced with one
for a digital mic connected to the DMIC2 input.</code>
- conf/ucm: chtrt5645: At config for the Asus T100HA
<code>
<code>
- conf/ucm: rt5651: Fix HiFi file name
 
  The conf HiFi file name is HiFi.conf, fix the name in the main
  configuration file.
 
</code>
<code>
<code>
  - conf/ucm: rt5651: Add UCM config for bytcr-rt5651
  The Asus T100HA uses a digital mic rather then an analog one, add
 
long-name config specific for the T100HA, which is a copy of the standard
  Add a UCM configuration for the rt5651 codec on Intel's Cherry-Trail
chtrt5645 config with the internal analog mic section replaced with one
  platform. Adapted from [0].
for the digital mic found on the Asus T100HA.</code>
 
- conf/ucm: chtrt5645: Fix recording from internal analog microphone
  [0] https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
 
</code>
<code>
<code>
- conf/ucm: DB410c-HiFi: add CIC selection
 
  This patch adds CIC selection controls which have been added recently to
  the kernel to select mic source.
 
  Without this patch user has to manually select the control to record
  from DMIC or AMIC.
 
</code>
<code>
<code>
  - conf/ucm: broxton: add broxton-rt298 conf files
  The internal analog mic switch is called 'Int Analog Mic Switch'
 
(not 'Int Mic Switch') and is connected to BST2 not BST1.
  This adds the UCM conf files for broxton enabling with rt298 codec on
  I2S audio, HDMI and DMIC ports.
Also change the analog mic volume levels so that we get better
 
audio / less noise.</code>
</code>
- conf/ucm: chtrt5645: Microphone recording fixes
<code>
<code>
- conf/ucm: skylake: add skylake-rt286 conf files
 
  This add the UCM conf files for skylake enabling I2S audio, HDMI and DMIC
  ports.
 
</code>
<code>
<code>
  - ucm: Add ucm files for DB410c board.
  Apply microphone recording changes from:
 
  https://github.com/plbossart/UCM.git
  DB410c board has support for both Digital and Analog audio. Digital
  audio is over HDMI and analog is over codec chip integrated inside the
[hdegoede@redhat.com: Drop non generic DMIC changes]</code>
  APQ8016 SOC.
- conf/ucm: chtrt5645: Cleanup and playback fixes
 
  It can support:
    - 3 Microphones: Primary Mic(Handset mic), Headset Mic and Secondary
    - 2 Digital Microphones.
    - Earpiece.
    - Headset.
    - Loud Speaker.
    - HDMI.
 
  [Riku: squashed Srinivas's patches together and converted spaces to tabs]
 
</code>
<code>
<code>
- conf/ucm: chtrt5645: Add UCM config for chtrt5645
 
  Add a UCM configuration for the rt5645 codec on Intel's Cherry-Trail
  platform. Tested on the Microsoft Surface 3.
 
</code>
<code>
<code>
  - conf/ucm: ROCKCHIP-I2S: rename to VEYRON-I2S
  Apply cleanup and playback fixes changes from:
 
https://github.com/plbossart/UCM.git
  Commit a192f52fc63a introduced an ucm profile for Rockchip Veyron-
  Chromebooks by taking the ucm profile from the ChromeOS userspace.
[hdegoede@redhat.com: Modify commit msg and paths for merging into alsa-lib]</code>
 
- conf/ucm: increase the input volume for LineIn
  But similarly to DAISY-I2S, PAZ00 and most other profiles, the audio
  setup is pretty specific to a board type, so hogging the Rockchip name
  will make it harder for future Rockchip based boards to fit in nicely.
 
  And while Veyron also is a family of boards, all of them share the
  same audio setup. The ucm profile was not released with any official
  alsa release and the audio setup also isn't in the mainline kernel yet,
  so such a rename should be easily possible.
 
  Fixes: a192f52fc63a ("conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM config.")
</code>
<code>
<code>
- conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM config.
 
  Taken from the ChromeOS sources, this configuration was tested on Veyron
  Jerry based Chromebook from Google.
 
  [Added missing Makefile changes by tiwai]
 
</code>
<code>
<code>
  - conf/ucm: broadwell-rt286: change to set capture volume and capture device
  Otherwise, the boost value is 0, and the sound captured from that
 
LineIn jack is too weak for users.</code>
  Set 'Mic Capture Volume' in capture device EnableSequence, to fix
- conf/ucm: Add chtrt5645-mono-speaker-analog-mic configuration
  capture no volume by default issue.
 
  Also add JackHWMute Value item to mute onboard dmic while headset
  mic is plugged in.
 
  Tested-by: Mark Brown &lt;broonie@kernel.org&gt;
</code>
<code>
<code>
- conf/ucm: broadwell-rt286: change to use the correct jack kcontrol name
 
  The headset jack has two kctls: "Headphone Jack" and "Mic Jack",
  we need switch speaker output according to the former JackControl.
  Here correct it.
 
</code>
<code>
<code>
  - conf/ucm: broadwell-rt286: add ucm config
  Add a configuration for Cherry Trail boards which use a rt5645 codec
 
connected to a mono speaker and with an analog mic on IN2N + IN2P.
  The configure should apply to all Broadwell-rt286 boards from Intel,
  like Wilson Beach SDS Ultrabook.
The chtrt5645-mono-speaker-analog-mic/HiFi.conf for this is based on the
 
latest version from https://github.com/plbossart/UCM/tree/master/chtrt5645
</code>
with all the unused input options removed and some changes made to make
the analog mic work.
This commit also adds 2 ucm dirs with the longname of 2 boards known to use
this setup, which simply contain a symlink to the generic
chtrt5645-mono-speaker-analog-mic entry.</code>
- conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs
<code>
<code>
- conf/ucm: GoogleNyan: Add configuration
 
  Taken from the ChromeOS sources, this configuration should apply to all
  Nyan boards from Google, so far HP Chromebook 14 (nyan-blaze) and Acer
  Chromebook 13 (nyan-big).
 
</code>
<code>
<code>
  - conf/ucm: PAZ00: add Toshiba AC100/Dynabook AZ new config
  Like the previous Lenovo laptops, some Gigabyte mobos have dual
 
HD-audio codecs and need to switch dynamically via UCM profile.
  Recent mainline kernels threat Toshiba AC100 audio hardware as hw:PAZ00
Reuse the same profile as Lenovo dual codecs, so far.</code>
  vs old hw:tegraalc5632.
- conf/ucm: Add dual HD-audio codecs config for Lenovo
 
  This patch adds config files for new hw name and include them to
  makefiles.
 
</code>
<code>
<code>
- conf/ucm: DAISY-I2S: Set default filter mode for HiFi.
 
  Default to music mode filter for the HiFi use case on the Samsung ARM
  Chromebook.  This mode is better at 44.1k and 48k audio than the
  "Voice" setting.
 
</code>
<code>
<code>
  - conf/ucm: tegraalc5632: add UCM config from Ubuntu
  Some recent Lenovo laptops have dual codecs and we need to switch them
 
accordingly.  The kernel side already contains a fix and gives the
</code>
unique longname string for identifying the board, and here we hook up
the corresponding UCM profile.
The profile was corrected and tested by Hui Wang on Lenovo p520.
Tested-by: Kailang &lt;kailang@realtek.com&gt;
Tested-by: Hui Wang &lt;hui.wang@canonical.com&gt;</code>
- conf/ucm: rt5651: Mute speakers on boot
<code>
<code>
- conf/ucm: SDP4430: add UCM config from Ubuntu
 
</code>
<code>
<code>
  - conf/ucm: PandaBoardES: add UCM config from Ubuntu
  The UCM configuration is enabling the speakers in the SectionDefaults.
 
This is a problem when booting with an headset already connected since
</code>
the audio output is routed at the same time both on speakers and
heaphones until the jack is disconnected and reconnected again.
Fix this disabling all the outputs in the default mixer configuration.</code>
- conf/ucm: rt5651: Add missing cdev
<code>
<code>
  - conf/ucm: PandaBoard: add UCM config from Ubuntu
- conf/ucm: rt5651: Fix HiFi file name
 
<code>
</code>
<code>
The conf HiFi file name is HiFi.conf, fix the name in the main
configuration file.</code>
- conf/ucm: rt5651: Add UCM config for bytcr-rt5651
<code>
<code>
Add a UCM configuration for the rt5651 codec on Intel's Cherry-Trail
platform. Adapted from [0].
[0] https://github.com/plbossart/UCM/tree/master/bytcr-rt5651</code>
- conf/ucm: DB410c-HiFi: add CIC selection
<code>
<code>
This patch adds CIC selection controls which have been added recently to
the kernel to select mic source.
Without this patch user has to manually select the control to record
from DMIC or AMIC.</code>
- conf/ucm: broxton: add broxton-rt298 conf files
<code>
<code>
This adds the UCM conf files for broxton enabling with rt298 codec on
I2S audio, HDMI and DMIC ports.</code>
- conf/ucm: skylake: add skylake-rt286 conf files
<code>
<code>
This add the UCM conf files for skylake enabling I2S audio, HDMI and DMIC
ports.</code>
- ucm: Add ucm files for DB410c board.
<code>
<code>
DB410c board has support for both Digital and Analog audio. Digital
audio is over HDMI and analog is over codec chip integrated inside the
APQ8016 SOC.
It can support:
  -  3 Microphones: Primary Mic(Handset mic), Headset Mic and Secondary
  - 2 Digital Microphones.
  - Earpiece.
  - Headset.
  - Loud Speaker.
  - HDMI.
[Riku: squashed Srinivas's patches together and converted spaces to tabs]</code>
- conf/ucm: chtrt5645: Add UCM config for chtrt5645
<code>
<code>
Add a UCM configuration for the rt5645 codec on Intel's Cherry-Trail
platform. Tested on the Microsoft Surface 3.</code>
- conf/ucm: ROCKCHIP-I2S: rename to VEYRON-I2S
<code>
<code>
Commit a192f52fc63a introduced an ucm profile for Rockchip Veyron-
Chromebooks by taking the ucm profile from the ChromeOS userspace.
But similarly to DAISY-I2S, PAZ00 and most other profiles, the audio
setup is pretty specific to a board type, so hogging the Rockchip name
will make it harder for future Rockchip based boards to fit in nicely.
And while Veyron also is a family of boards, all of them share the
same audio setup. The ucm profile was not released with any official
alsa release and the audio setup also isn't in the mainline kernel yet,
so such a rename should be easily possible.</code>
- conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM config.
<code>
<code>
Taken from the ChromeOS sources, this configuration was tested on Veyron
Jerry based Chromebook from Google.
[Added missing Makefile changes by tiwai]</code>
- conf/ucm: broadwell-rt286: change to set capture volume and capture device
<code>
<code>
Set 'Mic Capture Volume' in capture device EnableSequence, to fix
capture no volume by default issue.
Also add JackHWMute Value item to mute onboard dmic while headset
mic is plugged in.
Tested-by: Mark Brown &lt;broonie@kernel.org&gt;</code>
- conf/ucm: broadwell-rt286: change to use the correct jack kcontrol name
<code>
<code>
The headset jack has two kctls: "Headphone Jack" and "Mic Jack",
we need switch speaker output according to the former JackControl.
Here correct it.</code>
- conf/ucm: broadwell-rt286: add ucm config
<code>
<code>
The configure should apply to all Broadwell-rt286 boards from Intel,
like Wilson Beach SDS Ultrabook.</code>
- conf/ucm: GoogleNyan: Add configuration
<code>
<code>
Taken from the ChromeOS sources, this configuration should apply to all
Nyan boards from Google, so far HP Chromebook 14 (nyan-blaze) and Acer
Chromebook 13 (nyan-big).</code>
- conf/ucm: PAZ00: add Toshiba AC100/Dynabook AZ new config
<code>
<code>
Recent mainline kernels threat Toshiba AC100 audio hardware as hw:PAZ00
vs old hw:tegraalc5632.
  This patch adds config files for new hw name and include them to
makefiles.</code>
- conf/ucm: DAISY-I2S: Set default filter mode for HiFi.
<code>
<code>
Default to music mode filter for the HiFi use case on the Samsung ARM
Chromebook.  This mode is better at 44.1k and 48k audio than the
"Voice" setting.</code>
- conf/ucm: tegraalc5632: add UCM config from Ubuntu
<code>
- conf/ucm: SDP4430: add UCM config from Ubuntu
<code>
- conf/ucm: PandaBoardES: add UCM config from Ubuntu
<code>
- conf/ucm: PandaBoard: add UCM config from Ubuntu
<code>
- conf/ucm: DAISY-I2S: add Samsung ARM Chromebook UCM config from ChromeOS
<code>
<code>
- conf/ucm: DAISY-I2S: add Samsung ARM Chromebook UCM config from ChromeOS
 
</code>
==alsa-topology-conf==
==alsa-topology-conf==
===Configuration files===
===Configuration files===
- ASoC: topology: Fix bclk and fsync inversion in set_link_hw_format()
<code>
<code>
- ASoC: topology: Fix bclk and fsync inversion in set_link_hw_format()
 
  The values of bclk and fsync are inverted WRT the codec. But the existing
  solution already works for Broadwell, see the alsa-lib config:
 
  `alsa-lib/src/conf/topology/broadwell/broadwell.conf`
 
  This commit provides the backwards-compatible solution to fix this misuse.
  This commit goes in pair with the corresponding patch for linux.
 
  Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
  Tested-by: Pan Xiuli &lt;xiuli.pan@linux.intel.com&gt;
  Tested-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
</code>
<code>
<code>
  - conf: topology: Fix index mismatch for skl and bxt
  The values of bclk and fsync are inverted WRT the codec. But the existing
 
solution already works for Broadwell, see the alsa-lib config:
  The topology index in the conf is set to 1, where the driver expects index
  set to 0. Fix the inconsistency.
`alsa-lib/src/conf/topology/broadwell/broadwell.conf`
 
</code>
This commit provides the backwards-compatible solution to fix this misuse.
This commit goes in pair with the corresponding patch for linux.
Tested-by: Pan Xiuli &lt;xiuli.pan@linux.intel.com&gt;
Tested-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;</code>
- conf: topology: Fix index mismatch for skl and bxt
<code>
<code>
- topology: Update physical link configurations in Broadwell text conf file
 
  To make this conf file a better example, add configurations for the
  physical link "Codec", same as that defined by Intel Broadwell upstream
  machine driver.
 
</code>
<code>
<code>
  - conf: bxtrt298: Add topology conf file for bxt
  The topology index in the conf is set to 1, where the driver expects index
 
set to 0. Fix the inconsistency.</code>
  Add the conf file for bxt platform as well to define module
- topology: Update physical link configurations in Broadwell text conf file
  private data.
 
</code>
<code>
<code>
- conf: sklrt286: define module private data through tuples in skylake
 
  In the conf file, module private data can be described through
  tuples instead of blobs defined by vendor defined structures.
 
  This patch defines the tuple section and the token list. The
  tokens are then used to build the tuple array.
 
  The module data may have both driver data and firmware data. The
  driver data is passed using the tuple array and the firmware data
  using byte data. A descriptor tuple array is defined to describe
  the succeeding data block.
 
</code>
<code>
<code>
  - topology: Update PCM configurations in Broadwell text conf file
  To make this conf file a better example, add configurations for the
 
physical link "Codec", same as that defined by Intel Broadwell upstream
  To make this conf file a better example, update the name & ID of PCMs
machine driver.</code>
  (front-end DAI link) and their cpu DAI (front-end DAI), same as those
- conf: bxtrt298: Add topology conf file for bxt
  defined by Broadwell upstream driver.
 
</code>
<code>
<code>
- conf: topology: Add Skylake i2s conf
 
  The Skylake topology configuration for simple topology graph is
  provided. This exposes the PCM capabilities of the DSP.
 
</code>
<code>
<code>
  - conf: topology: Add topology file for broadwell audio DSP
  Add the conf file for bxt platform as well to define module
 
private data.</code>
</code>
- conf: sklrt286: define module private data through tuples in skylake
<code>
<code>
In the conf file, module private data can be described through
tuples instead of blobs defined by vendor defined structures.
This patch defines the tuple section and the token list. The
tokens are then used to build the tuple array.
The module data may have both driver data and firmware data. The
driver data is passed using the tuple array and the firmware data
using byte data. A descriptor tuple array is defined to describe
the succeeding data block.</code>
- topology: Update PCM configurations in Broadwell text conf file
<code>
<code>
To make this conf file a better example, update the name & ID of PCMs
(front-end DAI link) and their cpu DAI (front-end DAI), same as those
defined by Broadwell upstream driver.</code>
- conf: topology: Add Skylake i2s conf
<code>
<code>
The Skylake topology configuration for simple topology graph is
provided. This exposes the PCM capabilities of the DSP.</code>
- conf: topology: Add topology file for broadwell audio DSP
<code>
=Detailed changelog between 1.0.29 and 1.2.1 releases=
=Detailed changelog between 1.0.29 and 1.2.1 releases=
=Changelog between 1.0.29 and 1.2.1 releases=
=Changelog between 1.0.29 and 1.2.1 releases=
==alsa-firmware==
==alsa-firmware==
===Core===
===Core===
- Release v1.2.1
<code>
<code>
- Release v1.2.1
- Change FSF address (Franklin Street)
 
</code>
<code>
<code>
- Change FSF address (Franklin Street)
 
</code>
===AICA (Dreamcast) Firmware===
===AICA (Dreamcast) Firmware===
- Fix up aica firmware licensing
<code>
<code>
<code>
  - Fix up aica firmware licensing
  The 3-clause BSD that this firmware uses requires more than just
 
keeping the copyright notice, like license.txt currently says.
  The 3-clause BSD that this firmware uses requires more than just
Rather, it has has that "redistributions in binary form (which is
  keeping the copyright notice, like license.txt currently says.
what the ALSA Project is doing, since only the firmware binary is
  Rather, it has has that "redistributions in binary form (which is
provided) must reproduce the above copyright notice, this list of
  what the ALSA Project is doing, since only the firmware binary is
conditions and the following disclaimer in the documentation and/or
  provided) must reproduce the above copyright notice, this list of
other materials provided with the distribution." This means that more
  conditions and the following disclaimer in the documentation and/or
than just the copyright notice needs to be included. This change is
  other materials provided with the distribution." This means that more
intended to address this by adding the parts that were omitted
  than just the copyright notice needs to be included. This change is
originally.</code>
  intended to address this by adding the parts that were omitted
  originally.
 
</code>
===Cirrus Logic CS46xx Firmware===
===Cirrus Logic CS46xx Firmware===
- Change FSF address (Franklin Street)
<code>
<code>
- Change FSF address (Franklin Street)
 
</code>
===Digigram Echo Audio Firmware===
===Digigram Echo Audio Firmware===
- Change FSF address (Franklin Street)
<code>
<code>
- Change FSF address (Franklin Street)
 
</code>
===Sound Blaster HDA CA0132 Firmware===
===Sound Blaster HDA CA0132 Firmware===
- Add new firmware for Creative CA0132 HD-Audio Codec
<code>
<code>
<code>
  - Add new firmware for Creative CA0132 HD-Audio Codec
  Support has been added for new cards through the ca0132 driver. These
 
new firmware files are for these cards.
  Support has been added for new cards through the ca0132 driver. These
  new firmware files are for these cards.
[ NOTE: the files taken from the original PR to linux-firmware tree.
 
  These new files basically only addition to the already existing
  [ NOTE: the files taken from the original PR to linux-firmware tree.
  CA0132 firmware files, and follow the same license.
    These new files basically only addition to the already existing
  The PR to linux-firmware tree was pending just because it was
    CA0132 firmware files, and follow the same license.
  submitted by a third person, which is a quite unusual case.
    The PR to linux-firmware tree was pending just because it was
  -- tiwai ]</code>
    submitted by a third person, which is a quite unusual case.
    -- tiwai ]
 
</code>

Latest revision as of 13:26, 15 November 2019

Detailed changelog between 1.1.9 and 1.2.1 releases

Changelog between 1.0.29 and 1.2.1 releases

alsa-lib

Core

- Release v1.2.1 - conf: implement snd_config_add_before() and snd_config_add_after() - topology: remove configuration files (moved to alsa-topology-conf repository) - create separated libatopology library with the topology routines - ucm: remove configuration files (moved to alsa-ucm-conf repository) - conf: improve the include paths code

- various cleanups (more straight code and allocations)
- do not add the base config path /usr/share/alsa to the
  explicit include list of directories
  (it's not wanted for ucm configs)

- Use __func__ instead of __FUNCTION__

They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
for backwards compatibility with old gcc versions.

- rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)

Use proper reference counting for the dynamic symbol.

- ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles

Adding a new Conexant CX2072X codec profile and reusing the existing
BYT/CHT platform snippets.

Currently tested only on ASUS E200HA laptop.

Config API

- conf: implement snd_config_add_before() and snd_config_add_after() - ucm: change the If block parsing

- evaluate always If before the other blocks

- ucm: add If condition block

The syntax is simple:

If./any-if-identificator/ {
  Condition {
    Type /type_here/
    /optional defines/
  }
  True {
    /block used when condition is evaluated as true/
  }
  False {
    /block used when condition is evaluated as false/
  }
}

The Type "ControlExists" is implemented:

Condition {
  Type ControlExists
  Device "hw:${CardId}"
  Control "iface=CARD,name='Headphone Jack'"
}

Control API

- control_shm: add missing socket close to the error path (coverity) - control_shm: remove duplicate code (coverity)

Mixer API

- mixer: simple - add snd_mixer_selem_id_parse() from amixer

PCM API

- pcm: the maximal rate is 768000Hz, fix the remain code - pcm: fix the period_size for direct plugins (dmix, dsnoop, dshare)

BugLink: https://github.com/alsa-project/alsa-lib/issues/8

- pcm: Fix the wrong PCM object passed for locking/unlocking

Most of PCM API functions have snd_pcm_lock()/unlock() wraps for the
actual calls of ops, and some plugins try to unlock/relock internally
for the given PCM object.  This, unfortunately, causes a problem in
some configurations and leads to the unexpected behavior or deadlock.

The main problem is that we call snd_pcm_lock() with the given PCM
object, while calling the ops with pcm->op_arg or pcm->fast_op_arg as
the slave PCM object.  Meanwhile the plugin code assumes that the
passed PCM object is already locked, and calls snd_pcm_unlock().
This bug doesn't hit always because in most cases pcm->op_arg and
fast_op_arg are identical with pcm itself.  But in some configurations
they have different values, so the problem surfaces.

This patch is an attempt to resolve these inconsistencies.  It
replaces most of snd_pcm_lock()/unlock() calls with either pcm->op_arg
or pcm->fast_op_arg, depending on the call pattern, so that the plugin
code can safely run snd_pcm_unlock() to the given PCM object.

- pcm: chmap: Fix memory leak at snd_pcm_set_chmap()

snd_pcm_set_chmap() leaks the memory returned from snd_pcm_get_chmap()
without releasing.  Add the missing free() call as well as a slight
code refactoring.

BugLink: https://github.com/alsa-project/alsa-lib/pull/11

- pcm: dshare: allow missing bindings

allow opening the device and start the audio clock without blocking
any channel

this is required if the audio clock has to be available all the time,
even when application is not streaming audio data

- pcm: return -ENOSYS when ops or fast_ops callback is NULL

function is allowed to continue until it checks for error variable, as to
not conflict with original implementation flow

for simple functions involving only one line, return error immediately in
case callback is NULL

- pcm_file: improve error checking in write_wav_header function

previously errno would be returned even for cases where it may have
not been populated, for example one of the write functions failing,
or writing only partial buffer,

now progress through write operations separately and report errno when
appropriate

- pcm_file: in case of failed write clear file buffer variables

previously, in case of failed write to output file, error is returned
from snd_pcm_writei/read APIs, user could run pcm_drain as fallback and
encounter an assert, since drain would try to write remaining file
buffer to a file

if failed to write to output file in first place, it makes sense to clear
current internal pmc_file file buffer variables

- pcm_file: use EIO instead of EPIPE when failing to write output file

EPIPE is defined as XRUN which is not entirely correct in this condition

failing to write to a file in pcm_file plugin can not be simply recovered
by a retry as user of the api might be led to believe when receiving EPIPE

use EIO instead to indicate a different kid of error that may not be
recoverable by retry

- pcm_file: return errno in case of a failed write operation

allows correct error code propagation for snd_pcm_file_write_bytes caller

- pcm_file: remove double line

snd_pcm_file_add_frames called two times by mistake, introduced in
2a800c0c4f259043c9217a4aa6a57afaf9f77477

- pcm_file: report write output file error to api user

when writing to output file fails, api user is notified and can handle
recovery

- pcm_file: do not disrupt playback on output file write fail

previously playback could be interrupted by snd_pcm_file_add_frames:
    assert(file->wbuf_used_bytes < file->wbuf_size_bytes)

in case snd_pcm_file_write_bytes fails to write full amount of bytes
to file, variable wbuf_used_bytes would not be fully decremented by
requested amount of bytes function was called with

for the assert to trigger, multiple write fails need to happen, so
that wbuf_used_bytes overflows wbuf_size_bytes,

this patch will allow application to report error code to api user
who might have an idea how to recover, before assert is triggered,
also reporting error along with the print out message might give user
a better idea of what is going on, where previously reason for
mentioned assert was not immediately clear

- pcm: rate: Avoid pointer arithmetic on `void *`

The pointer operand to the binary `+` operator must be to a complete
object type.

- pcm: direct: Remove unused empty struct - pcm: Make sure parameter qualifiers match between declaration and definition - pcm: hw: Don't return in a void function

A return statement with an expression in a function returning void is
a constraint violation.

- Use __func__ instead of __FUNCTION__

They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
for backwards compatibility with old gcc versions.

- pcm_file: another locking fix (coverity) - pcm_file: coverity fixes (including double locking) - pcm_hw: close file descriptor in the error path in snd_pcm_hw_open() (coverity) - pcm_file: call pclose() correctly for popen() (coverity) - pcm: fix memory leak in _snd_pcm_parse_config_chmaps() (coverity) - pcm: file: add infile read support for mmap mode

mmap_begin callback is used to copy data from input file to mmaped
buffer

guard for corner use of api (multiple mmap_begin calls by user) is
introduced to check if next continuous buffer was already overwritten

buffer is overwritten with input file data only in case of stream capture

- pcm: add mmap_begin callback to snd_pcm_fast_ops_t api

main motivation for adding the callback is to use it to enable operation
on mmaped buffer before user access for pcm_file plugin

support for MMAP read access with masking by data from input file is not
implemented for pcm_file plugin, by adding this callback implementing
such feature can be done by rewriting next continuous portion of buffer
on each mmap_begin call

plugins like softvol use pcm_plugin interface and overwrite the buffer by
looping around it in avail_update callback, this patch hopes to simplify
the task by adding new api callback, removing the need for rewriting
pcm_file (to use pcm_plugin callbacks) and careful checking when looping
around whole mmaped buffer

- pcm: file: add missing unlock on early return - pcm: file: use snd_pcm_file_areas_read_infile for readi

use previously introduced helper function, this commit unifies behavior
of readi and readn

corner case behavior of readi is changed by this commit, previously,
in case 0 bytes were red from file (EOF), frames = 0 was returned,
signaling api user as if no data was red from slave, after the patch,
amount of frames red from slave with data red from slave stored in buffer
is returned when EOF is reached

- pcm: file: add support for infile reading in non interleaved mode

add helper function to copy input file data to buffer mapped by areas,
in case of an error, do not fill the areas, allowing device read buffer
to be provided to api caller

previously unused rbuf variable is reused for this purpose

- pcm: dsnoop: Added "hw_ptr_alignment" option in configuration for slave pointer alignment

This change adapt the fix commit 6b058fda9dce
("pcm: dmix: Add option to allow alignment of slave pointers")
for dsnoop plugin

Issue is that snd_pcm_wait() goes back to waiting because the hw_ptr
is not period aligned. Therefore snd_pcm_wait() will block for a longer
time as required.

With these rcar driver changes the exact position of the dma is returned.
During snd_pcm_start they read hw_ptr as reference, and this hw_ptr
is now not period aligned, and is a little ahead over the period while it
is read. Therefore when the avail is calculated during snd_pcm_wait(),
it is missing the avail_min by a few frames.

An additional option hw_ptr_alignment is provided to dsnoop configuration,
to allow the user to configure the slave application and hw pointer
alignment at startup

- pcm: dshare: Added "hw_ptr_alignment" option in configuration for alignment of slave pointers

This change adapt the fix commit 6b058fda9dce
("pcm: dmix: Add option to allow alignment of slave pointers")
for dshare plugin

Issue is that snd_pcm_wait() goes back to waiting because the hw_ptr
is not period aligned. Therefore snd_pcm_wait() will block for a longer
time as required.

With these rcar driver changes the exact position of the dma is returned.
During snd_pcm_start they read hw_ptr as reference, and this hw_ptr
is now not period aligned, and is a little ahead over the period while it
is read. Therefore when the avail is calculated during snd_pcm_wait(),
it is missing the avail_min by a few frames.

An additional option hw_ptr_alignment is provided to dshare configuration,
to allow the user to configure the slave application and hw pointer
alignment at startup

- pcm: direct: Add generic hw_ptr_alignment function for dmix, dshare and dsnoop

Move the code snd_pcm_direct_reset_slave_ptr() from pcm_dmix.c
to pcm_direct.c and its header so that the helper function can be
re-used by other direct-pcm plugins.
There is no change in the behavior or the functionality.

PCM Plugin API

- pcm: the maximal rate is 768000Hz, fix the remain code

RawMidi API

- rawmidi_hw: add sanity check for the invalid stream arguments (coverity) - rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)

Use proper reference counting for the dynamic symbol.

Topology API

- create separated libatopology library with the topology routines - topology: Fix variable overflow in split_format

The 1 which was 32-bit long, when left-shifted by more than 31 caused
an overflow, which resulted in some of the formats being not supported.

- topology: add support to parse private data for pcm

We have private data section in struct snd_soc_tplg_pcm, but alsatplg
doesn't support handling it yet, here add handling in tplg_parse_pcm()
to enable it.

- topology: next round of coverity fixes - topology: various coverity fixes

Use Case Manager API

- ucm: add possibility to keep order of childs for If blocks

Because of the nature of the structured parser, it is not guaranteed
that the order of the parsed tree is equal to the lines in the source.

Add possibility to insert the If results before or after the selected
identifier like:

SectionDevice."Speaker" {
  ...
}

If.1 {
        Condition { ... }
        Before.SectionDevice "Speaker"
        True { ... }
}
If.2 {
        Condition { ... }
        After.SectionDevice "Speaker"
        True { ... }
}

If the "After" or "Before" identifiers are not found, the result is added
after the last entry in the block.

- ucm: change the If block parsing

- evaluate always If before the other blocks

- ucm: docs: Add MinBufferLevel value

Allows ucm to override minimum buffer level for platforms that
incorrectly report their buffer level.

- ucm: docs: Add EDID File value

Add a sys path to the EDID file for the corresponding HDMI device so
userspace can use if needed

- use-case header file: add more references to correct ASCII ID parsers for CTL/mixer IDs - ucm: add snd_use_case_parse_selem_id()

and add strict ucm_id checks to snd_use_case_parse_ctl_elem_id()

- ucm: add If.Condition.RegexMatch

If.1 {
        Condition {
                Type RegexMatch
                String "something to match"
                Regex ".*(thing)"
        }
        ...
}

- ucm: add ${CardComponents} substitution to the value string processing - ucm: evaluate nested If blocks also in True/False blocks - ucm: add If.Condition.String to match strings and substrings

Case insensitive string match:

If.1 {
        Condition {
                Type String
                String1 "aa"
                String2 "bb"
        }
        True {
                ...
        }
}

Substring is present (case sensitive):

If.1 {
        Condition {
                Type String
                Haystack "White Horse"
                Needle "Horse"
        }
        True {
                ...
        }
}

- ucm: add snd_use_case_parse_ctl_elem_id() - ucm: add PlaybackCTL and CaptureCTL default values when they are not set - ucm: small cosmetic uc_error change in execute_sequence() - ucm: add If condition block

The syntax is simple:

If./any-if-identificator/ {
  Condition {
    Type /type_here/
    /optional defines/
  }
  True {
    /block used when condition is evaluated as true/
  }
  False {
    /block used when condition is evaluated as false/
  }
}

The Type "ControlExists" is implemented:

Condition {
  Type ControlExists
  Device "hw:${CardId}"
  Control "iface=CARD,name='Headphone Jack'"
}

- ucm: do not cache all control devices in get_card_long_name() - ucm: parser - use less memory for integer/real values in parse_value() - ucm: save the whole ctl info to the ctl_list structure - ucm: add the run-time variable substitution

Those two variables are supported:

  ${ConfName}      - configuration file name
  ${CardId}        - card identification string (like PCH)
  ${CardName}      - card name (driver)
  ${CardLongName}  - card long name (driver)
  ${env:ENV_NAME}  - returns the environment variable ENV_NAME

- ucm: fix memory leaks for cdev, bin-file and tlv elements - ucm: do not report failure when long name configuration does not exist - ucm: add support for multiple control devices, more aggresive caching - ucm: extend snd_use_case_mgr_open() to address the sound card directly

Some clients like pulseaudio wants to access the multiple instances
of sound cards. This patch adds prefixes like "hw:" to the card_name
argument to handle this. The card index (value) or card identification
(string) can be used for this prefix.

Also the prefix "strict:" was added to avoid the driver name and
driver long name matching. It might be useable for use case
configurations which are not bound to the one sound card.

- ucm: switch to ucm2 directory and v2 format, keep backward compatibility - conf: improve the include paths code

- various cleanups (more straight code and allocations)
- do not add the base config path /usr/share/alsa to the
  explicit include list of directories
  (it's not wanted for ucm configs)

- ucm: parse_verb_file() - remove folder_name variable and extra logic

The member uc_mgr->conf_file_name already contains the used directory
name.

- ucm: fix uc_mgr_scan_master_configs() - skip correctly component directories - ucm: cosmetic fix in get_card_long_name() - ucm: another coverity fix in uc_mgr_config_load() - ucm: coverity fixes

/Makefile.am

- create separated libatopology library with the topology routines

/src/Makefile.am

- create separated libatopology library with the topology routines

ALSA Server

- Use __func__ instead of __FUNCTION__

They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
for backwards compatibility with old gcc versions.

- aserver: fix resource leak coverity

Configuration

- conf: implement snd_config_add_before() and snd_config_add_after() - topology: remove configuration files (moved to alsa-topology-conf repository) - ucm: remove configuration files (moved to alsa-ucm-conf repository) - conf: improve the include paths code

- various cleanups (more straight code and allocations)
- do not add the base config path /usr/share/alsa to the
  explicit include list of directories
  (it's not wanted for ucm configs)

- conf: List cases in range explicitly

Case ranges are a GNU extension, and provide only a slight readability
improvement.

- config: parse_string() fix the dynamic buffer allocation failure code (coverity) - src/conf.c: add missing va_end() call (coverity) - ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles

Adding a new Conexant CX2072X codec profile and reusing the existing
BYT/CHT platform snippets.

Currently tested only on ASUS E200HA laptop.

Dynamic Loader helpers

- rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)

Use proper reference counting for the dynamic symbol.

Utils

- create separated libatopology library with the topology routines

alsa-utils

Core

- Release v1.2.1

Audio Transfer utility

- axfer: handle -ETIMEDOUT before non-block I/O operation

When running for IRQ-based scheduling model, transmission backend is
expected to queue PCM event in different context from the main thread.
When queueing no events during time equivalent to one period of PCM
buffer, the backend has problems.

This commit outputs report it for non-blocking operation for IRQ-based
scheduling model. The timeout is equivalent to all frames in buffer,
instead of period for safe.

- axfer: code refactoring for a helper function to wait for avail buffer space

This commit applies code refactoring for waiting PCM event queued
per period of PCM buffer in copying operation for IRQ-based scheduling
model.

- axfer: handle -ETIMEDOUT before handle mmap I/O operation

When running for IRQ-based scheduling model, transmission backend is
expected to queue PCM event in different context from the main thread.
When queueing no events during time equivalent to one period of PCM
buffer, the backend has problems.

This commit outputs report it for mmap operation for IRQ-based
scheduling model. The timeout is equivalent to all frames in buffer,
instead of period for safe.

- axfer: return ETIMEDOUT when no event occurs after waiter expiration

Although the waiter abstraction handles timeout as success, it should
report for callers to know timeout.

This commit takes the waiter to return -ETIMEDOUT when timeout expires.

- axfer: fix to return error code when a call of select(2) fails

A call of select(2) returns negative code and report errors via errno
local variable, howver current waiter implementation for select(2)
returns the negative code instead of errno.

This commit fixes it.

- axfer: return the number of file descriptors for I/O events from select(2) waiter

A call of select(2) returns error code at failure, the number of file
descriptors available I/O at success. Current implementation of
waiter abstraction for select(2) returns 0 at success and callers
can't get the number.

This commit fixes it.

- axfer: test: fix invalid comparison of 64 bit storage in ILP32 data type

In system V ABIs with ILP32 data model, bit shift for '1ul' can brings
undefined behaviour when the calculation result is over 32 bit width.

This commit fixes the bug.

Reference: https://bugs.gentoo.org/681652
Reference: https://github.com/alsa-project/alsa-utils/issues/23

- axfer: mapper: fix parameter check for demuxer

Each container should be configured to store one saple per frame in
demuxer case. This commit fixes the bug.

- axfer: remove unused variable warnings

alsamixer

- alsamixer: Remove exp10 usage

exp10 is a GNU extension and not available everywhere (eg. uClibc-ng).

alsatplg (topology)

- alsaucm, topology: LDADD cleanups and add support for libatopology

alsaucm

- alsaucm: fix the implicit card open - alsaucm, topology: LDADD cleanups and add support for libatopology - alsaucm: do the implicit ucm open only when the command requires it - alsaucm: call snd_config_update_free_global() to make valgrind more happy

amixer

- amixer: do not double LF for container type

aplay/arecord

- aplay: fix memory leak when setup_chmap() fail

setup_chmap() will return with error number if hw_map calloc fail or
channels doesn't match with hw_params, but memory free was ignored when
error occurs.

alsa-plugins

Core

- Release v1.2.1

PulseAudio -> ALSA plugin

- pulse: Add DEVICE parameter

Basically this patch adds the DEVICE parameter to pulse PCM and
control plugins, so that users may pass the specific pulse device
for multiple opens.  Along with the addition of the DEVICE parameter
in the config definition, the plugin code is slightly modified for
allowing to receive the empty strings that are treated as the
"default" mode (= NULL).

Detailed changelog between 0.0.0 and 1.2.1 releases

Changelog between 1.0.29 and 1.2.1 releases

alsa-ucm-conf

Configuration

- sof-hda-dsp: add MixerId values, change order for BassSpeaker

- do not set the speaker volume for the BassSpeaker
- do not set ConflictingDevice for HeadphoneMic
  (one way should be enough in DigitalMic)

- add ucm/README.md and ucm2/README.md - VEYRON-I2S: adapt to ucm2 - skylake-rt286: adapt to ucm2 - SDP4430: adapt to ucm2 - PAZ00: adapt to ucm2 - PandaBoardES: adapt to ucm2 - PandaBoard: adapt to ucm2 - HDAudio-Lenovo-DualCodecs: adapt to ucm2 - HDAudio-Gigabyte-ALC1220DualCodecs: adapt to ucm2 - GoogleNyan: adapt to ucm2 - Dell-WD15-Dock: adapt to ucm2 - DB820c: adapt to ucm2 - DB410c: adapt to ucm2 - DAISY-I2S: adapt to ucm2 - broxton-rt298: adapt to ucm2 - broadwell-rt286: adapt to ucm2 - sof-hda-dsp: adapt to latest alsa-lib

- move to ucm2
- add 'Syntax 2' to the main configuration files
- use condition for 'Headphone Jack' / 'Headphone Mic Jack' selection
- remove cdev (not required)
- use ${CardId} where appropriate
- merge config for Lenovo Carbon X1 7th gen to main HiFi.conf

- sof-hda-dsp: the JackHWMute definition should be in the Headphone device - sof-hda-dsp: fix the volume/switch values in HiFi - sof-hda-dsp: add ValueDefaults sections with correct CTL devices - sof-hda-dsp: do not touch the analog part for HDMI/DP - sof-hda-dsp: use more user friendly names for Dmic

Also correct the names in ConflictingDevice sections
(must be device name - not comment text).

- sof-hda-dsp: Fix the Hdmi config for the Lenovo Carbon X1 (7th gen) - sof-hda-dsp: improve the Hdmi use case comment - sof-hda-dsp: fix the capture device names (use sofhdadsp) - SOF/HDA/SKL UCM: rename from sof-skl_hda_card to sof-hda-dsp

Follow the kernel change and rename everything to more clear
sof-hda-dsp.

- sof-skl_hda: change to use common HDMI codec driver

Modify UCM sequences to use user-space interface of the common
HDMI codec driver. Use of hdac-hdmi driver is no longer supported
by this UCM file.

To use this UCM file, kernel must be compiled with
SND_SOC_SOF_HDA_COMMON_HDMI_CODEC

- sof-skl_hda: move hdmi as separate use case

Move hdmi definitions as separate use case and conf file. This will
enable Pulseaudio to create separate profile for hdmi and make routing
much more fluent than with single profile.

- sof-skl_hda: add PlaybackVolume and CaptureVolume definitions

PlaybackVolume and CaptureVolume are not defined currently and these are
needed in the future for example with Pulseaudio to enable hardware
volume control.

- sof-skl_hda: add device definition to speaker disable sequence

For example Pulseaudio is not able to run the disable sequence
if the device is not defined. So add the definition.

- sof-skl_hda: remove volume setting in enable/disable sequences

If the volume setting is defined in enable sequence you will
always get that exact volume when switching outputs in some
user space software like Pulseaudio. Pulseaudio will itself
keep track of the volume previously set.

- skylake-rt298: cleanups, add .conf suffixes - broxton-rt298: cleanups, add .conf suffixes - kblrt5660: cleanups, add .conf suffixes - broadwell-rt286: cleanups, add .conf suffixes - DB410c: cleanups, add .conf suffixes - DB820c: cleanups, add .conf suffixes - SDP4430: cleanups, add .conf suffixes, upper/lower case - PandaBoardES: cleanups, add .conf suffixes, upper/lower case - PandaBoard: cleanups, add .conf suffixes, upper/lower case - add configuration for Lenovo ThinkPad Carbon X1 7th gen (Bass Speaker) - remove 'Bass Speaker' from the generic sof_skl_hda-card config - Add initial support for generic SOF Skylake driver (DMIC)

Based on: https://github.com/RanderWang/intel-UCM/tree/hdmi/sof-skl_hda_card

Cleanups, remove commented or empty configuration.

- conf/ucm: cht-bsw-rt5672: Add board specific profile for Lenovo Thinkpad 8 tablet

The Lenovo Thinkpad 8 tablet has stereo speakers and its internal DMIC
on DMIC1, at a device specific profile for this.

- conf/ucm: Add UCM profile for cht-bsw-rt5672 boards

Add an UCM profile for Intel boards with a RT5672 codec.

Re-use the existing platform enable and disable sequences for BYT/CHT SST
support and add a codecs/rt5672 dir with codec specific enable / disable
sequences for the various inputs and outputs.

This is partly based on earlier work done here:
https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672

- ucm: Add UCM profile for CX2072X codec on Baytrail/Cherrytrail profiles

Adding a new Conexant CX2072X codec profile and reusing the existing
BYT/CHT platform snippets.

Currently tested only on ASUS E200HA laptop.

- ucm: bytcr/PlatformEnableSeq.conf update some comments

Commit f91cc3c7d6b7 ("Update chtrt5645 ucm variants to use
bytcr/PlatformEnableSeq.conf component") updated the
following 2 comments:

 # codec0_out settings (used if SSP2 is connected to aif1)
 # modem_out settings (used if SSP0 is connected to aif2)

Specifically it added the " to aif1" resp. " to aif2" part of the comments.

This is not correct, AIF1 / AIF2 are something which is present on
Realtek codecs only, and either one can be used indepedent of
SSP0 or SSP2 being used (the comments in the chtrt5645 UCM profile
before this change were wrong / outdated).

Besides there not being any relationship between SSP0 or SSP2 being
used, bytcr/PlatformEnableSeq.conf is also used with other codecs,
e.g. the ESS8316 codec where this is not applicable at all.

Therefor this commit removes the " to aif?" part of the comments again
to avoid confusing people reading this in the future.

- ucm: Add ucm files for DB820c board

DB820c board is based of MSM8996 Qualcomm SoC, which has support for both
Digital and Analog audio. Digital audio is over HDMI and analog is over
WCD9335 codec via SLIMbus.

Board itself has HDMI port, a 3.5mm audio Jack and an Audio expansion
connector.
This patch adds support for HDMI port and 3.5mm jack.

- Revert "conf/ucm: Add a UCM profile for Dell WD19 Dock USB-audio"

This reverts commit 914327e00b7626b1acd176d498f35f7b4e213dd3 .

The USB driver defines identical profile as for WD15.

- conf/ucm: Add a UCM profile for Dell WD19 Dock USB-audio

USB-audio device on Dell WD19 docking station provides two individual
output PCM streams, one for headphone Jack and another for speaker out
Jack. A UCM profile gives the proper roles for these.

- conf/ucm: bytcht-es8316: Add long-name UCM profiles

After recent kernel work, the kernel now sets a long-name for bytcht-es8316
boards which indicates if a single (mono) speaker or stereo speakers are
used and if in1 or in2 is used for the internal mic (the headset mic will
be on the other input).

This commit adds UCM profiles for bytcht-es8316 boards using these new
long-names, based on the generic bytcht-es8316 profile.

- conf/ucm: Add UCM profile for bytcht-es8316 boards

Add an UCM profile for Bay Trail and Cherry Trail boards with an
ES8316 codec.

Re-use the existing platform enable and disable sequences for BYT/CHT SST
support and add a codecs/es8316 dir with codec specific enable / disable
sequences for the various inputs and outputs.

- Create device component for rt5645 Internal Analog Mic UCM

Since the Internal Analog Microphone device configuration is
identical for the rt5645 and rt5645 mono speaker UCMs, move
the entire definition to a component.

- Factor out rt5645 variants Headset+Digital Mic UCM shared {en,dis}able sequences - Factor out rt5645 variants Speaker+Headphones shared UCM enable sequences

Move common enable sequences for rt5645 variants and rt5650
UCM configurations into a shared component. The corresponding
disable sequences are only two lines each and do not seem worth
creating components for.

- Create shared {En,Dis}ableSeq.conf components for rt5645 variants

Factor out the common enable and disable sequences used
in rt5645 variants, including the rt5650. Move the sequences
into a new component directory codecs/rt5645/ along with
a Makefile.

Some lines like
    cset "name='Stereo1 ADC1 Mux' 1"
and
    cset "name='I2S2 Func Switch' on"
are not set set in the chtrt5650 UCM sequences and thus are not present
in the new component, in order to maximize reuse.

- Update chtrt5645 ucm variants to use bytcr/PlatformEnableSeq.conf component

The Lenovo Ideapad Miix 320, Asus T100HA, and chtrt5645 mono variant
UCM configurations have not been updated to make use of the shared
bytcr/PlatfromEnableSeq.conf sequence. This commit deletes those
command sequences and loads the shared component directly.

- conf/ucm: bytcr-rt5651: Document mono speaker wiring

During my recent work on the bytcht-es8316 UCM profile I realized that the
bytcr-rt5651 devices with a single speaker use a differential setup just
like the es8316 does. The tell-tale here is the speaker going quiet when
playing the exact same sound on both channels when things are configured
for stereo speakers.

I've run some tests and the rt5651 does have a special mono balanced out
mode for its line-out but using this results in the same sound (and the
same loudness / volume of the sound) as our current solution, so adding
support for this to the kernel buys us nothing.

This commit makes no changes, it just documents my findings in a big
comment for future reference.

- conf/ucm: bytcr-rt5651: Add bytcr-rt5651-stereo-spk-dmic-mic config

Add a config for boards which use a digital mic as internal mic,
combined with having the headset mic on in2.

An example of such a board is the Point of View TAB-P1006W-232 (v1.0) tablet.

- conf/ucm: bytcr-rt5651: Add digital mic support

Add a new ucm/codecs/rt5651/DigitalMic.conf snippet for digital mic support
and include this in the default non board-specific bytcr-rt5651.conf.

- conf/ucm: bytcr-rt5651: Add support for a headset-mic on IN2

The first design with the headset-mic on IN2 rather then the
default / reference-design IN3 has shown up.

Add a new ucm/codecs/rt5651/IN2-HeadsetMic.conf snippet to deal with this
and include this in the default non board-specific bytcr-rt5651.conf.

- conf/ucm: bytcr-rt5651: Enable Stereo? ADC MIXL ADC? switches when enabling inputs

Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input,
rather then just enabling them all in ucm/codecs/rt5651/EnableSeq.conf .

This is a preparation patch for adding digital mic support.

- conf/ucm: kblrt5660: Add ucm setting for Dell Edge IoT platform

The new generation of Dell Edge IoT platform is based on Intel
Kabylake platform, and the audio codec is ALC3277 which is 100%
compatible with RT5660 in I2S mode.

The audio design on this IoT platform is as below:
 - Intel kabylake platform
 - connect the codec ALC3277 via SSP0
 - line-out and line-in with Micbias jacks
 - line-out mute control and jack detection of line-out and line-in
 - two HDMI ports with audio capability

- conf/ucm: chtrt5650: Add UCM config for chtrt5650

Add a UCM configuration for the rt5650 codec. Tested on
a Samsung Chromebook 3. Adapted with minor modifications
from GitHub user evan-a-a's gist:
https://gist.github.com/evan-a-a/86b2a698708074530e2d0ee7c6498767

- ucm: Set default include path

Many UCM profiles include the UCM profile components under ucm/*
subdirectories and thusly put <searchdir:ucm> at each place.  This is
rather cumbersome.

This patch makes the UCM parser to set the default include path, so
that each profile no longer needs to set searchdir.  All the
<searchdir:ucm> lines currently found in the profiles are removed
gracefully, too.

For the needed implementation, a new helper,
_snd_config_load_with_include() is introduced.  It's not exported,
only for the use inside alsa-lib.

- conf: Move UCM profile snippets into components subdirectory

We have placed UCM profile snippets to be included by the main config
files also in the same directory, src/conf/ucm, it confuses alsaucm
program that scans over all subdirectories.  It thinks such a file is
also the main config file, and spews errors like:
  % alsaucm
  ALSA lib utils.c:67:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm/bytcr/bytcr.conf
  ALSA lib parser.c:1427:(load_master_config) error: could not parse configuration for card bytcr
  alsaucm: unable to obtain card list: No such file or directory

Actually we already defined the subdirectory for such components, and
they are skipped at parsing the main configs.  So we just need to move
the files there -- this is what's done here.

One more thing done here is to add a new component subdirectory,
platforms, for definitions bytcr/* that don't match with neither the
existing ones (codecs nor dsps).

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>

- conf/ucm/Dell-WD15-Dock: Fix incorrect device names

The device name string for Dell WD15 (and its variants) dock is set as
"WD15Dock", while the actual device name to be used is "Dock".

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1112292

- conf/ucm: bytcr-rt5640: Improve human readable input/output names

The Comment field is displayed tot the end user in various UIs as such
names like MonoSpeaker and DigitalMics without any spaces are no good.

Also the names themselves as well as how they get displayed in the
typical UI (in separate input / output tabs) makes the adding of
playback and capture to the comment superfluous and this looks weird
in the UI, so drop it.

- conf/ucm: bytcr-rt5651: Add bytcr-rt5651-mono-spk-in2-mic-hp-swapped config

Add a longname profile for devices with a mono speaker, the Internal Mic
hooked up to IN2 and the left and right channels of their headphones
output swapped.

- conf/ucm: bytcr-rt5651: Add long-name UCM profiles

After recent kernel work, the kernel now sets a long-name for bytcr-rt5651
boards which indicates if a single (mono) speaker or stereo speakers are
used and if in1, in2, or in1 and 2 are used for the internal mic(s) (the
headset mic sofar is always on in3).

This commit adds UCM profiles for bytcr-rt5651 boards using these new
long-names, based on the generic bytcr-rt5651 profile.

- conf/ucm: bytcr-rt5651: Add mono speaker output profile

Many rt5651 devices only have a single speaker and even though there is
some external mixing done on the PCB, the quality of that mixing is quite
poor and various sounds come out garbled when relying on the on PCB mixing.

Using the codecs builtin mixer to mix left + right to the left output works
much better. This commits adds a new MonoSpeaker.conf output profile which
allows this.

- conf/ucm: bytcr-rt5651: Split into 1 .conf file per input / output

Split the bytcr-rt5651 config into 1 .conf file per input / output as
has already been done for the bytcr-rt5640 and the chtnau8824 profiles.

This allows easy creation of long-name profiles with the specific input /
output combinations found on a board without needing to copy and paste
things.

- conf/ucm: bytcr-rt5651: Add support for mic input on various pins

Note this commit replaces the pre-existing "Handset Microphone" and
"Main Microphone" options, these come from the first commit of the
bytcr-rt5651 UCM profile and were based on wrong assumptions about the
input mappings. None of the existing devices has the Hand/Headset mic
on IN1 as these options assumed.

The rt5651 is used in various configurations with the Internal Mic(s)
hooked up to IN1, IN2, or to IN1 and IN2 and the Headset Mic hooked up
to IN3.

Add support for all these to the generic bytcr-rt5651 profile and name
them accotding to their input + functions.

A follow up commit will add specialized longname configs which
will only expose the inputs actually used on the board with that
longname.

- conf/ucm: bytcr-rt5651: Fix ADC and Mic capture volumes

Fix ADC and Mic capture volumes, so that the microphone inputs actually
work.

- conf/ucm: bytcr-rt5651: Use generic SSP enable + disable sequence, support SSP0

Use the generic SSP enable sequence from bytcr/PlatformEnableSeq.conf,
for boards using SSP2 this is identical the code it replaces and this
adds support for boards using SSP0.

This fixes sound not working on Bay Trail CR tablets with a rt5651 codec.

This commit also calls the generic disable sequence on shutdown
(this is new).

- conf/ucm: bytcr-rt5651: Change Speaker/Headphone en/disable sequences to fix switching

pulseaudio will run the DisableSequence of the current playback device
before running the EnableSequence of the new playback device.

This causes the Platform Clock and BIAS to temporarily get turned off which
on the rt5651 breaks audio-streams which are playing when switching.

This commit moves the disabling to the EnableSequence of the other device
fixing this.

- conf/ucm: bytcr-rt5651: Start with all outputs and inputs disabled

Start with all switches disabled, so that e.g. the
LOUT L/R Playback Switches are not left enabled when starting with
headphones plugged in.

This fixes the platform clock being kept on by these in some cases.

While at also move the IN? Boost and IF1 ASRC Switch lines around
a bit to match the order from https://github.com/plbossart/UCM so
the profiles can be more easily compared.

- conf/ucm: bytcr-rt5651: Configure all volumes at 0dB

The volumes are taken from this commit:
https://github.com/plbossart/UCM/commit/753e2430cd0e6cafbf10c6b29b689dbd32ac5250

That commit also adds line-in support, so it has not been
taken in its entirety.

- conf/ucm: bytcr-rt5651: Do not use both DAC1 and HPVOL inputs for HP

The headphones can either be driven directly from DAC1, or through
the HP volume mixer chain to allow volume control, both can be enabled
at the same time, but this should not be done.

Mix only DAC1 to the headphones and not the HP volume path, there
are 2 reasons to choice the DAC1 path;
1) It is the power-on-reset default
2) We don't expose the volume control to e.g. pulseaudio anyways so it
   is not useful

While at it also move the "HPO MIX DAC1" and "HPO MIX HPVOL" entries up a
bit so that they are no longer inbetween the "HPO L Playback Switch" and
"HPO R Playback Switch" entries.

- conf/ucm: bytcr-rt5645: Use the generic bytcr/PlatformEnableSeq.conf

Use the generic Intel SSP bytcr/PlatformEnableSeq.conf file, it is
identical to all the cset statements this commit removes.

- conf/ucm: VEYRON-I2S: Add internal speakers and mic, other fixes

Other fixes include output/input names (comments) for UIs (pavucontrol)
to display, and Playback/CapturePCM entries so pulseaudio initializes
correctly on this hardware.

- conf/ucm: chtnau8824: Add Cube iWork8 Air and Pipo W2S specific profiles

The Cube iWork8 Air and Pipo W2S tablets both only have a single speaker.
Add long-name profiles for them which are identical to the default
chtnau8824 profile, except that they include the nau8824/MonoSpeaker.conf
snippet instead of the nau8824/Speaker.conf one.

- conf/ucm: chtnau8824: Add UCM profile for chtnau8824 boards

Add UCM profile for chtnau8824 boards based on:
https://github.com/plbossart/UCM/blob/master/chtnau8824

Split into multiple files in the same way as this was done for the
bytcr-rt5640 support, re-using the existing ucm/PlatformEnableSeq.conf
and ucm/PlatformDisableSeq.conf files for the SST mixer settings.

- conf/ucm: bytcr-rt5640: Add default DisableSequence

Add a disable sequence powering off the SST mixer elements, loosely
based on the default DisableSequence from:
https://github.com/plbossart/UCM/blob/master/chtnau8824/HiFi.conf

- conf/ucm: bytcr-rt5640: Add long-name UCM profiles

With a recently merged kernel commit, the kernel now sets a long-name for
bytcr-rt5640 boards which indicates if a single (mono) speaker or stereo
speakers are used and wether dmic1, in1 or in3 is used for the internal
mic (the headset mic sofar is always in2).

This commit adds UCM profiles for bytcr-rt5640 boards using these new
long-names, based on the generic bytcr-rt5640 profile.

The added profiles have the unnecessary input / output options from the
generic profile removed leaving only 2 input and 2 output options, which
are automatically switched between by e.g. pulse based on jack-detect.

- conf/ucm: bytcr-rt5640: Add generic bytcr-rt5640 UCM profile

This commit adds the generic UCM profile for bytcr-rt5640 boards from:
https://github.com/plbossart/UCM, plus the fixes from this pull-req:
https://github.com/plbossart/UCM/pull/31

The profile has been split up into separate per input / output files to
allow for creation of long-name profiles with the specific input / output
combinations found on a board without needing to copy and paste things.

Note this profile exports all inputs and both stereo/mono speaker setups
even though a typical device will not use all. Ideally a long-name based
device specific profile made up of the various parts should be used
instead.

- conf/ucm: Add a UCM profile for Dell WD15 Dock USB-audio

USB-audio device on Dell WD15 docking station provides two individual
PCM streams, one for headphone and another for line out.  A UCM
profile gives the proper roles for these.

- conf/ucm: chtrt5645: At config for the Lenovo Ideapad Miix 320

The Lenovo Ideapad Miix 320 uses a digital mic connected to the DMIC2 input
(unlike the Asus T100HA which has it connected to the DMIC1 input), add a
long-name config specific for the Miix 320, which is a copy of the standard
chtrt5645 config with the internal analog mic section replaced with one
for a digital mic connected to the DMIC2 input.

- conf/ucm: chtrt5645: At config for the Asus T100HA

The Asus T100HA uses a digital mic rather then an analog one, add
long-name config specific for the T100HA, which is a copy of the standard
chtrt5645 config with the internal analog mic section replaced with one
for the digital mic found on the Asus T100HA.

- conf/ucm: chtrt5645: Fix recording from internal analog microphone

The internal analog mic switch is called 'Int Analog Mic Switch'
(not 'Int Mic Switch') and is connected to BST2 not BST1.

Also change the analog mic volume levels so that we get better
audio / less noise.

- conf/ucm: chtrt5645: Microphone recording fixes

Apply microphone recording changes from:
https://github.com/plbossart/UCM.git

[hdegoede@redhat.com: Drop non generic DMIC changes]

- conf/ucm: chtrt5645: Cleanup and playback fixes

Apply cleanup and playback fixes changes from:
https://github.com/plbossart/UCM.git

[hdegoede@redhat.com: Modify commit msg and paths for merging into alsa-lib]

- conf/ucm: increase the input volume for LineIn

Otherwise, the boost value is 0, and the sound captured from that
LineIn jack is too weak for users.

- conf/ucm: Add chtrt5645-mono-speaker-analog-mic configuration

Add a configuration for Cherry Trail boards which use a rt5645 codec
connected to a mono speaker and with an analog mic on IN2N + IN2P.

The chtrt5645-mono-speaker-analog-mic/HiFi.conf for this is based on the
latest version from https://github.com/plbossart/UCM/tree/master/chtrt5645
with all the unused input options removed and some changes made to make
the analog mic work.

This commit also adds 2 ucm dirs with the longname of 2 boards known to use
this setup, which simply contain a symlink to the generic
chtrt5645-mono-speaker-analog-mic entry.

- conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs

Like the previous Lenovo laptops, some Gigabyte mobos have dual
HD-audio codecs and need to switch dynamically via UCM profile.
Reuse the same profile as Lenovo dual codecs, so far.

- conf/ucm: Add dual HD-audio codecs config for Lenovo

Some recent Lenovo laptops have dual codecs and we need to switch them
accordingly.  The kernel side already contains a fix and gives the
unique longname string for identifying the board, and here we hook up
the corresponding UCM profile.

The profile was corrected and tested by Hui Wang on Lenovo p520.

Tested-by: Kailang <kailang@realtek.com>
Tested-by: Hui Wang <hui.wang@canonical.com>

- conf/ucm: rt5651: Mute speakers on boot

The UCM configuration is enabling the speakers in the SectionDefaults.
This is a problem when booting with an headset already connected since
the audio output is routed at the same time both on speakers and
heaphones until the jack is disconnected and reconnected again.

Fix this disabling all the outputs in the default mixer configuration.

- conf/ucm: rt5651: Add missing cdev - conf/ucm: rt5651: Fix HiFi file name

The conf HiFi file name is HiFi.conf, fix the name in the main
configuration file.

- conf/ucm: rt5651: Add UCM config for bytcr-rt5651

Add a UCM configuration for the rt5651 codec on Intel's Cherry-Trail
platform. Adapted from [0].

[0] https://github.com/plbossart/UCM/tree/master/bytcr-rt5651

- conf/ucm: DB410c-HiFi: add CIC selection

This patch adds CIC selection controls which have been added recently to
the kernel to select mic source.

Without this patch user has to manually select the control to record
from DMIC or AMIC.

- conf/ucm: broxton: add broxton-rt298 conf files

This adds the UCM conf files for broxton enabling with rt298 codec on
I2S audio, HDMI and DMIC ports.

- conf/ucm: skylake: add skylake-rt286 conf files

This add the UCM conf files for skylake enabling I2S audio, HDMI and DMIC
ports.

- ucm: Add ucm files for DB410c board.

DB410c board has support for both Digital and Analog audio. Digital
audio is over HDMI and analog is over codec chip integrated inside the
APQ8016 SOC.

It can support:
 -  3 Microphones: Primary Mic(Handset mic), Headset Mic and Secondary
 - 2 Digital Microphones.
 - Earpiece.
 - Headset.
 - Loud Speaker.
 - HDMI.

[Riku: squashed Srinivas's patches together and converted spaces to tabs]

- conf/ucm: chtrt5645: Add UCM config for chtrt5645

Add a UCM configuration for the rt5645 codec on Intel's Cherry-Trail
platform. Tested on the Microsoft Surface 3.

- conf/ucm: ROCKCHIP-I2S: rename to VEYRON-I2S

Commit a192f52fc63a introduced an ucm profile for Rockchip Veyron-
Chromebooks by taking the ucm profile from the ChromeOS userspace.

But similarly to DAISY-I2S, PAZ00 and most other profiles, the audio
setup is pretty specific to a board type, so hogging the Rockchip name
will make it harder for future Rockchip based boards to fit in nicely.

And while Veyron also is a family of boards, all of them share the
same audio setup. The ucm profile was not released with any official
alsa release and the audio setup also isn't in the mainline kernel yet,
so such a rename should be easily possible.

- conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM config.

Taken from the ChromeOS sources, this configuration was tested on Veyron
Jerry based Chromebook from Google.

[Added missing Makefile changes by tiwai]

- conf/ucm: broadwell-rt286: change to set capture volume and capture device

Set 'Mic Capture Volume' in capture device EnableSequence, to fix
capture no volume by default issue.

Also add JackHWMute Value item to mute onboard dmic while headset
mic is plugged in.

Tested-by: Mark Brown <broonie@kernel.org>

- conf/ucm: broadwell-rt286: change to use the correct jack kcontrol name

The headset jack has two kctls: "Headphone Jack" and "Mic Jack",
we need switch speaker output according to the former JackControl.
Here correct it.

- conf/ucm: broadwell-rt286: add ucm config

The configure should apply to all Broadwell-rt286 boards from Intel,
like Wilson Beach SDS Ultrabook.

- conf/ucm: GoogleNyan: Add configuration

Taken from the ChromeOS sources, this configuration should apply to all
Nyan boards from Google, so far HP Chromebook 14 (nyan-blaze) and Acer
Chromebook 13 (nyan-big).

- conf/ucm: PAZ00: add Toshiba AC100/Dynabook AZ new config

Recent mainline kernels threat Toshiba AC100 audio hardware as hw:PAZ00
vs old hw:tegraalc5632.

This patch adds config files for new hw name and include them to
makefiles.

- conf/ucm: DAISY-I2S: Set default filter mode for HiFi.

Default to music mode filter for the HiFi use case on the Samsung ARM
Chromebook.  This mode is better at 44.1k and 48k audio than the
"Voice" setting.

- conf/ucm: tegraalc5632: add UCM config from Ubuntu - conf/ucm: SDP4430: add UCM config from Ubuntu - conf/ucm: PandaBoardES: add UCM config from Ubuntu - conf/ucm: PandaBoard: add UCM config from Ubuntu - conf/ucm: DAISY-I2S: add Samsung ARM Chromebook UCM config from ChromeOS

alsa-topology-conf

Configuration files

- ASoC: topology: Fix bclk and fsync inversion in set_link_hw_format()

The values of bclk and fsync are inverted WRT the codec. But the existing
solution already works for Broadwell, see the alsa-lib config:

`alsa-lib/src/conf/topology/broadwell/broadwell.conf`

This commit provides the backwards-compatible solution to fix this misuse.
This commit goes in pair with the corresponding patch for linux.

Tested-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

- conf: topology: Fix index mismatch for skl and bxt

The topology index in the conf is set to 1, where the driver expects index
set to 0. Fix the inconsistency.

- topology: Update physical link configurations in Broadwell text conf file

To make this conf file a better example, add configurations for the
physical link "Codec", same as that defined by Intel Broadwell upstream
machine driver.

- conf: bxtrt298: Add topology conf file for bxt

Add the conf file for bxt platform as well to define module
private data.

- conf: sklrt286: define module private data through tuples in skylake

In the conf file, module private data can be described through
tuples instead of blobs defined by vendor defined structures.

This patch defines the tuple section and the token list. The
tokens are then used to build the tuple array.

The module data may have both driver data and firmware data. The
driver data is passed using the tuple array and the firmware data
using byte data. A descriptor tuple array is defined to describe
the succeeding data block.

- topology: Update PCM configurations in Broadwell text conf file

To make this conf file a better example, update the name & ID of PCMs
(front-end DAI link) and their cpu DAI (front-end DAI), same as those
defined by Broadwell upstream driver.

- conf: topology: Add Skylake i2s conf

The Skylake topology configuration for simple topology graph is
provided. This exposes the PCM capabilities of the DSP.

- conf: topology: Add topology file for broadwell audio DSP

Detailed changelog between 1.0.29 and 1.2.1 releases

Changelog between 1.0.29 and 1.2.1 releases

alsa-firmware

Core

- Release v1.2.1 - Change FSF address (Franklin Street)

AICA (Dreamcast) Firmware

- Fix up aica firmware licensing

The 3-clause BSD that this firmware uses requires more than just
keeping the copyright notice, like license.txt currently says.
Rather, it has has that "redistributions in binary form (which is
what the ALSA Project is doing, since only the firmware binary is
provided) must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution." This means that more
than just the copyright notice needs to be included. This change is
intended to address this by adding the parts that were omitted
originally.

Cirrus Logic CS46xx Firmware

- Change FSF address (Franklin Street)

Digigram Echo Audio Firmware

- Change FSF address (Franklin Street)

Sound Blaster HDA CA0132 Firmware

- Add new firmware for Creative CA0132 HD-Audio Codec

Support has been added for new cards through the ca0132 driver. These
new firmware files are for these cards.

[ NOTE: the files taken from the original PR to linux-firmware tree.
  These new files basically only addition to the already existing
  CA0132 firmware files, and follow the same license.
  The PR to linux-firmware tree was pending just because it was
  submitted by a third person, which is a quite unusual case.
  -- tiwai ]