OSDN Git Service

android-x86/external-alsa-ucm-conf.git
2 years agotegra: Add UCM for Nvidia Tegra HDMI Audio oreo-x86 pie-x86 q-x86 r-x86 s-x86 android-x86-8.1-r6
Svyatoslav Ryhel [Mon, 31 May 2021 08:27:36 +0000 (11:27 +0300)]
tegra: Add UCM for Nvidia Tegra HDMI Audio

Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/94
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoHDA-Intel: the lookups are supported from syntax 4
Jaroslav Kysela [Tue, 1 Jun 2021 19:08:53 +0000 (21:08 +0200)]
HDA-Intel: the lookups are supported from syntax 4

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agotegra: shuffle ASUS Google Nexus 7 files
Jaroslav Kysela [Mon, 31 May 2021 11:31:54 +0000 (13:31 +0200)]
tegra: shuffle ASUS Google Nexus 7 files

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/94
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agotegra: shuffle Acer Iconia Tab A500 files
Jaroslav Kysela [Mon, 31 May 2021 11:26:14 +0000 (13:26 +0200)]
tegra: shuffle Acer Iconia Tab A500 files

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/94
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agort5640 / bytcr-rt5640: cleanups
Jaroslav Kysela [Thu, 27 May 2021 07:56:02 +0000 (09:56 +0200)]
rt5640 / bytcr-rt5640: cleanups

- merge HaveAif1 and HaveAif2 to HaveAif with values 1 and 2
- HaveSpeaker identifies stereo and mono (values 2 and 1)
- HaveInternalMic identifies internal mic input (dmic, in1, in3)
- rewrite (unify) bytcr-rt5640 components detection

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/92
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agotegra: Add UCM for ASUS Google Nexus 7 (2012)
Dmitry Osipenko [Thu, 20 May 2021 05:32:29 +0000 (08:32 +0300)]
tegra: Add UCM for ASUS Google Nexus 7 (2012)

ASUS Google Nexus 7 tablet device is powered by NVIDIA Tegra30 SoC, it
has Realtek ALC5642 audio CODEC, which is compatible with the RT5640 CODEC.
Nexus 7 has a 2-channel built-in speaker, built-in 2-channel microphone,
a 3-pin 3.5mm jack for headphones, and a custom external audio output for
docking-station. The docking-station configuration isn't supported because
it's unsupported by the upstream Linux kernel yet.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agotegra: Add UCM for Acer Iconia Tab A500
Dmitry Osipenko [Thu, 20 May 2021 05:30:47 +0000 (08:30 +0300)]
tegra: Add UCM for Acer Iconia Tab A500

Acer Iconia Tab A500 is a tablet device which is powered by NVIDIA Tegra20
SoC, it has WM8903 audio CODEC. The device has built-in 2-channel speaker,
built-in mono microphone and 4-pin 3.5mm jack for headphones and headset.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agotegra: Add symlinks to conf.d/tegra
Dmitry Osipenko [Thu, 20 May 2021 05:11:29 +0000 (08:11 +0300)]
tegra: Add symlinks to conf.d/tegra

The old UCM names were matched only by the name of the kernel driver module.
This means that built-in kernel drivers never matched.

Tegra ASoC machine kernel drivers never specified the card's driver_name
and long_name properly, which is required in order to have a proper
'ucm2/conf.d/tegra/' path being used for the matching of UCMs. This will
be fixed in the kernel ASAP, the change will be backported to stable kernels.

This patch adds symlinks for the PAZ00 netbook and NyanBig Chromebook
to the new 'ucm2/conf.d/tegra/' directory that will match devices properly
in conjunction with the updated Linux kernel regardless of whether sound
driver is a loadable module or built-in.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agocodecs/rt5640: Make headset optional
Dmitry Osipenko [Thu, 20 May 2021 16:20:57 +0000 (19:20 +0300)]
codecs/rt5640: Make headset optional

Nexus 7 has a 3-pin 3.5mm headphones jack, it doesn't support headset
microphone, and thus, it doesn't have headset microphone jack. Make
headset device optional.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agocodecs/rt5640: Fix restoring of playback volumes
Dmitry Osipenko [Thu, 20 May 2021 14:14:57 +0000 (17:14 +0300)]
codecs/rt5640: Fix restoring of playback volumes

The playback volumes shall be initialized only during of the first
enable sequence, not during the initialization of speaker/headphones
devices. This fixes sound level restoring by pulseaudio when headphones
are inserted/ejected. Previously sound level was always reset to the
default level on insert/ejection, which is the incorrect behaviour.
The correct behaviour is to restore volume the previous level, i.e.
if sound level was 3% before headphones were ejected, then level should
be restored to 3% when headphones are inserted back.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agocodecs/rt5640: Turn off playback switches by default
Dmitry Osipenko [Thu, 20 May 2021 13:53:51 +0000 (16:53 +0300)]
codecs/rt5640: Turn off playback switches by default

Previously RT5640 was turning off switches that are specific to the Intel
BayTrail SoC. In a case of other SoCs we need to turn off the codec switches.
This fixes audio playing from both speaker and headphones simultaneously on
Nexus 7, until headphones are re-inserted.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agocodecs/rt5640: Move out BayTrail-specific pin switches
Dmitry Osipenko [Thu, 20 May 2021 13:49:22 +0000 (16:49 +0300)]
codecs/rt5640: Move out BayTrail-specific pin switches

The UCM of RT5640 codec toggles switches that exists only in a case of
the Intel BayTrail ASoC machine driver, RT5640 codec driver doesn't have
them. Move these switches to the BayTrail UCM in order to make generic UCM
rules reusable by other SoCs.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agofix ucm2/README.md - ALSA driver name has the precedence
Jaroslav Kysela [Wed, 19 May 2021 12:48:56 +0000 (14:48 +0200)]
fix ucm2/README.md - ALSA driver name has the precedence

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agort715: add the missing sof prefix to the hw control name
Jaroslav Kysela [Tue, 18 May 2021 17:31:10 +0000 (19:31 +0200)]
rt715: add the missing sof prefix to the hw control name

Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/67
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agort715-scda (rt714) - add mic led support
Jaroslav Kysela [Tue, 18 May 2021 17:21:07 +0000 (19:21 +0200)]
rt715-scda (rt714) - add mic led support

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agort715: add mic led support
Jaroslav Kysela [Tue, 18 May 2021 17:17:48 +0000 (19:17 +0200)]
rt715: add mic led support

Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/67
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agort715: don't initialize obsolete ADC controls
Jaroslav Kysela [Tue, 18 May 2021 17:14:47 +0000 (19:14 +0200)]
rt715: don't initialize obsolete ADC controls

Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/67
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agosof-soundwire: rt715 - use the hw volume control
Jaroslav Kysela [Tue, 18 May 2021 17:01:58 +0000 (19:01 +0200)]
sof-soundwire: rt715 - use the hw volume control

Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/67
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agobytcr-rt5640: Add support for controlling a speaker-mute LED
Hans de Goede [Fri, 7 May 2021 13:11:39 +0000 (15:11 +0200)]
bytcr-rt5640: Add support for controlling a speaker-mute LED

Add support for controlling a speaker-mute LED using the new snd_ctl_led
kernel module for generic mute LED control.

Tested on a HP Pavilion X2 10-n000nd and a HP Pavilion X2 10-p002nd both of
which have a detachable USB keyboard with a speaker mute LED embedded in
the audio-mute button.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agocht-bsw-rt5672: Add support for controlling speaker- and mic-mute LEDs
Hans de Goede [Fri, 7 May 2021 13:11:38 +0000 (15:11 +0200)]
cht-bsw-rt5672: Add support for controlling speaker- and mic-mute LEDs

Add support for controlling speaker- and mic-mute LEDs using the new
snd_ctl_led kernel module for generic mute LED control.

Tested on a Thinkpad 10 tablet which has a detachable USB keyboard with
a speaker mute LED embedded in the volume-mute button and a mic mute
LED embedded in the mic-mute button.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agocht-bsw-rt5672: Add support for the components string
Hans de Goede [Fri, 7 May 2021 13:11:37 +0000 (15:11 +0200)]
cht-bsw-rt5672: Add support for the components string

Upcoming kernel versions will report which speaker and dmic config is used
by the device in a components strings so that we don't need to duplicate
the DMI quirks in both the kernel and the UCM profile.

Add support for getting the speaker and dmic config from the components string.

Note the old DMI matching is kept for support of older kernels, this means
that on devices where the old DMI matching was used things like:

Define.MonoSpeaker ""

Will now be done twice, this is harmless as long as the kernel and UCM profile
DMI quirks are in sync, which they are.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoremap mixer controls for rt5682
Jaroslav Kysela [Tue, 18 May 2021 14:25:17 +0000 (16:25 +0200)]
remap mixer controls for rt5682

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoremap mixer controls for rt5660
Jaroslav Kysela [Tue, 18 May 2021 14:17:12 +0000 (16:17 +0200)]
remap mixer controls for rt5660

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoremap mixer controls for rt5677
Jaroslav Kysela [Tue, 18 May 2021 12:02:10 +0000 (14:02 +0200)]
remap mixer controls for rt5677

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoremap mixer controls for rt5651
Jaroslav Kysela [Tue, 18 May 2021 11:52:44 +0000 (13:52 +0200)]
remap mixer controls for rt5651

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoremap mixer controls for rt5645
Jaroslav Kysela [Tue, 18 May 2021 11:28:58 +0000 (13:28 +0200)]
remap mixer controls for rt5645

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoremap mixer controls for rt5640
Jaroslav Kysela [Tue, 18 May 2021 08:25:35 +0000 (10:25 +0200)]
remap mixer controls for rt5640

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoucm2: add lib / ctl-remap.conf generic device
Jaroslav Kysela [Fri, 14 May 2021 09:20:34 +0000 (11:20 +0200)]
ucm2: add lib / ctl-remap.conf generic device

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoucm2: lib/generic - use standard (not substituted) config tree
Jaroslav Kysela [Fri, 14 May 2021 08:34:07 +0000 (10:34 +0200)]
ucm2: lib/generic - use standard (not substituted) config tree

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoucm2: remove the trailing slash from the rm command
Jaroslav Kysela [Fri, 14 May 2021 08:15:56 +0000 (10:15 +0200)]
ucm2: remove the trailing slash from the rm command

Link: https://github.com/alsa-project/alsa-ucm-conf/commit/548036b8ecc92d4e8e2070046551fb0b8acb7d96#commitcomment-50808354
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoucm2: use private alsa-lib's configuration by default
Jaroslav Kysela [Thu, 13 May 2021 15:12:51 +0000 (17:12 +0200)]
ucm2: use private alsa-lib's configuration by default

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoucm2: replace ${CardIdByName} substitution with ${find-card}
Jaroslav Kysela [Thu, 13 May 2021 15:04:30 +0000 (17:04 +0200)]
ucm2: replace ${CardIdByName} substitution with ${find-card}

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoucm2: soundwire: use the codec kcontrols for rt711-sdca
Libin Yang [Wed, 28 Apr 2021 16:01:52 +0000 (00:01 +0800)]
ucm2: soundwire: use the codec kcontrols for rt711-sdca

Use "rt711 FU0F" as the HW control, instead of the "PGA2.0 2".

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agosof-soundwire: use the ${find-device} lookup for the dmic device
Jaroslav Kysela [Wed, 3 Feb 2021 11:02:59 +0000 (12:02 +0100)]
sof-soundwire: use the ${find-device} lookup for the dmic device

The PCM device number for the internal digital microphone is not fixed.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agoucm2: add initial alsa library helpers
Jaroslav Kysela [Thu, 13 May 2021 14:28:04 +0000 (16:28 +0200)]
ucm2: add initial alsa library helpers

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: create empty conf.virt.d directory
Jaroslav Kysela [Fri, 23 Apr 2021 09:01:34 +0000 (11:01 +0200)]
ucm2: create empty conf.virt.d directory

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: add conf.virt.d lookup
Jaroslav Kysela [Fri, 23 Apr 2021 08:58:35 +0000 (10:58 +0200)]
ucm2: add conf.virt.d lookup

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoQualcomm/sm8250: fix the typo in Include identifier for Mic
Jaroslav Kysela [Mon, 19 Apr 2021 15:33:37 +0000 (17:33 +0200)]
Qualcomm/sm8250: fix the typo in Include identifier for Mic

BugLink: https://github.com/alsa-project/alsa-ucm-conf/commit/f4f0a97eb3f7d210a5573bd34d51b17bdfeb08ad#commitcomment-49705893
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2/conf.d/sm8250: add symlink for Qualcomm RB5 platform
Dmitry Baryshkov [Thu, 15 Apr 2021 11:50:28 +0000 (14:50 +0300)]
ucm2/conf.d/sm8250: add symlink for Qualcomm RB5 platform

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/84
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: add support to for Qualcomm RB5 Platform
Srinivas Kandagatla [Fri, 20 Nov 2020 12:14:31 +0000 (12:14 +0000)]
ucm2: add support to for Qualcomm RB5 Platform

The Qualcomm RB5 Robotics Platform contains HDMI,
2x WSA Smart-Speakers audio outputs along with One
Onboard DMIC audio input.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/84
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
[DB: change paths to use case fragments]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: codecs: lpass: add codec sequences for wsa and va macro
Srinivas Kandagatla [Fri, 20 Nov 2020 12:12:48 +0000 (12:12 +0000)]
ucm2: codecs: lpass: add codec sequences for wsa and va macro

Add enable/disable codec sequence for Qualcomm Low Power Audio
Subsystem (LPASS) Codec WSA and VA Macros.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/84
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: soundwire: add basic settings for SDCA devices
Libin Yang [Sun, 7 Feb 2021 04:30:58 +0000 (12:30 +0800)]
ucm2: soundwire: add basic settings for SDCA devices

Add support for rt711-sdca, rt1316 and rt715-sdca (aka rt714).

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: soundwire: use cfg-amp instead of cfg-spk component string
Pierre-Louis Bossart [Wed, 30 Sep 2020 22:20:34 +0000 (17:20 -0500)]
ucm2: soundwire: use cfg-amp instead of cfg-spk component string

For now we don't have a specific handing of the number of speakers, we
should be handling the number of amplifiers instead. The number of
speakers was added in machine drivers as a placeholder, if and when we
you it it would be in addition to the number of amplifiers, not as a
substitute.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agobroadwell-rt286, bdw-rt5677: Fix inconsistency in card detection
David Ward [Sat, 27 Feb 2021 14:45:39 +0000 (09:45 -0500)]
broadwell-rt286, bdw-rt5677: Fix inconsistency in card detection

This file is only read when the driver name is 'SOF'. Other entries
in this file do not check if a card name contains the 'sof-' prefix.
Adjust these new entries for Broadwell cards so they are consistent.

This conveniently provides a workaround for a bug in kernel 5.10+:
https://bugzilla.kernel.org/show_bug.cgi?id=211985

It happens to let the catpt driver work in kernels where this bug is
present for Broadwell cards. This is possible because the SOF driver
and catpt driver share the same use case configuration for the card.

Signed-off-by: David Ward <david.ward@gatech.edu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agobroadwell-rt286, bdw-rt5677: Fix comment at top of file
David Ward [Sat, 27 Feb 2021 14:45:39 +0000 (09:45 -0500)]
broadwell-rt286, bdw-rt5677: Fix comment at top of file

Signed-off-by: David Ward <david.ward@gatech.edu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5640: Specify Playback/CaptureMasterElem for HW volume-control
Hans de Goede [Mon, 8 Mar 2021 22:05:54 +0000 (23:05 +0100)]
codecs/rt5640: Specify Playback/CaptureMasterElem for HW volume-control

Newer kernels add "aif:1" or "aif:2" to the components string to let
us know which AIF is being used.

Use this to specify the correct Playback/CaptureMasterElem for HW
volume-control, based on which AIF is being used.

On older kernels, where there is no "aif:%d" string in the components
string, no Playback/CaptureMasterElem is specified.

In DigitalMics.conf the master mixer is used as regular CaptureMixerElem
instead of as CaptureMasterElem since the DMICs don't have any analog
volume control.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5672: Add hardware volume-control support
Hans de Goede [Wed, 17 Feb 2021 14:34:36 +0000 (15:34 +0100)]
codecs/rt5672: Add hardware volume-control support

For the speaker and DMICs configs this uses "DAC1 Playback Volume"
resp. "ADC Capture Volume" as main mixer elements, since there are
no other volume-controls in their paths.

For the (analog) headset-mic and headphones this used the analog
"IN1 Boost" resp. "HP Playback Volume" controls as main mixer elements
while using the  "ADC Capture Volume" resp. "DAC1 Playback Volume"
(which have the mute switches) as master mixer elements.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5672: Move +12dB input boost from 'STO1 ADC Boost Gain' to 'ADC Capture...
Hans de Goede [Wed, 17 Feb 2021 14:34:35 +0000 (15:34 +0100)]
codecs/rt5672: Move +12dB input boost from 'STO1 ADC Boost Gain' to 'ADC Capture Volume'

Both the 'STO1 ADC Boost Gain' and the 'ADC Capture Volume' controls are
digital and the 'ADC Capture Volume' control goes up to +30dB.

When adding hw-volume-control support adding the +12dB boost gain on to of
the max +30dB of 'ADC Capture Volume' is a bit too much.

So move the +12dB from the 'STO1 ADC Boost Gain' control to the
'ADC Capture Volume' control.

This way we keep the same setting for userspace which does not support
hw-volume-control, while getting a better range when we start using
'ADC Capture Volume' as hw-volume-control.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5640: Add hardware volume-control support
Hans de Goede [Mon, 8 Mar 2021 22:05:53 +0000 (23:05 +0100)]
codecs/rt5640: Add hardware volume-control support

Add hardware volume-control support for the rt5640 codec.

Note this commit does not add support for the (digital) master
ADC/DAC Volume / Mute controls. There are 2 of each, and which
one should be used depends on which AIF is being used.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5640: Unify capture volume for AIF1 and AIF2 recording paths
Hans de Goede [Mon, 8 Mar 2021 22:05:52 +0000 (23:05 +0100)]
codecs/rt5640: Unify capture volume for AIF1 and AIF2 recording paths

The rt5640 codec is sometimes used with AIF1 connected to the
SoC and sometimes with AIF2 connected to the SoC.

The rt5640 UCM configuration deals with this by accepting input from
and sending output to both AIFs, relying on the kernels DAPM framework to
disable parts of the graph which are connected to the unconnected AIF.

Before this commit codecs/rt5640/EnableSeq.conf was adding a +9dB
(digital) boost to recording going through the 'ADC' path to AIF1,
while not touching the 'Mono ADC' path to AIF2.

This was causing recordings on devices using AIF2 to be somewhat soft.

This commit unifies the record volume control settings for both paths by
only using the '[Mono ]ADC Capture Volume' control, which is present
in both paths and setting it to +9dB on both paths.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5640: Drop bogus 'DIG MIXL DAC L2 Switch' setting
Hans de Goede [Mon, 8 Mar 2021 22:05:51 +0000 (23:05 +0100)]
codecs/rt5640: Drop bogus 'DIG MIXL DAC L2 Switch' setting

The 'DIG MIXL DAC L2 Switch' path is only used for Digital Mixer Path
loopback, which we don't use. Drop it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5640: Cleanup: Move 'SPK MIX' setup to main EnableSequene
Hans de Goede [Mon, 8 Mar 2021 22:05:50 +0000 (23:05 +0100)]
codecs/rt5640: Cleanup: Move 'SPK MIX' setup to main EnableSequene

Cleanup: no functional changes intended.

Do the 'SPK MIXL' / 'SPK MIXR' setup only once from the main
EnableSequene, like we do for the 'OUT MIXL' / 'OUT MIXR' setup
used by the headphones already.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5640: Cleanup: Initially disable all inputs and outputs
Hans de Goede [Mon, 8 Mar 2021 22:05:49 +0000 (23:05 +0100)]
codecs/rt5640: Cleanup: Initially disable all inputs and outputs

Cleanup: no functional changes intended.

Disable all inputs and outputs from the main EnableSequence.

This allows removing some weirdness from the individual input/output
EnableSequences where they were turning controls for other inputs/outputs
then themselves off.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5640: Cleanup: unify Stereo / Mono ADC handling
Hans de Goede [Mon, 8 Mar 2021 22:05:48 +0000 (23:05 +0100)]
codecs/rt5640: Cleanup: unify Stereo / Mono ADC handling

Cleanup: no functional changes intended.

The rt5640 codec is sometimes used with AIF1 connected to the SoC
and sometimes with AIF2 connected to the SoC.

The rt5640 UCM configuration deals with this by accepting input from
and sending output to both AIFs, relying on the kernels DAPM framework to
disable parts of the graph which are connected to the unconnected AIF.

On the output side we solve this by enabling both the IF1_DAC and
IF2_DAC data inputs to the digital 'Stereo DAC MIX' mixer.

On the input side handling this is somewhat more complicated, the
"Digital Mixer Path" leading to the IF1_ADC and IF2_ADC outputs
are entirely separate paths. To solve this we enable the active
input (DMIC or ADC) in both the Stereo ADC (connected to IF1_ADC)
and the Mono ADC (IF2_ADC) paths.

So far we've not been entirely consistent in our handling of
the Stereo ADC vs Mono ADC paths, this commit cleans this up:

1. Set the 'Mono ADC Capture Switch' to on once from EnableSeq.conf,
   like we do for the 'ADC Capture Switch' instead of toggling it on/off
   from the individual input Enable/Disable sequences.

2. Group all the 'Mono ADC ...' mixer cset calls together with their
   stereo ADC counterparts.

3. Explicitly select DMIC L/R 1 for the Mono ADC L/R 2 Mux input, instead
   of relying on this being the default.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/es8316: Add hardware volume-control support
Hans de Goede [Sun, 7 Mar 2021 20:03:08 +0000 (21:03 +0100)]
codecs/es8316: Add hardware volume-control support

Add hardware volume-control support for the es8316 codec.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/es8316: Fix 'HP Mixer Volume' setting
Hans de Goede [Sun, 7 Mar 2021 20:03:07 +0000 (21:03 +0100)]
codecs/es8316: Fix 'HP Mixer Volume' setting

The 'HP Mixer Volume' control is interesting in that it has a hole
in its range which should not be used (described in the tlv table),
valid values are 0-4 and 8-11

I assume that the "Set HP mixer vol to -6 dB (4/7) louder does not work"
comment which this patch changes comes from attempts to use values in
that hole in the range (also notice the wrong max value in the comment).

Setting the HP mixer to -6 dB causes the sound to be significantly
softer then under Windows. This commit fixes this by initializing the
HP mixer control to 11 / 0 dB.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/es8316: Fix capture settings
Hans de Goede [Sun, 7 Mar 2021 20:03:06 +0000 (21:03 +0100)]
codecs/es8316: Fix capture settings

Fix the following issues with the capture settings:

1. Disable ALC / Auto Level Control, it tries to always get an
   input signal even when the user is not talking into the mic
   leading to it cranking up the volume till there is noise at
   the same level as the user talking.

2. The 'ADC PGA Gain Volume' volume control is not the main
   'ADC vol' control, it is the mic amplifier control and
   setting it to 10 sets it to 24dB not 0dB.
   Adjust the comment and set it to 7 which is 16dB which
   gives a good microphone signal strength without introducing
   too much noise (with 'ADC Capture Volume' set to 0dB).

3. There actually is a main 'ADC vol' control which goes from -96 to 0dB
   which is simply called the 'ADC Capture Volume' and when disabling ALC
   it defaults to -96 dB. Add a line setting it to 0dB.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2/conf.d: add symlinks for Qualcomm cards
Dmitry Baryshkov [Fri, 5 Feb 2021 17:45:40 +0000 (20:45 +0300)]
ucm2/conf.d: add symlinks for Qualcomm cards

Add ucm2/conf.d symlinks for all defined Qualcomm sound cards.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: Separate the configuration lookups (hw based) from the configuration tree
Jaroslav Kysela [Wed, 3 Feb 2021 16:13:01 +0000 (17:13 +0100)]
ucm2: Separate the configuration lookups (hw based) from the configuration tree

Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations.
In this way, we do not rely to create the configuration paths based on
simple driver / device identification, but we can store the configurations
more logically to make the maintenance (code reuse, multiple changes)
more easy.

This commit keeps the older lookup paths active, but they will be
turned off in the next release.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/70
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/76
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/78
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agobytcr-wm5102: Add new UCM profile for BYT boards with a WM5102 codec
Hans de Goede [Tue, 9 Feb 2021 19:08:59 +0000 (20:08 +0100)]
bytcr-wm5102: Add new UCM profile for BYT boards with a WM5102 codec

Add new UCM profile for BYT boards with a WM5102 codec. This has been
tested with both the SST and the SOF driver on a
Lenovo Yoga Tablet 2 1051L.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/rt5672: Remove Intel SST specific HeadsetMic workaround
Hans de Goede [Tue, 9 Feb 2021 21:01:01 +0000 (22:01 +0100)]
codecs/rt5672: Remove Intel SST specific HeadsetMic workaround

There used to be an issue with the HeadsetMic on BYT devices with
a rt5672 codec only being recorded on the left channel, while the
right channel recorded silence.

The ucm2/codecs/rt5672/HeadsetMic.conf contains a workaround for
this which changes the SST record-stream demuxer settings to
use "slot 0" for both the left and right channels when recording
from the HeadsetMic.

There are 2 problems with this workaround:

1. It uses SST specific mixer settings causing things to break
when using the SOF driver.

2. Files under uc2m/codecs should be architecture agnostic and should
not depend on platform dependent mixer settings such as the SST driver
mixer settings.

The problem which the workaround used to work around has since been
fixed in the kernel by switching the wire format from TDM/DSP A to I2S:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ceb8a36d023d4bb4ffca3474a452fb1dfaa0ef2

This fix has landed in 5.8 and has been backported to all recent
stable kernel releases.

Since this is fixed in the kernel now, we can drop the workaround,
fixing the 2 problems mentioned above.

This was tested on a ThinkPad 8 tablet, which is the same device as
where the HeadsetMic problem was originally noticed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agosof-soundwire: add support for dmics
Pierre-Louis Bossart [Thu, 21 Jan 2021 20:44:05 +0000 (14:44 -0600)]
sof-soundwire: add support for dmics

the pinmux allows for SoundWire to be used on e.g. link0 and link1,
and the rest of the pins can be assigned for dmic usages.

We currently don't track this capability which means users don't see a
capture device, e.g. on HP Spectre x360.

The sof_sdw machine driver was modified to report the cfg-dmics
string, possible values are 0..4.

BugLink: https://github.com/thesofproject/linux/issues/2700
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/75
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agosof-hda-dsp: update handling of cfg-dmics strings
Pierre-Louis Bossart [Thu, 21 Jan 2021 20:38:26 +0000 (14:38 -0600)]
sof-hda-dsp: update handling of cfg-dmics strings

Existing platforms can have 1,2,3 or 4 microphones. The SOF firmware
will generate 2 or 4 channels. Since by default CaptureChannels is 2,
we need to add the case for cfg-dmics = 3.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agochtnau8824: Add support for using the SOF driver
Hans de Goede [Wed, 16 Dec 2020 15:38:38 +0000 (16:38 +0100)]
chtnau8824: Add support for using the SOF driver

The old (and currently the default) SST driver uses TDM 4 slots 24 bit
as wire format to the codec. Where as the new SOF driver uses standard
I2S 2 channel 24 bit.

Normally this should not impact the UCM settings, but on the NAU8824
the "DAC Right Channel Source" mixer setting must be set to 1 when
using TDM 4 slots and to 0 when using I2S 2 channel mode.

Getting this wrong (in either case) results in the right channel not
outputting any sound.

This commit introduces a RightOutputChannel variable which gets
set to 0/1 depending on the driver and then uses that for the
"DAC Right Channel Source" mixer setting so that we do the right
thing depending on the driver.

This has been tested on the following devices:

Medion E2215T:    Stereo speakers, analog mic
Medion E2228T:    Stereo speakers, stereo digital mics
Cube iWork 8 Air: Mono speaker, analog mic

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agokblrt5660: Fix file permissions
Takashi Iwai [Thu, 21 Jan 2021 10:15:02 +0000 (11:15 +0100)]
kblrt5660: Fix file permissions

The exec bit was set wrongly on those files.  Fix them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agochtnau8824: Add a SST define/variable
Hans de Goede [Wed, 16 Dec 2020 15:38:37 +0000 (16:38 +0100)]
chtnau8824: Add a SST define/variable

Add a SST define which gets set to "yes" when using the SST driver
and to "" when not using the SST driver;

And decide if platforms/bytcr/PlatformEnableSeq.conf should be included
or not based on this.

This is a preparation patch for adding SOF support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUSB-Audio: fix indentation in Gigabyte-Aorus-Master-Main-Audio-HiFi.conf
Jaroslav Kysela [Fri, 15 Jan 2021 13:55:53 +0000 (14:55 +0100)]
USB-Audio: fix indentation in Gigabyte-Aorus-Master-Main-Audio-HiFi.conf

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUSB-Audio/ALC1220: fix indentation for Speaker device
Jaroslav Kysela [Fri, 15 Jan 2021 13:03:35 +0000 (14:03 +0100)]
USB-Audio/ALC1220: fix indentation for Speaker device

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUSB-Audio/ALC1220: Bump analog Speaker priority over S/PDIF
Marijn Suijten [Thu, 14 Jan 2021 13:11:50 +0000 (14:11 +0100)]
USB-Audio/ALC1220: Bump analog Speaker priority over S/PDIF

The `S/PDIF` port does not have any jack sensing, and with a priority
higher than the `Speakers` it will always be selected by default instead
of the `Speakers` even if unplugged.

Swapping the priorities around allows analog `Speakers` to be selected
first, _if_ they are plugged in. Otherwise `S/PDIF` is used.

Signed-off-by: Marijn Suijten <marijns95@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: add initial configuration for TRX40 Gigabyte Aorus Master Audio
Jaroslav Kysela [Thu, 14 Jan 2021 10:03:56 +0000 (11:03 +0100)]
ucm2: add initial configuration for TRX40 Gigabyte Aorus Master Audio

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/25
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agobytcr-rt5640: fix the execution order
Jaroslav Kysela [Thu, 14 Jan 2021 17:31:24 +0000 (18:31 +0100)]
bytcr-rt5640: fix the execution order

The includes must be run _after_ defines. The Include directives
have precedence. Put everything to If compound.

Fixes: bdd05ac339 ("bytcr-rt5640: Add support for devices without speakers and/or an internal mic")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agort5640: Move standard DAC setup to EnableSeq.conf
Hans de Goede [Sat, 9 Jan 2021 21:02:52 +0000 (22:02 +0100)]
rt5640: Move standard DAC setup to EnableSeq.conf

No matter which output is used, we always need to setup the standard
DAC config. Move this to the shared EnableSeq.conf to avoid having
to duplicate it in various places.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agobytcr-rt5640: Add support for devices without speakers and/or an internal mic
Hans de Goede [Sat, 9 Jan 2021 21:02:51 +0000 (22:02 +0100)]
bytcr-rt5640: Add support for devices without speakers and/or an internal mic

There are kernel patches pending upstream for the bytcr-rt5640 machine-driver
to support devices without speakers and/or an internal mic.

Since the UCM profile already conditionally loads the speaker and
internal-mic codec include files, these will simply get skipped in this
case, so this almost works with the current UCM profile without changes.

The only troublesome part is the ConflictingDevice sections in the codec
HeadPhones.conf and HeadsetMic.conf files, which refer to resp. a "Speaker"
and a "Mic" device. Without any of the speaker or mic codec conf files
being included there will not by any "Speaker" / "Mic" devices leading
to an error while parsing the HeadPhones.conf / HeadsetMic.conf files.

This commit makes the ConflictingDevice section conditional, fixing this.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agochtrt5645: Enable Internal MIC of ECS EF20EA
Jian-Hong Pan [Tue, 15 Dec 2020 08:54:03 +0000 (16:54 +0800)]
chtrt5645: Enable Internal MIC of ECS EF20EA

The ECS EF20EA uses a digital mic connected to the dmic2 pin, rather
then the default analog mic.

1 [chtrt5645      ]: chtrt5645 - chtrt5645
                     Standard-EF20EA-1.0

Add a card long name match for this, so that the right config is used.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/68
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoHDA-Intel/HiFi-dual: Add BootSequence and disable playback channels in verb init
Jaroslav Kysela [Wed, 16 Dec 2020 07:55:04 +0000 (08:55 +0100)]
HDA-Intel/HiFi-dual: Add BootSequence and disable playback channels in verb init

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/48
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoHDA-Intel/HiFi-dual: Add EnableSequence and DisableSequence for Speaker and Headphones
Kai-Heng Feng [Thu, 27 Aug 2020 13:18:13 +0000 (21:18 +0800)]
HDA-Intel/HiFi-dual: Add EnableSequence and DisableSequence for Speaker and Headphones

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/48
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agosof-hda-dsp: Set Master Playback Switch on in the BootSequence
Hui Wang [Thu, 29 Oct 2020 05:34:02 +0000 (13:34 +0800)]
sof-hda-dsp: Set Master Playback Switch on in the BootSequence

Otherwise, the audio output will be muted by default if there is no
/var/lib/alsa/asound.state. I have experienced this issue When newly
install an OS.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agort715: init: setup ADC07 to a proper volume
Libin Yang [Thu, 19 Nov 2020 12:01:30 +0000 (20:01 +0800)]
rt715: init: setup ADC07 to a proper volume

This patch initiates 'rt715 ADC 07 Capture Volume' to a proper volume.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agochtnau8824: Boost analog mic volumes a bit
Hans de Goede [Sun, 6 Dec 2020 12:47:18 +0000 (13:47 +0100)]
chtnau8824: Boost analog mic volumes a bit

Both Mic1 (internal analog mic) and Mic2 (headset mic) are a bit soft
with the current settings, boost their volumes a bit.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agochtnau8824: Add support for laptops using stereo DMICs
Hans de Goede [Sun, 6 Dec 2020 12:47:17 +0000 (13:47 +0100)]
chtnau8824: Add support for laptops using stereo DMICs

The Medion E2228T uses a NAU8824 codec combined with stereo
DMICs, add support for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agochtnau8824: Fix mono speaker config not working
Hans de Goede [Sun, 6 Dec 2020 12:47:16 +0000 (13:47 +0100)]
chtnau8824: Fix mono speaker config not working

Fix the Speaker define / var being changed from "Speaker" to "MonoSpeaker"
not having any effect because the variable gets expanded before the if
making the change is interpreted.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoRevert "ucm2: HDA/acp - add Capture simple mixer element to the ACP Mic device"
Jaroslav Kysela [Mon, 7 Dec 2020 08:33:30 +0000 (09:33 +0100)]
Revert "ucm2: HDA/acp - add Capture simple mixer element to the ACP Mic device"

This reverts commit 3320b1ac804595d6c145c1ad7af85917182a3c98.

This solution does not work. The mute state is shared between
the HDA and AMD ACP in PA, so it may cause the security issue, if
the users do not set the mute manually.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/64
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agosof-soundwire: use the codecs/hda/hdmi.conf macro
Jaroslav Kysela [Mon, 16 Nov 2020 10:48:05 +0000 (11:48 +0100)]
sof-soundwire: use the codecs/hda/hdmi.conf macro

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agocodecs/hda/hdmi.conf - add DisplayPort to the device description (Comment)
Jaroslav Kysela [Mon, 2 Nov 2020 17:15:14 +0000 (18:15 +0100)]
codecs/hda/hdmi.conf - add DisplayPort to the device description (Comment)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agofix the ucm2/codecs/hda/hdmi.conf use
Jaroslav Kysela [Mon, 2 Nov 2020 15:44:51 +0000 (16:44 +0100)]
fix the ucm2/codecs/hda/hdmi.conf use

The mentioned commit (dcef48f13d) removed the index for the IEC958 on/off
control which made the HDMI 2+ outputs silent.

Fixes: dcef48f13d ("HDA-Intel: add support for AMD acp microphone devices")
BugLink: https://github.com/alsa-project/alsa-lib/issues/95
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: HDA-Intel - add error section when the HDA model is not supported
Jaroslav Kysela [Thu, 15 Oct 2020 11:34:05 +0000 (13:34 +0200)]
ucm2: HDA-Intel - add error section when the HDA model is not supported

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agobdw-rt5677: add SOF support
Joseph Burt [Thu, 17 Sep 2020 18:36:10 +0000 (18:36 +0000)]
bdw-rt5677: add SOF support

Completes 898602208888da63d758ff3c293b5ad2ec6e6c19

Signed-off-by: Joseph Burt <caseorum@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: USB-Audio: Add CaptureMixerElem for Lenovo ThinkStation P620
Kai-Heng Feng [Mon, 14 Sep 2020 13:00:36 +0000 (21:00 +0800)]
ucm2: USB-Audio: Add CaptureMixerElem for Lenovo ThinkStation P620

The Switch and Volume mixer start to work after device firmware update.
Add MixerElem to support them.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm.conf: The module name may not be available when the driver in built-in.
Jaroslav Kysela [Tue, 29 Sep 2020 15:31:34 +0000 (17:31 +0200)]
ucm.conf: The module name may not be available when the driver in built-in.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/52
Fixes: d001c8de287f ("ucm.conf: add support for the kernel module name tree")

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: USB-Audio: Add support for Lenovo ThinkStation P620 Rear Audio
Kai-Heng Feng [Wed, 9 Sep 2020 09:10:41 +0000 (17:10 +0800)]
ucm2: USB-Audio: Add support for Lenovo ThinkStation P620 Rear Audio

Add proper PCM assignment to Lenovo ThinkStation P620 Rear Audio.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: Qualcomm sdm845 fixes HDMI select card and HiFi set DigitalVol
Aníbal Limón [Mon, 31 Aug 2020 22:25:13 +0000 (17:25 -0500)]
ucm2: Qualcomm sdm845 fixes HDMI select card and HiFi set DigitalVol

Remove the duplicated PlaybackVolume entry.

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: Qualcomm sdm845 fixes HDMI select card and HiFi set DigitalVol
Aníbal Limón [Mon, 31 Aug 2020 22:25:13 +0000 (17:25 -0500)]
ucm2: Qualcomm sdm845 fixes HDMI select card and HiFi set DigitalVol

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoAdd support for Lenovo ThinkStation P620 Main Audio
Kai-Heng Feng [Thu, 20 Aug 2020 14:12:02 +0000 (22:12 +0800)]
Add support for Lenovo ThinkStation P620 Main Audio

This add support for its internal speaker and front headset.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoHDA-Intel: only add the acp dmic to the sound card with analog codec
Hui Wang [Thu, 20 Aug 2020 03:25:24 +0000 (11:25 +0800)]
HDA-Intel: only add the acp dmic to the sound card with analog codec

Without this change, the acp dmic will be added to both Intel sound
card (with analog codec) and Nvidia Hdmi audio sound card.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: HDA/acp - add Capture simple mixer element to the ACP Mic device
Jaroslav Kysela [Tue, 1 Sep 2020 11:57:18 +0000 (13:57 +0200)]
ucm2: HDA/acp - add Capture simple mixer element to the ACP Mic device

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: module - rename rk3399-gru-sound.conf => snd_soc_rk3399_gru_sound.conf
Jaroslav Kysela [Wed, 19 Aug 2020 14:15:04 +0000 (16:15 +0200)]
ucm2: module - rename rk3399-gru-sound.conf => snd_soc_rk3399_gru_sound.conf

We are using the real kernel module name for the first level selection now.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoRevert "amd/renoir/acp: use the machine driver's name for top-level's conf"
Jaroslav Kysela [Wed, 19 Aug 2020 14:04:48 +0000 (16:04 +0200)]
Revert "amd/renoir/acp: use the machine driver's name for top-level's conf"

This reverts commit 35277f419b1dc0f8500d3ab4bceabf6cad05c76d.

We use the snd_acp3x_rn kernel module name again with the correct
sysfs lookup.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm2: ucm.conf - fix the fix the sysfs kernel module path
Jaroslav Kysela [Wed, 19 Aug 2020 14:03:48 +0000 (16:03 +0200)]
ucm2: ucm.conf - fix the fix the sysfs kernel module path

The idea was to use the kernel module name not the driver name which
may be different.

BugLink: https://github.com/alsa-project/alsa-lib/pull/79
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoRockchip/rk3399-gru-sound: remove zero PCM subdevice
Jaroslav Kysela [Tue, 18 Aug 2020 15:39:50 +0000 (17:39 +0200)]
Rockchip/rk3399-gru-sound: remove zero PCM subdevice

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUSB-Audio: Dell-WD15-Dock: make input and output volume adjustable
Hui Wang [Mon, 17 Aug 2020 04:37:44 +0000 (12:37 +0800)]
USB-Audio: Dell-WD15-Dock: make input and output volume adjustable

Recently we found the input volume is too low for some specific
headset-mic, even we adjust the input volume to max from PA, we still
can't record the sound from that headset-mic. That is because we
change the input or output volume from PA, but the mixer's volume
is not changed, only PA's soft-volume is changed.

Checking the amixer controls for the sound card in the WD19, it
supports MixerElem, Volume and Switch, and checking the sound card in
the WD15, it doesn't have Volume and Switch for Headphone and Line,
So adding the volume and switch control in the ucm conditionally.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/47
Signed-off-by: Jaroslav Kysela <perex@perex.cz>