Detailed changes v1.1.6 v1.1.7: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (1 revision) |
(No difference)
|
Latest revision as of 16:27, 16 October 2018
Detailed changelog between 1.1.6 and 1.1.7 releases
Changelog between 1.1.6 and 1.1.7 releases
alsa-lib
Core
- - Release v1.1.7
- - 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 <pierre-louis.bossart@linux.intel.com>
- - 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.
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- - 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 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.
- - configure: Fix forgotten ucm entry
- The previous commit forgot to add to configure.ac. Fix it.
- - 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.
- - configure: remove src/conf/alsa.conf.d/Makefile
Control API
- - control_hw: Fix issue when applying seccomp policy
- When seccomp policy is applied to filter ioctl syscall with
- SNDRV_CTL_IOCTL_TLV_COMMAND, SNDRV_CTL_IOCTL_TLV_READ and
- SNDRV_CTL_IOCTL_TLV_WRITE in whiltelist, alsa-lib still breaks
- in at snd_ctl_hw_elem_tlv().
- The problem behind is because ioctl() takes unsigned long cmd
- argument, and the signed bit of local int variable could cause
- 0xff bytes appended after casted to unsigned long.
- In kernel, seccomp data struct takes 64 bits argument to check
- against seccomp rules, these unexpected 0xff bytes could make
- the rule check fail.
- Fix the problem by passing unsigned int to ioctl.
- - hcontrol: use position offset macro of TLV data
- A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset
- of TLV data. This commit applies a code optimization.
- - control: use position offset macro of TLV data
- A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset
- of TLV data. This commit applies a code optimization.
PCM API
- - pcm: ioplug: Transfer all available data
- The snd_pcm_mmap_begin() call returns the amount of contiguous data,
- which is less than the total available if it wraps around the buffer
- boundary.
- If we don't handle this split we leave stale data in the buffer that
- should have been overwritten, as well as unread data in the io_plugin
- that gets transferred on a subsequent call at the wrong offset.
- - pcm: rate: Add error check for snd_pcm_avail_update()
- Without these changes a negative error code returned by
- snd_pcm_avail_update() will be not handled correctly.
- With this patch the returned error code of snd_pcm_avail_update() will be
- returned by snd_pcm_rate_avail_update().
- - pcm: ioplug: Provide avail helper function for plugins
- This function can be called without calling snd_pcm_avail_update().
- The call to snd_pcm_avail_update() can take some time.
- Therefore some developers would not like to call it from a real-time
- context (e.g. from JACK client context).
- - pcm: snd_interval_refine_first/last: exclude value only if also excluded before
- Without this commit the following intervals [x y), (x y) were be
- replaced to (y-1 y) by snd_interval_refine_last(). This was also done if
- y-1 is part of the previous interval.
- With this changes it will be replaced with [y-1 y) in case of y-1 is
- part of the previous interval. A similar behavior will be used for
- snd_interval_refine_first().
- This solves the issue reported here:
- https://bugzilla.opensuse.org/show_bug.cgi?id=1033179
- and work arounded with commit
- e736715 ("pcm: dmix: Disable var_periodsize as default").
- I am able to reproduce the issue with a simplified aplay use case using
- the following configuration:
- pcm_slave.adr3_tdm_8ch {
- pcm {
- type hw
- card "Loopback"
- device 0
- }
- rate 48000
- period_size 128
- buffer_size 1024
- channels 2
- }
- pcm.dshare_Playback_3 {
- type dmix
- ipc_key 600
- ipc_perm 0660
- ipc_gid audio
- var_periodsize true
- slave adr3_tdm_8ch
- }
- pcm.AdevAcousticoutSpeech {
- type rate
- slave.pcm dshare_Playback_3
- slave.rate 48000
- }
- $ modprobe snd_aloop
- $ aplay -v --period-size=352 -c2 -fS16_LE -r22500 -DAdevAcousticoutSpeech /dev/urandom
- ...
- Rule 9 (0xffff91d1f230): PERIODS=(0 2) -> NONE BUFFER_SIZE=480 PERIOD_SIZE=[240 240]
- refine_soft 'AdevAcousticoutSpeech' (end--22)
- ...
- aplay: ../../alsa-utils-1.1.5/aplay/aplay.c:1390: set_params: Assertion `err >= 0' failed.
- Aborted by signal Aborted...
- The following stack trace shows where the -EINVAL will be thrown:
- __snd_pcm_hw_params_set_period_size_near()
- snd1_pcm_hw_param_set_near()
- snd1_pcm_hw_param_set_last()
- snd1_pcm_hw_refine_slave()
- snd1_pcm_hw_refine_soft()
- snd_pcm_hw_rule_div()
- snd1_interval_refine()
- This issue exists due to PERIODS does not include 2
- Rule 9 (0xffff91d1f230): PERIODS=(0 9) -> (0 2) BUFFER_SIZE=[120 480]
- PERIOD_SIZE=(240 241)
- because of an invalid integer inverval of PERIOD_SIZE of (240 241).
- This interval is set by snd_interval_refine_last().
- - pcm: Define refine mask bits explicitly (and fix missing DSD support)
- Instead of the expanded bit numbers like 0x81ffffff, list up the all
- supported PCM bits explicitly for refine_masks[] in pcm_params.c.
- This makes easier to update any additional formats or other
- parameters, and easier to spot out missing ones.
- Actually the GSM and DSD formats were missing; with this commit, they
- are supported properly now.
- - pcm: dmix: Fix hwptr updates at status call
- In the commit 38a2d2eda880 ("pcm: dmix: Do not discard slave reported
- delay in status result"), the PCM dmix hwptr update code was rewritten
- to follow the slave PCM hwptr update. This is based on the similar
- change in PCM dshare, the commit faf53c197cab.
- There was a bug in the commit 38a2d2eda880 regarding the PCM state
- change, and it was addressed in commit 3752e6b8733d ("pcm: dmix: Fix
- the inconsistent PCM state"). However, we've hit yet another bug in
- this commit. Namely, the hwptr update was forgotten in the
- snd_pcm_dmix_sync_ptr0() function. So the hwptr value passed from
- snd_pcm_dmix_status() isn't properly stored, and it screws up at some
- long run occasionally.
- This patch covers the bug by replacing with the right value.
- Fixes: 38a2d2eda880 ("pcm: dmix: Do not discard slave reported delay in status result")
- Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200013
- - pcm ioplug: fix some coverity issues (switch, missing unlock in snd_pcm_ioplug_drain())
- - pcm: add missing flags initialization for the fallback control data
- - pcm: softvol: use position offset macro of TLV data
- A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset
- of TLV data. This commit applies a code optimization.
- - pcm: hw: use position offset macro of TLV data
- A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset
- of TLV data. This commit applies a code optimization.
- - pcm: softvol: Allow up to 90 dB of gain
- The gain algorithm used in softvol can handle gain factors of up to
- 32767 which is slightly more than 90 dB, so allow a max_dB of 90 dB.
- This doesn't affect existing asound.conf files, but does allow a
- max_dB of up to 90 dB when needed.
- Tested using Audacity that there is no undue distorsion or other
- artefacts when 90 dB of gain is applied to a suitable signal (i.e.
- a signal quiet enough not be clipped whan applying 90 dB of gain).
PCM Plugin API
- - pcm: Fix header guard in pcm_plugin.h
Sequencer API
- - seq: Fix signedness in MIDI encoder/decoder
- The qlen field of struct snd_midi_event was declared as size_t while
- status_events[] assigns the qlen to -1 indicating to skip. This leads
- to the misinterpretation since size_t is unsigned, hence it passes the
- check "dev.qlen > 0" incorrectly in snd_midi_event_encode_byte(),
- which eventually results in a memory corruption.
- Also, snd_midi_event_decode() doesn't consider about a negative qlen
- value and tries to copy the size as is.
- This patch fixes these issues: the first one is addressed by simply
- replacing size_t with ssize_t in snd_midi_event struct. For the
- latter, a check "qlen <= 0" is added to bail out; this is also good as
- a slight optimization.
- Reported-by: Prashant Malani <pmalani@chromium.org>
Topology API
- - ASoC: topology: Add alias conf parameter names for hw_configs
- Currently, some parameter names in conf differ from field names in struct.
- These look like typos.
- This commit suggests to add aliases for such parameters, so that the names
- in conf are similar to names in struct. This solution is backwards
- compatible.
- If the difference between conf names and struct names is done on purpose -
- this commit can be dropped.
- - ASoC: topology: Add definitions for mclk_direction values
- Current comment makes not clear the direction of mclk. Previously, similar
- description caused a misunderstanding for bclk_master and fsync_master.
- This commit solves the potential confusion the same way it is solved for
- bclk_master and fsync_master.
- - ASoC: topology: Add missing clock gating parameter when parsing hw_configs
- Clock gating parameter is a part of `dai_fmt`. It is supported by
- `alsa-lib` when creating a topology binary file, but ignored by kernel
- when loading this topology file.
- After applying this commit, the clock gating parameter is not ignored any
- more. This solution is backwards compatible. The existing behaviour is
- not broken, because by default the parameter value is 0 and is ignored.
- snd_soc_tplg_hw_config.clock_gated = 0 => no effect
- snd_soc_tplg_hw_config.clock_gated = 1 => SND_SOC_DAIFMT_GATED
- snd_soc_tplg_hw_config.clock_gated = 2 => SND_SOC_DAIFMT_CONT
- For example, the following config, based on
- alsa-lib/src/conf/topology/broadwell/broadwell.conf, is now supported:
- ~~~~
- SectionHWConfig."CodecHWConfig" {
- id "1"
- format "I2S" # physical audio format.
- pm_gate_clocks "true" # clock can be gated
- }
- SectionLink."Codec" {
- # used for binding to the physical link
- id "0"
- hw_configs [
- "CodecHWConfig"
- ]
- default_hw_conf_id "1"
- }
- ~~~~
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- Tested-by: Pan Xiuli <xiuli.pan@linux.intel.com>
- Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Use Case Manager API
- - ucm: adding the folder of card_long_name when finding verb conf file
- The board configuration file and verb conf file are allowed to be
- in the folder named of card_long_name, so when finding the verb conf
- file, we need to check if it is in the folder of card_long_name or
- card_name.
Configuration
- - 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.
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- - 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.
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- - 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.
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- - conf/ucm: bytcr-rt5651: Fix ADC and Mic capture volumes
- Fix ADC and Mic capture volumes, so that the microphone inputs actually
- work.
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- - 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.
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- - 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.
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- - 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.
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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: USB-audio: Fix for Xonar U7 SPDIF device
- Add the entry for Xonar U7 to make SPDIF working on it.
- Reported-by: Steve Banks <eassbank@gmail.com>
- - 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.
- - 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 <pierre-louis.bossart@linux.intel.com>
- Tested-by: Pan Xiuli <xiuli.pan@linux.intel.com>
- Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - conf: remove alsa.conf.d from the datadir
- - alsa.conf: change the location for add-on configs to /etc/alsa/conf.d
- The add-on configuration files should be placed to a volatile place.
External PCM I/O Plugin SDK
- - ioplug: Fix comment in struct snd_pcm_ioplug
- This patch fixes the comment about 'pcm' field in 'struct
- snd_pcm_ioplug' which wrongly refers to snd_pcm_extplug_create().
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - pcm: ioplug: Provide avail helper function for plugins
- This function can be called without calling snd_pcm_avail_update().
- The call to snd_pcm_avail_update() can take some time.
- Therefore some developers would not like to call it from a real-time
- context (e.g. from JACK client context).
Kernel Headers
- - timer: fix wrong comment to refer to 'SNDRV_TIMER_PSFLG_*'
- ALSA timer core has a comment referring to 'SNDRV_MIXER_PSFLG_*' in
- a definition of 'struct snd_timer_params' of UAPI header. I can see
- this in initial state of ALSA timer core, at least in
- 'alsa-driver-0.4.0.tar.gz'.
- This commit fixes the comment.
- - control: add a series of macro for offset of several types of TLV
- In development period for Linux v4.18, a series of SNDRV_CTL_TLVO_XXX
- macro was introduced to kernel stuffs for position offset of TLV data.
- This commit adds these macros to backport header in this library.
- - ASoC: topology: Add definitions for mclk_direction values
- Current comment makes not clear the direction of mclk. Previously, similar
- description caused a misunderstanding for bclk_master and fsync_master.
- This commit solves the potential confusion the same way it is solved for
- bclk_master and fsync_master.
- - ASoC: topology: Add missing clock gating parameter when parsing hw_configs
- Clock gating parameter is a part of `dai_fmt`. It is supported by
- `alsa-lib` when creating a topology binary file, but ignored by kernel
- when loading this topology file.
- After applying this commit, the clock gating parameter is not ignored any
- more. This solution is backwards compatible. The existing behaviour is
- not broken, because by default the parameter value is 0 and is ignored.
- snd_soc_tplg_hw_config.clock_gated = 0 => no effect
- snd_soc_tplg_hw_config.clock_gated = 1 => SND_SOC_DAIFMT_GATED
- snd_soc_tplg_hw_config.clock_gated = 2 => SND_SOC_DAIFMT_CONT
- For example, the following config, based on
- alsa-lib/src/conf/topology/broadwell/broadwell.conf, is now supported:
- ~~~~
- SectionHWConfig."CodecHWConfig" {
- id "1"
- format "I2S" # physical audio format.
- pm_gate_clocks "true" # clock can be gated
- }
- SectionLink."Codec" {
- # used for binding to the physical link
- id "0"
- hw_configs [
- "CodecHWConfig"
- ]
- default_hw_conf_id "1"
- }
- ~~~~
- Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- - 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 <pierre-louis.bossart@linux.intel.com>
- Tested-by: Pan Xiuli <xiuli.pan@linux.intel.com>
- Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Test/Example code
- - test: use position offset macro of TLV data
- A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset
- of TLV data. This commit applies a code optimization.
alsa-utils
Core
- - Release v1.1.7
- - Release v1.1.6
ALSA Control (alsactl)
- - alsactl: lock - fix the array size (gcc warning)
- - alsactl: use signalfd to catch UNIX signal
- In a mode of 'monitor, event loop runs to dispatch asynchronous event
- emitted by control node. In this case, UNIX signal is used to terminate
- the event loop.
- This commit uses signalfd to catch the UNIX signal.
- - alsactl: handle detection of new sound card
- At present, plug-and-play is not supported in a mode of 'monitor',
- thus new sound card is not handled during runtime. This is not happy.
- This commit uses Linux-specific inotify(7) to monitor '/dev/snd'
- directory. When some files are newly added to the directory,
- event dispatcher is suspended. Event sources are scanned again and the
- dispatcher continue to run.
- - alsactl: handle disconnection of sound card
- Once sound card becomes disconnection state, corresponding control node
- becomes to emit error event for listeners. When catching this type of
- event, event dispatcher should stop observation of the node. However,
- at present, a mode of monitor can't handle this correctly. As a result,
- poll(2) is executed quite frequently in loop with no wait. This results
- 100% consumption of CPU time.
- This commit takes the dispatcher to remove the node from observation
- list when detecting the disconnection state.
- Reported-by: Thomas Gläßle <thomas@coldfix.de>
- - alsactl: obsolete array for maintenance of handlers
- In former commits, handlers of control node are maintained by link list,
- instead of one-dimensional array.
- This commit obsoletes the array and split source preparation to a
- function.
- - alsactl: use a list of source for event dispatcher instead of an array of source
- In a previous commit, handlers of control nodes are maintained by link
- list.
- This commit uses the list to register/unregister event sources to
- dispatcher.
- - alsactl: use link list to maintain source of events
- At present, handlers for control nodes are maintained by one-dimensional
- array. This is not necessarily useful to maintain handlers with
- associated information.
- This commit adds link-list for the maintenance.
- - alsactl: use epoll(7) instead of poll(2)
- Linux kernel supports unique system call; epoll(7). This allows
- applications to make associations for descriptor-unique data in a
- easy way.
- This commit uses epoll(7) instead of poll(2) for this point.
- - alsactl: add an iterator of registered instances of sound card
- In a mode of 'monitor', when given no argument, all of available control
- node is observed for their events. At present, discovering the nodes is
- done according to sound card number, instead of listing nodes in
- configuration space of alsa-lib.
- This commit adds a structure to discover sound cards with a simple
- interface.
- - alsactl: split event loop code to a function
- In a mode of 'monitor', an event loop runs.
- This commit applies a small refactoring to splits the loop into a
- function for readability.
Speaker Test
- - speaker-test: Allow sampling rates up to 768000
- There are audio devices around that support up to 768kHz playback, allow
- testing them by increasing the maximum supported sampling rate.
- - speaker-test: Remove unused variable
- - speaker-test: Support S24_3LE sample format
- Implement support signed 24 bit samples, packed in 3 bytes.
alsaloop
- - alsaloop: pcmjob - fix few warnings
alsamixer
- - alsamixer: fix gcc warnings
alsatplg (topology)
- - alsatplg: add man file
alsaucm
- - alsatplg: add man file
- - alsaucm: add alsa-ucm udev rules for PAZ00 (Toshiba AC100/Dynabook AZ).
aplay/arecord
- - aplay: add missing block brackets
- - aplay: Fix invalid file size check for non-regular files
- aplay tries to check the file size via fstat() at parsing the format
- headers and avoids parsing when the size is shorter than the given
- size. This works fine for regular files, but when a special file like
- pipe is passed, it fails, eventually leading to the fallback mode
- wrongly.
- A proper fix is to do this sanity check only for a regular file.
- Reported-by: Jay Foster <jay@systech.com>
bat (basic audio tester)
- - alsabat: Allow custom sample format for round trip latency test
- Setting the format to BAT_PCM_FORMAT_S16_LE in the round trip latency
- test initialization is redundant as it is already set by default to
- BAT_PCM_FORMAT_S16_LE unless a sample format is specified on the command
- line.
- - bat: alsa.c - move the thread cleanup pop before goto exit3
alsa-tools
Core
- - Release v1.1.7
hwmixvolume
- - hwmixvolume: mention the new dependencies in the README
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - hwmixvolume: add my copyright
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - hwmixvolume: switch the shebang to python
- This signifies that this code is now compatible with both Python 2 and
- Python 3, as per PEP-0394[1].
- [1] https://www.python.org/dev/peps/pep-0394/
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - hwmixvolume: use a with context to open files
- This feature has been added in Python 2.5 and automatically closes an
- open file once the context exits.
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - hwmixvolume: switch to GTK+ 3.0 and GLib 2.0
- This replaces VBox and HBox with Grid (using Gtk.Orientation), HScale
- with Scale, creates labels with mnemonics, set hexpand and vexpand
- properly, use the correct enum container classes, use the correct getter
- for size request, and finally update to the correct GLib watch function.
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - hwmixvolume: replace PyGTK with gobject-introspection
- This doesn’t work yet, we require Gtk 3.0 rather than 2.0 and the API
- changed quite a lot, so this is but a preparatory patch.
- This is done so that we can get rid of GTK+ 2 which has been EOL for
- many years already, and to add Python 3 support because Python 2 will
- very soon be EOL as well.
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - hwmixvolume: use four spaces instead of one tab for indent
- This is the recommended coding style for all Python programs, as
- specified in PEP-0008[1].
- [1] https://www.python.org/dev/peps/pep-0008/
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
ld10k1 (EMU10K1+ DSP Code Loader)
- - ld10k1: define _GNU_SOURCE and use sighandler_t
- __sighandler_t is a glibc internal type which doesn't exist in musl. By using
- AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE defined, both glibc and musl
- then expose sighandler_t.
us428control
- - us428control: Fix clang -Wreserved-user-defined-literal warnings
- | us428control.cc:66:18: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
- | printf("usage: "PROGNAME" [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n");
- | ^
alsa-plugins
Core
- - Release v1.1.7
- - Fix typo in configure.ac (--disable-libav)
- - configure: Require alsa-lib 1.1.6 and newer
- JACK plugin requires the recently added API function.
- - configure: change --with-alsaaddondir to --with-alsagconfdir and --with-alsalconfdir
- The local add-on configuration directory (/etc/alsa/conf.d) contains
- links to the global configuration directory (/usr/share/alsa/alsa.conf.d) now.
- - Move rate-lavc to rate-lav subdirectory and update to use libavresample
- - --disable-avcodec renamed to --disable-libav
- - --avcodec-includedir renamed to --libav-includedir
- - --avcodec-libdir renamed to --libav-libdir
- - --disable-lavcrate renamed to --disable-lavrate
- The .c changes are from Anton Khirnov. The rest is from Jaroslav Kysela.
- - config/Makefile: make everything modular
- - configure: add --with-alsaaddondir, add default config files for plugins
/Makefile.am
- - Move rate-lavc to rate-lav subdirectory and update to use libavresample
- - --disable-avcodec renamed to --disable-libav
- - --avcodec-includedir renamed to --libav-includedir
- - --avcodec-libdir renamed to --libav-libdir
- - --disable-lavcrate renamed to --disable-lavrate
- The .c changes are from Anton Khirnov. The rest is from Jaroslav Kysela.
- - config/Makefile: make everything modular
A52 Output plugin
- - a52: Fix leaks when a52_set_hw_constraint() fails
- If a52_set_hw_constraint() returns error, we leak 'rec' and
- 'rec->slave'. This patch fixes the issue by jumping to 'error' label
- where the proper clean up is already done.
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - configure: change --with-alsaaddondir to --with-alsagconfdir and --with-alsalconfdir
- The local add-on configuration directory (/etc/alsa/conf.d) contains
- links to the global configuration directory (/usr/share/alsa/alsa.conf.d) now.
- - Move rate-lavc to rate-lav subdirectory and update to use libavresample
- - --disable-avcodec renamed to --disable-libav
- - --avcodec-includedir renamed to --libav-includedir
- - --avcodec-libdir renamed to --libav-libdir
- - --disable-lavcrate renamed to --disable-lavrate
- The .c changes are from Anton Khirnov. The rest is from Jaroslav Kysela.
- - configure: add --with-alsaaddondir, add default config files for plugins
Arcam AV control plugin
- - arcam-av: Add explicit -lpthread to *_LIBADD
- The pthread library has to be linked for this module. In some tool
- chains, it results in a build error.
- - configure: change --with-alsaaddondir to --with-alsagconfdir and --with-alsalconfdir
- The local add-on configuration directory (/etc/alsa/conf.d) contains
- links to the global configuration directory (/usr/share/alsa/alsa.conf.d) now.
- - configure: add --with-alsaaddondir, add default config files for plugins
Documentation
- - doc: fix makefile, the files should be included to the distribution package unconditionally
- - Move rate-lavc to rate-lav subdirectory and update to use libavresample
- - --disable-avcodec renamed to --disable-libav
- - --avcodec-includedir renamed to --libav-includedir
- - --avcodec-libdir renamed to --libav-libdir
- - --disable-lavcrate renamed to --disable-lavrate
- The .c changes are from Anton Khirnov. The rest is from Jaroslav Kysela.
- - config/Makefile: make everything modular
Jack PCM plugin
- - jack: Fix leaks when jack_set_hw_constraint() fails
- If jack_set_hw_constraint() returns error, we leak the 'jack' object and
- all the resources referenced by it. This patch fixes the issue by
- calling snd_pcm_jack_free() before returning.
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - jack: Only allow ALSA periods multiple of JACKd period
- There is a higher Xrun probability whenever the ALSA period is not a
- multiple of the JACKd period and the ALSA buffer is only twice the period.
- Allowing ALSA buffers of min. 3x period is not a good solution because this
- would increase the latency.
- As an example in case of ALSA is using a period of 11 frames and JACK a
- period of 12 frames and a buffer of 22 frames (2x ALSA period) is used:
- - The buffer is filled and contains 22 frames
- - JACK is reading 12 frames. Buffer is only containing 10 frames
- - Now, ALSA has to be scheduled exactly after the last JACK read and
- before the next read. Otherwise we will get an Xrun
- In case of ALSA is using a multiple period of JACK, JACK can always read
- 2 periods before an Xrun if the buffer was full.
- In case of ALSA is using a period of 12 frames and JACK a period of 11
- frames and a buffer of 24 frames (2x ALSA period) is used:
- - The buffer is filled and contains 24 frames
- - JACK is reading 11 frames. Buffer is now containing 13 frames. But ALSA
- can still not write to the buffer
- - JACK reads 11 additional frames. Buffer contains 2 frames
- - Now, ALSA has to be scheduled exactly after the last JACK read and
- before the next read. Otherwise we will get an Xrun
- In case of ALSA is using a multiple period of JACK, ALSA can always write
- to the buffer as long as the buffer is filled with less or equal of half
- of buffer.
- Therefore this patch enforces an ALSA period which is always a multiple
- of the JACKd period.
- - jack: Allow build with older alsa-lib
- The new API snd_pcm_ioplug_avail() doesn't appear prior to alsa-lib
- 1.1.7. Add an own code for allowing the build with alsa-lib 1.1.6.
- It has a very slight overhead than the original snd_pcm_ioplug_avail()
- but should be OK as a workaround.
- - jack: Update poll_fd also in draining state
- ... to support snd_pcm_drain for the JACK IO plugin.
- With this changes there will be an poll_fd event in DRAINING state even if
- the min_avail was not yet reached. Otherwise the application would never
- recognize that all samples were processed by JACK.
- In addition the JACK real-time thread is also processing when in DRAINING
- state and not only when in RUNNING or PREPARE state.
- - jack: Avoid call to snd_pcm_avail_update() from JACK thread
- snd_pcm_avail_update() can call snd_pcm_jack_stop() but
- snd_pcm_jack_stop() should not be called by the JACK thread.
- It should only be called by the thread how has called
- snd_pcm_jack_start().
- In addition the execution of snd_pcm_avail_update() can take a while.
- Therefore it should not be called by the JACK thread to not block this
- thread.
- - configure: change --with-alsaaddondir to --with-alsagconfdir and --with-alsalconfdir
- The local add-on configuration directory (/etc/alsa/conf.d) contains
- links to the global configuration directory (/usr/share/alsa/alsa.conf.d) now.
- - configure: add --with-alsaaddondir, add default config files for plugins
OSS Mixer -> ALSA Control plugin
- - oss: Fix leaks when oss_hw_constraint() fails
- If oss_hw_constraint() returns error, we leak 'oss' object and all the
- resources referenced by it. This patch fixes the issue by jumping to
- 'error' label where the proper clean up is already done.
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - oss/Makefile.am: fix typo
Rate Converter plugins
- - samplerate: fix unused variable warning
USB stream plugin
- - usb_stream: Fix leaks when us_set_hw_constraint() fails
- If us_set_hw_constraint() returns error, we leak the 'us' object and all
- the resources referenced by it. This patch fixes the issue by calling
- us_free() before returning.
- Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
- - usb_stream: Add explicit -lpthread to *_LIBADD
- The pthread library has to be linked for this module. In some tool
- chains, it results in a build error.
tinycompress
Core
- - Release v1.1.7
Library
- - tinycompress: Update email address for Vinod
- - compress: remove dead code _is_codec_supported()
- The _is_codec_supported() was dead and none using it, so remove this and
- eliminate unused function warning
- compress.c:145:13: warning: ‘_is_codec_supported’ defined but not used [-Wunused-function]
- We can take from git if user appears
Utilities
- - tinycompress: Update email address for Vinod
- - crecord: fix incorrect print specifier warning
- We get a warning in crecord for incorrect print specifier, fix it by using
- right one %u for unsigned int
- crecord.c:380:17: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘unsigned int’ [-Wformat=]
- fprintf(finfo, "Recording file %s On Card %u device %u, with buffer of %lu bytes\n",
- - cplay: fix incorrect print specifier warning
- We get a warning in cplay for incorrect print specifier, fix it by using
- right one %ld for long unsigned int.
- cplay.c:327:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
- fprintf(stderr, "codec ID %d is not supported\n", codec_id);
- - cplay: remove dead code check_codec_format_supported()
- The check_codec_format_supported() was added but never used so remove
- it and eliminate unused function warning
- cplay.c:103:20: warning: ‘codec_name_from_id’ defined but not used [-Wunused-function]
- We can take from git if user appears
- - cplay: remove dead code codec_name_from_id()
- The codec_name_from_id() was added but never used so remove it and
- eliminate unused function warning
- cplay.c:103:20: warning: ‘codec_name_from_id’ defined but not used [-Wunused-function]
- We can take from git if user appears
- - crecord: Use whole buffer requested by user
- Currently, crecord will only actually use 1 fragment worth of its
- internal buffer no matter what the user requests. Correct this so that
- the whole buffer requested by the user is used for copying data.