* [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set
@ 2021-07-18 17:57 Hans de Goede
2021-07-18 17:57 ` [PATCH alsa-ucm-conf 2/2] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches Hans de Goede
2021-09-28 20:15 ` [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Dmitry Osipenko
0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2021-07-18 17:57 UTC (permalink / raw)
To: Jaroslav Kysela
Cc: Hans de Goede, Dmitry Osipenko, alsa-devel, Pierre-Louis Bossart,
Bard Liao
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>
---
ucm2/bytcr-rt5640/HiFi.conf | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/ucm2/bytcr-rt5640/HiFi.conf b/ucm2/bytcr-rt5640/HiFi.conf
index a5b47df..08127e0 100644
--- a/ucm2/bytcr-rt5640/HiFi.conf
+++ b/ucm2/bytcr-rt5640/HiFi.conf
@@ -100,16 +100,18 @@ If.mono {
If.hp {
Condition { Type String Empty "" }
- True.Include.hs.File "/codecs/rt5640/HeadPhones.conf"
+ True {
+ Include.hs.File "/codecs/rt5640/HeadPhones.conf"
- SectionDevice."Headphones" {
- EnableSequence [
- cset "name='Headphone Switch' on"
- ]
+ SectionDevice."Headphones" {
+ EnableSequence [
+ cset "name='Headphone Switch' on"
+ ]
- DisableSequence [
- cset "name='Headphone Switch' off"
- ]
+ DisableSequence [
+ cset "name='Headphone Switch' off"
+ ]
+ }
}
}
@@ -178,15 +180,17 @@ If.in3 {
If.hsmic {
Condition { Type String Empty "" }
- True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
+ True {
+ Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
- SectionDevice."Headset" {
- EnableSequence [
- cset "name='Headset Mic Switch' on"
- ]
+ SectionDevice."Headset" {
+ EnableSequence [
+ cset "name='Headset Mic Switch' on"
+ ]
- DisableSequence [
- cset "name='Headset Mic Switch' off"
- ]
+ DisableSequence [
+ cset "name='Headset Mic Switch' off"
+ ]
+ }
}
}
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH alsa-ucm-conf 2/2] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches
2021-07-18 17:57 [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Hans de Goede
@ 2021-07-18 17:57 ` Hans de Goede
2021-09-28 20:15 ` [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Dmitry Osipenko
1 sibling, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2021-07-18 17:57 UTC (permalink / raw)
To: Jaroslav Kysela
Cc: Hans de Goede, Dmitry Osipenko, alsa-devel, Pierre-Louis Bossart,
Bard Liao
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>
---
ucm2/codecs/rt5640/init.conf | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ucm2/codecs/rt5640/init.conf b/ucm2/codecs/rt5640/init.conf
index 38baee4..0756b4a 100644
--- a/ucm2/codecs/rt5640/init.conf
+++ b/ucm2/codecs/rt5640/init.conf
@@ -5,8 +5,13 @@ LibraryConfig.remap.Config {
"name='IN1 Boost'" "name='IN1 Boost Capture Volume'"
"name='IN2 Boost'" "name='IN2 Boost Capture Volume'"
"name='IN3 Boost'" "name='IN3 Boost Capture Volume'"
+ # Rename the 'Headphone Switch' DAPM PIN switch to avoid it getting
+ # grouped with 'Headphone Playback Volume'
+ "name='Headphone Switch'" "name='Headphone Output Switch'"
"name='HP Playback Volume'" "name='Headphone Playback Volume'"
"name='HP Channel Switch'" "name='Headphone Playback Switch'"
+ # Idem for the 'Speaker Switch'
+ "name='Speaker Switch'" "name='Speaker Output Switch'"
"name='Speaker Channel Switch'" "name='Speaker Playback Switch'"
}
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set
2021-07-18 17:57 [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Hans de Goede
2021-07-18 17:57 ` [PATCH alsa-ucm-conf 2/2] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches Hans de Goede
@ 2021-09-28 20:15 ` Dmitry Osipenko
2021-09-29 9:07 ` Hans de Goede
1 sibling, 1 reply; 4+ messages in thread
From: Dmitry Osipenko @ 2021-09-28 20:15 UTC (permalink / raw)
To: Hans de Goede, Jaroslav Kysela
Cc: alsa-devel, Pierre-Louis Bossart, Bard Liao
18.07.2021 20:57, Hans de Goede пишет:
> 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>
> ---
> ucm2/bytcr-rt5640/HiFi.conf | 36 ++++++++++++++++++++----------------
> 1 file changed, 20 insertions(+), 16 deletions(-)
Hi,
I don't see this patch in upstream alsa-ucm, is it still actual?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set
2021-09-28 20:15 ` [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Dmitry Osipenko
@ 2021-09-29 9:07 ` Hans de Goede
0 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2021-09-29 9:07 UTC (permalink / raw)
To: Dmitry Osipenko, Jaroslav Kysela
Cc: alsa-devel, Pierre-Louis Bossart, Bard Liao
Hi,
On 9/28/21 10:15 PM, Dmitry Osipenko wrote:
> 18.07.2021 20:57, Hans de Goede пишет:
>> 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>
>> ---
>> ucm2/bytcr-rt5640/HiFi.conf | 36 ++++++++++++++++++++----------------
>> 1 file changed, 20 insertions(+), 16 deletions(-)
>
> Hi,
>
> I don't see this patch in upstream alsa-ucm, is it still actual?
Yes this patch series is still actual. I also have 3 other patches
pending where I was waiting for the mathcing kernel parts to land
first. Those have landed now, so I'll send out those now too,
including a resend of these 2.
Regards,
Hans
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-29 9:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-18 17:57 [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Hans de Goede
2021-07-18 17:57 ` [PATCH alsa-ucm-conf 2/2] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches Hans de Goede
2021-09-28 20:15 ` [PATCH alsa-ucm-conf 1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Dmitry Osipenko
2021-09-29 9:07 ` Hans de Goede
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.