USB-Audio: Add profile for MSI MPG X570S Carbon Max Wifi.
This patch depends on Linux 5.17.
This board features an Realtek ALC4080 chip. The various inputs and
outputs are distributed over multiple hardware devices:
* Input
- hw:$card,0 loop back from speaker (called "Analog In")
- hw:$card,1 line in at back panel
- hw:$card,2 microphone from front AND back panel
* Output
- hw:$card,0 speaker output at back panel (up to 7.1)
- hw:$card,1 headerphone output at front panel
- hw:$card,2 could not figure this one out
- hw:$card,3 guessed S/PDIF output (sadly no way to test)
By default Mic and Line in are disabled. This confuses applications,
thus I made the profile enable them by default.
Without an UCM profile PulseAudio is not able to create output on
the front panel nor record any microphone input.
Signed-off-by: Johannes Schickel <lordhoto@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Tue, 10 May 2022 15:11:41 +0000 (17:11 +0200)]
HDA-DualCodecs: Fix wrong jack control on Lenovo P520
Lenovo P520 uses the same line out switch like other dual codecs
systems, however it uses another jack control. So consolidate the switch and
separate the jacks to make its jack control work again.
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/149
From: Kai-Heng Feng <kai.heng.feng@canonical.com> Fixes: 7dda1e2 ("HDA: improve support for HDAudio-Gigabyte-ALC1220DualCodecs") Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Miroslav Sustek [Thu, 9 Dec 2021 22:16:05 +0000 (23:16 +0100)]
sof-hda-dsp: fix path to Hdmi.conf
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/127 Signed-off-by: Miroslav Sustek <sustmidown@centrum.cz> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2: Add support for SC7180 Trogdor Lazor Chromebooks
Almost all Trogdor Chromebooks are using RT5682 for headphones/headset
on 3.5mm jack, internal microphone and headset microphone, and MAX98357A
for the internal speakers (Lazor and Limozeen).
This adds support for the sc7180-rt5682-max98357a-1mic sound card found
on the aforementioned Chromebooks.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Thu, 4 Nov 2021 09:01:05 +0000 (10:01 +0100)]
HDA-Intel: AMD ACP - add LED support
- create 'Mic ACP LED Capture Switch'
- load the snd_ctl_led module when ACP microphone device is detected
- attach 'Mic ACP LED Capture Switch' to Mic LED
- add 'Mic ACP LED Capture Switch' control to ACP microphone device
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/115 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Thu, 4 Nov 2021 09:40:02 +0000 (10:40 +0100)]
HDA-Intel: fixes for Headphone+LO variant (Realtek ALC233)
This commit implements the support for shared Headphone and
Line Out and adds support for the Front Mic.
Controls for Headphone and Lineout:
Simple mixer control 'Headphone',0 # Switch only
Simple mixer control 'Headphone+LO',0 # Volume only
Simple mixer control 'Line Out',0 # Switch only
Jack 'Front Headphone Jack'
Jack 'Line Out Jack'
Control for Mic:
Simple mixer control 'Mic',0
Simple mixer control 'Mic Boost',0
Jack 'Mic Jack'
Control for Front Mic:
Simple mixer control 'Front Mic',0
Simple mixer control 'Front Mic Boost',0
Jack 'Front Mic Jack'
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/114 Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/116 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Shuming Fan [Mon, 15 Nov 2021 03:43:12 +0000 (11:43 +0800)]
ucm2: Add UCM support for Dell Desktop
The Dell Desktop uses two USB audio codecs as front and rear panel.
The front UAC has two outputs of speaker/headphone and one input of headset mic.
The rear UAC has one output of line-out.
Hans de Goede [Wed, 29 Sep 2021 09:11:44 +0000 (11:11 +0200)]
bytcr-rt5640: Add support for a second headset input
Some devices (HP Elitepad 1000 G2) have a second headphones output
(1 on the dock, 2nd on the tablet itself) the headset mic input of
this second headset is connected to IN1, add support for this.
Hans de Goede [Wed, 29 Sep 2021 09:11:43 +0000 (11:11 +0200)]
bytcr-rt5640: Add support for a second headphones output
Some devices (HP Elitepad 1000 G2) have a second headphones output
(1 on the dock, 2nd on the tablet itself) which is implemented through
the line-out output of the codec combined with an external hp-amp.
The kernel has recently gotten support for this setup and will
advertise this to userspace by adding cfg-hp2:lineout to the
components string, add support for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Hans de Goede [Wed, 29 Sep 2021 09:11:41 +0000 (11:11 +0200)]
codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches
Now that we rename the mutes from their weird 'Channel Switch' postfix
to the standard 'Playback Switch' postfix we end up having 2 Switches
for the 'Speaker' resp. 'Headphones' volume controls, with 1 of the two
getting ignored by the alsa-lib mixer code because it is duplicate.
This is caused by the bytcr-rt5640 machine driver adding DAPM PIN
Switches which are named 'Headphone Switch' resp. 'Speaker Switch',
rename these to 'Headphone Output Switch' / 'Speaker Output Switch'
so that they get seen as separate controls by the alsa-lib mixer code.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Hans de Goede [Wed, 29 Sep 2021 09:11:40 +0000 (11:11 +0200)]
bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set
Commit 446d0a71b47f ("codecs/rt5640: Move out BayTrail-specific pin switches")
moved the setting of the 'Headphone Switch' / 'Headset Mic Switch' into
"If.hp" resp "If.hsmic" blocks. But instead of making them part of the
True {} block inside that If, the statements where added add the top-level
of the If {} block where they are no-ops.
Move them to inside the True blocks so that these Switches again get
properly turned on/off. This fixes the Headphones and Headset-mic no longer
working on bytcr-rt5640 devices.
Cc: Dmitry Osipenko <digetx@gmail.com> Fixes: 446d0a71b47f ("codecs/rt5640: Move out BayTrail-specific pin switches") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Hui Wang [Fri, 23 Jul 2021 03:13:02 +0000 (11:13 +0800)]
sof-soundwire: rt1316 - DAC L and R is replaced by DAC
In the latest codec driver rt1316-sdw.c, the DAC L and DAC R are
replaced by DAC, so we change the ucm to add the condition checking,
if 'DAC L' exists, will set those mixers in the old way, otherwise,
set the mixers with new name.
The codec rt1316 is used on a Dell TGL soundwire audio machine.
Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Hui Wang [Fri, 23 Jul 2021 03:20:50 +0000 (11:20 +0800)]
sof-hda-dsp: Set Capture Switch on in the BootSequence
We found an issue that the PA source of Mic2/Headset and Mic2 is
muted by default after newly install an OS, the root cause is the
'Capture Switch' is set to off in the kernel.
Without ucm, the /usr/share/alsa/init/default will set the 'Capture
Switch' to on, similarly we set it to on in the BootSequence of ucm.
Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Hui Wang [Thu, 17 Jun 2021 03:50:53 +0000 (11:50 +0800)]
HDA-Intel: add Boost volume control for Headset Mic
Ubuntu Linux users complain even they set the input volume to maximum,
they still can't record sound with a pretty satisfied volume, they
need to run commandline commands to adjust "Mic Boost/Headset Mic
Boost/Headphone Mic boost" value to increase the input volume.
That is because the current ucm only defines "Capture Volume" to
control the input volume. Here we add Boost control, then users could
adjust both "Capture Volume" and "Boost Volume" through Pulseaudio and
Gnome.
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>
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>
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>
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>
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>
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>
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>