From 8389479bc550c4aa00218d2b99f5eb0341a1826bee905704e430277c3a38dccd Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 21 Jan 2021 10:24:12 +0000 Subject: [PATCH] Accepting request 865342 from home:tiwai:branches:multimedia:libs - Backport upstream fixes: more Baytrail/Cherrytrail profiles, TRX40 / ALC1220-VLC profiles: 0013-bytcr-rt5640-Add-support-for-devices-without-speaker.patch 0014-rt5640-Move-standard-DAC-setup-to-EnableSeq.conf.patch 0015-bytcr-rt5640-fix-the-execution-order.patch 0016-ucm2-add-initial-configuration-for-TRX40-Gigabyte-Ao.patch 0017-USB-Audio-ALC1220-Bump-analog-Speaker-priority-over-.patch 0018-USB-Audio-ALC1220-fix-indentation-for-Speaker-device.patch 0019-USB-Audio-fix-indentation-in-Gigabyte-Aorus-Master-M.patch 0020-chtnau8824-Add-a-SST-define-variable.patch 0021-kblrt5660-Fix-file-permissions.patch - Run fdupes to reduce the duplicated files OBS-URL: https://build.opensuse.org/request/show/865342 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-ucm-conf?expand=0&rev=29 --- ...-support-for-devices-without-speaker.patch | 224 ++++++++++++++++++ ...standard-DAC-setup-to-EnableSeq.conf.patch | 88 +++++++ ...bytcr-rt5640-fix-the-execution-order.patch | 68 ++++++ ...-configuration-for-TRX40-Gigabyte-Ao.patch | 107 +++++++++ ...0-Bump-analog-Speaker-priority-over-.patch | 44 ++++ ...0-fix-indentation-for-Speaker-device.patch | 34 +++ ...dentation-in-Gigabyte-Aorus-Master-M.patch | 35 +++ ...chtnau8824-Add-a-SST-define-variable.patch | 60 +++++ 0021-kblrt5660-Fix-file-permissions.patch | 34 +++ alsa-ucm-conf.changes | 16 ++ alsa-ucm-conf.spec | 20 ++ 11 files changed, 730 insertions(+) create mode 100644 0013-bytcr-rt5640-Add-support-for-devices-without-speaker.patch create mode 100644 0014-rt5640-Move-standard-DAC-setup-to-EnableSeq.conf.patch create mode 100644 0015-bytcr-rt5640-fix-the-execution-order.patch create mode 100644 0016-ucm2-add-initial-configuration-for-TRX40-Gigabyte-Ao.patch create mode 100644 0017-USB-Audio-ALC1220-Bump-analog-Speaker-priority-over-.patch create mode 100644 0018-USB-Audio-ALC1220-fix-indentation-for-Speaker-device.patch create mode 100644 0019-USB-Audio-fix-indentation-in-Gigabyte-Aorus-Master-M.patch create mode 100644 0020-chtnau8824-Add-a-SST-define-variable.patch create mode 100644 0021-kblrt5660-Fix-file-permissions.patch diff --git a/0013-bytcr-rt5640-Add-support-for-devices-without-speaker.patch b/0013-bytcr-rt5640-Add-support-for-devices-without-speaker.patch new file mode 100644 index 0000000..e908fbe --- /dev/null +++ b/0013-bytcr-rt5640-Add-support-for-devices-without-speaker.patch @@ -0,0 +1,224 @@ +From bdd05ac3396a3a09f3818aaa9157eb7ef07676d6 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 9 Jan 2021 22:02:51 +0100 +Subject: [PATCH 13/20] 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 +Signed-off-by: Hans de Goede +Signed-off-by: Jaroslav Kysela +--- + ucm2/bytcr-rt5640/HiFi-Components.conf | 28 +++++++++++++++++++++----- + ucm2/bytcr-rt5640/HiFi-LongName.conf | 28 +++++++++++++++++++++----- + ucm2/codecs/rt5640/HeadPhones.conf | 14 ++++++++++--- + ucm2/codecs/rt5640/HeadsetMic.conf | 14 ++++++++++--- + 4 files changed, 68 insertions(+), 16 deletions(-) + +diff --git a/ucm2/bytcr-rt5640/HiFi-Components.conf b/ucm2/bytcr-rt5640/HiFi-Components.conf +index 2ce4f5978567..a76b42d0b414 100644 +--- a/ucm2/bytcr-rt5640/HiFi-Components.conf ++++ b/ucm2/bytcr-rt5640/HiFi-Components.conf +@@ -1,10 +1,16 @@ ++Define.HaveSpeaker "" ++Define.HaveInternalMic "" ++ + If.spk { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-spk:2" + } +- True.Include.spk.File "/codecs/rt5640/Speaker.conf" ++ True { ++ Include.spk.File "/codecs/rt5640/Speaker.conf" ++ Define.HaveSpeaker "yes" ++ } + } + + If.mono { +@@ -13,7 +19,10 @@ If.mono { + Haystack "${CardComponents}" + Needle "cfg-spk:1" + } +- True.Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf" ++ True { ++ Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf" ++ Define.HaveSpeaker "yes" ++ } + } + + Include.hs.File "/codecs/rt5640/HeadPhones.conf" +@@ -24,7 +33,10 @@ If.dmic1 { + Haystack "${CardComponents}" + Needle "cfg-mic:dmic1" + } +- True.Include.dmic.File "/codecs/rt5640/DigitalMics.conf" ++ True { ++ Include.dmic.File "/codecs/rt5640/DigitalMics.conf" ++ Define.HaveInternalMic "yes" ++ } + } + + If.in1 { +@@ -33,7 +45,10 @@ If.in1 { + Haystack "${CardComponents}" + Needle "cfg-mic:in1" + } +- True.Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf" ++ True { ++ Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf" ++ Define.HaveInternalMic "yes" ++ } + } + + If.in3 { +@@ -42,7 +57,10 @@ If.in3 { + Haystack "${CardComponents}" + Needle "cfg-mic:in3" + } +- True.Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf" ++ True { ++ Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf" ++ Define.HaveInternalMic "yes" ++ } + } + + Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf" +diff --git a/ucm2/bytcr-rt5640/HiFi-LongName.conf b/ucm2/bytcr-rt5640/HiFi-LongName.conf +index c07f153a969b..6cb55565baec 100644 +--- a/ucm2/bytcr-rt5640/HiFi-LongName.conf ++++ b/ucm2/bytcr-rt5640/HiFi-LongName.conf +@@ -1,10 +1,16 @@ ++Define.HaveSpeaker "" ++Define.HaveInternalMic "" ++ + If.spk { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-stereo-spk" + } +- True.Include.spk.File "/codecs/rt5640/Speaker.conf" ++ True { ++ Include.spk.File "/codecs/rt5640/Speaker.conf" ++ Define.HaveSpeaker "yes" ++ } + } + + If.mono { +@@ -13,7 +19,10 @@ If.mono { + Haystack "${CardLongName}" + Needle "-mono-spk" + } +- True.Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf" ++ True { ++ Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf" ++ Define.HaveSpeaker "yes" ++ } + } + + Include.hs.File "/codecs/rt5640/HeadPhones.conf" +@@ -24,7 +33,10 @@ If.dmic1 { + Haystack "${CardLongName}" + Needle "-dmic1-mic" + } +- True.Include.dmic.File "/codecs/rt5640/DigitalMics.conf" ++ True { ++ Include.dmic.File "/codecs/rt5640/DigitalMics.conf" ++ Define.HaveInternalMic "yes" ++ } + } + + If.in1 { +@@ -33,7 +45,10 @@ If.in1 { + Haystack "${CardLongName}" + Needle "-in1-mic" + } +- True.Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf" ++ True { ++ Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf" ++ Define.HaveInternalMic "yes" ++ } + } + + If.in3 { +@@ -42,7 +57,10 @@ If.in3 { + Haystack "${CardLongName}" + Needle "-in3-mic" + } +- True.Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf" ++ True { ++ Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf" ++ Define.HaveInternalMic "yes" ++ } + } + + Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf" +diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf +index 42151d6e2e17..b7707e5285b0 100644 +--- a/ucm2/codecs/rt5640/HeadPhones.conf ++++ b/ucm2/codecs/rt5640/HeadPhones.conf +@@ -1,9 +1,17 @@ + SectionDevice."Headphones" { + Comment "Headphones" + +- ConflictingDevice [ +- "Speaker" +- ] ++ If.have-spk { ++ Condition { ++ Type String ++ Empty "${var:HaveSpeaker}" ++ } ++ False { ++ ConflictingDevice [ ++ "Speaker" ++ ] ++ } ++ } + + EnableSequence [ + cset "name='DAC MIXL INF1 Switch' on" +diff --git a/ucm2/codecs/rt5640/HeadsetMic.conf b/ucm2/codecs/rt5640/HeadsetMic.conf +index 7a8dfb8df6cc..f88b611a45c5 100644 +--- a/ucm2/codecs/rt5640/HeadsetMic.conf ++++ b/ucm2/codecs/rt5640/HeadsetMic.conf +@@ -1,9 +1,17 @@ + SectionDevice."Headset" { + Comment "Headset Microphone" + +- ConflictingDevice [ +- "Mic" +- ] ++ If.have-mic { ++ Condition { ++ Type String ++ Empty "${var:HaveInternalMic}" ++ } ++ False { ++ ConflictingDevice [ ++ "Mic" ++ ] ++ } ++ } + + EnableSequence [ + cset "name='Headset Mic Switch' on" +-- +2.26.2 + diff --git a/0014-rt5640-Move-standard-DAC-setup-to-EnableSeq.conf.patch b/0014-rt5640-Move-standard-DAC-setup-to-EnableSeq.conf.patch new file mode 100644 index 0000000..584d246 --- /dev/null +++ b/0014-rt5640-Move-standard-DAC-setup-to-EnableSeq.conf.patch @@ -0,0 +1,88 @@ +From cd02791e9360bcfa2cd4bed40cf5ddabb378ef93 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 9 Jan 2021 22:02:52 +0100 +Subject: [PATCH 14/20] 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 +Signed-off-by: Jaroslav Kysela +--- + ucm2/codecs/rt5640/EnableSeq.conf | 6 ++++++ + ucm2/codecs/rt5640/HeadPhones.conf | 6 ------ + ucm2/codecs/rt5640/MonoSpeaker.conf | 6 ------ + ucm2/codecs/rt5640/Speaker.conf | 6 ------ + 4 files changed, 6 insertions(+), 18 deletions(-) + +diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf +index cbf403814a6f..145a23bd42fc 100644 +--- a/ucm2/codecs/rt5640/EnableSeq.conf ++++ b/ucm2/codecs/rt5640/EnableSeq.conf +@@ -1,5 +1,11 @@ + EnableSequence [ + # RT5640 default output routing ++ cset "name='DAC MIXL INF1 Switch' on" ++ cset "name='DAC MIXR INF1 Switch' on" ++ cset "name='Stereo DAC MIXL DAC L1 Switch' on" ++ cset "name='Stereo DAC MIXR DAC R1 Switch' on" ++ cset "name='Stereo DAC MIXL DAC L2 Switch' on" ++ cset "name='Stereo DAC MIXR DAC R2 Switch' on" + cset "name='OUT MIXL DAC L1 Switch' on" + cset "name='OUT MIXR DAC R1 Switch' on" + +diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf +index b7707e5285b0..a9e4d2026784 100644 +--- a/ucm2/codecs/rt5640/HeadPhones.conf ++++ b/ucm2/codecs/rt5640/HeadPhones.conf +@@ -14,12 +14,6 @@ SectionDevice."Headphones" { + } + + EnableSequence [ +- cset "name='DAC MIXL INF1 Switch' on" +- cset "name='DAC MIXR INF1 Switch' on" +- cset "name='Stereo DAC MIXL DAC L1 Switch' on" +- cset "name='Stereo DAC MIXR DAC R1 Switch' on" +- cset "name='Stereo DAC MIXL DAC L2 Switch' on" +- cset "name='Stereo DAC MIXR DAC R2 Switch' on" + cset "name='HPO MIX HPVOL Switch' on" + cset "name='Headphone Switch' on" + cset "name='HP Channel Switch' on" +diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf +index ddc7ba85cddd..23cf34c259e1 100644 +--- a/ucm2/codecs/rt5640/MonoSpeaker.conf ++++ b/ucm2/codecs/rt5640/MonoSpeaker.conf +@@ -6,12 +6,6 @@ SectionDevice."Speaker" { + ] + + EnableSequence [ +- cset "name='DAC MIXL INF1 Switch' on" +- cset "name='DAC MIXR INF1 Switch' on" +- cset "name='Stereo DAC MIXL DAC L1 Switch' on" +- cset "name='Stereo DAC MIXR DAC R1 Switch' on" +- cset "name='Stereo DAC MIXL DAC L2 Switch' on" +- cset "name='Stereo DAC MIXR DAC R2 Switch' on" + cset "name='SPK MIXL DAC L1 Switch' on" + cset "name='SPK MIXR DAC R1 Switch' on" + cset "name='SPOL MIX SPKVOL L Switch' on" +diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf +index 411cd13db1ff..422cfdfaf472 100644 +--- a/ucm2/codecs/rt5640/Speaker.conf ++++ b/ucm2/codecs/rt5640/Speaker.conf +@@ -6,12 +6,6 @@ SectionDevice."Speaker" { + ] + + EnableSequence [ +- cset "name='DAC MIXL INF1 Switch' on" +- cset "name='DAC MIXR INF1 Switch' on" +- cset "name='Stereo DAC MIXL DAC L1 Switch' on" +- cset "name='Stereo DAC MIXR DAC R1 Switch' on" +- cset "name='Stereo DAC MIXL DAC L2 Switch' on" +- cset "name='Stereo DAC MIXR DAC R2 Switch' on" + cset "name='SPK MIXL DAC L1 Switch' on" + cset "name='SPK MIXR DAC R1 Switch' on" + cset "name='SPOL MIX SPKVOL L Switch' on" +-- +2.26.2 + diff --git a/0015-bytcr-rt5640-fix-the-execution-order.patch b/0015-bytcr-rt5640-fix-the-execution-order.patch new file mode 100644 index 0000000..73c2f00 --- /dev/null +++ b/0015-bytcr-rt5640-fix-the-execution-order.patch @@ -0,0 +1,68 @@ +From 95587ae8b75134c4bbc2cec0181e5d529826c9c4 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Thu, 14 Jan 2021 18:31:24 +0100 +Subject: [PATCH 15/20] 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 +--- + ucm2/bytcr-rt5640/HiFi-Components.conf | 10 ++++++++-- + ucm2/bytcr-rt5640/HiFi-LongName.conf | 10 ++++++++-- + 2 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/ucm2/bytcr-rt5640/HiFi-Components.conf b/ucm2/bytcr-rt5640/HiFi-Components.conf +index a76b42d0b414..19997178a934 100644 +--- a/ucm2/bytcr-rt5640/HiFi-Components.conf ++++ b/ucm2/bytcr-rt5640/HiFi-Components.conf +@@ -25,7 +25,10 @@ If.mono { + } + } + +-Include.hs.File "/codecs/rt5640/HeadPhones.conf" ++If.hp { ++ Condition { Type String Empty "" } ++ True.Include.hs.File "/codecs/rt5640/HeadPhones.conf" ++} + + If.dmic1 { + Condition { +@@ -63,4 +66,7 @@ If.in3 { + } + } + +-Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf" ++If.hsmic { ++ Condition { Type String Empty "" } ++ True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf" ++} +diff --git a/ucm2/bytcr-rt5640/HiFi-LongName.conf b/ucm2/bytcr-rt5640/HiFi-LongName.conf +index 6cb55565baec..34acef8142f0 100644 +--- a/ucm2/bytcr-rt5640/HiFi-LongName.conf ++++ b/ucm2/bytcr-rt5640/HiFi-LongName.conf +@@ -25,7 +25,10 @@ If.mono { + } + } + +-Include.hs.File "/codecs/rt5640/HeadPhones.conf" ++If.hp { ++ Condition { Type String Empty "" } ++ True.Include.hs.File "/codecs/rt5640/HeadPhones.conf" ++} + + If.dmic1 { + Condition { +@@ -63,4 +66,7 @@ If.in3 { + } + } + +-Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf" ++If.hsmic { ++ Condition { Type String Empty "" } ++ True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf" ++} +-- +2.26.2 + diff --git a/0016-ucm2-add-initial-configuration-for-TRX40-Gigabyte-Ao.patch b/0016-ucm2-add-initial-configuration-for-TRX40-Gigabyte-Ao.patch new file mode 100644 index 0000000..627a361 --- /dev/null +++ b/0016-ucm2-add-initial-configuration-for-TRX40-Gigabyte-Ao.patch @@ -0,0 +1,107 @@ +From 09e5271401480297c2c9c0b753df9705123a1af1 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Thu, 14 Jan 2021 11:03:56 +0100 +Subject: [PATCH 16/20] 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 +--- + ...Gigabyte-Aorus-Master-Front-Headphone.conf | 1 + + ...Gigabyte-Aorus-Master-Main-Audio-HiFi.conf | 61 +++++++++++++++++++ + .../Gigabyte-Aorus-Master-Main-Audio.conf | 6 ++ + 3 files changed, 68 insertions(+) + create mode 120000 ucm2/USB-Audio/Gigabyte-Aorus-Master-Front-Headphone.conf + create mode 100644 ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf + create mode 100644 ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio.conf + +diff --git a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Front-Headphone.conf b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Front-Headphone.conf +new file mode 120000 +index 000000000000..13764378427a +--- /dev/null ++++ b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Front-Headphone.conf +@@ -0,0 +1 @@ ++../module/lib/linked.conf +\ No newline at end of file +diff --git a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf +new file mode 100644 +index 000000000000..5c241656cf2b +--- /dev/null ++++ b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf +@@ -0,0 +1,61 @@ ++Define.SecondaryCardId "$${CardIdByName:Aorus Master Front Headphone}" ++ ++SectionDevice."Speaker" { ++ Comment "Speakers" ++ Value { ++ PlaybackChannels 8 ++ PlaybackPriority 200 ++ PlaybackPCM "hw:${CardId}" ++ JackControl "Line Out Jack" ++ PlaybackMixerElem "Line Out" ++ } ++} ++ ++SectionDevice."Headphones" { ++ Comment "Front Headphones" ++ Value { ++ PlaybackPriority 300 ++ PlaybackPCM "hw:${var:SecondaryCardId}" ++ JackCTL "hw:${var:SecondaryCardId}" ++ JackControl "Headphone - Output Jack" ++ } ++} ++ ++SectionDevice."SPDIF" { ++ Comment "S/PDIF Out" ++ Value { ++ PlaybackPriority 100 ++ PlaybackPCM "hw:${CardId},1" ++ # PlaybackMixerElem "IEC958" ++ } ++} ++ ++SectionDevice."Line" { ++ Comment "Line In" ++ Value { ++ CapturePriority 100 ++ CapturePCM "hw:${CardId}" ++ JackControl "Line Jack" ++ CaptureMixerElem "Line" ++ } ++} ++ ++SectionDevice."Mic1" { ++ Comment "Microphone" ++ Value { ++ CapturePriority 200 ++ CapturePCM "hw:${CardId},1" ++ JackControl "Mic Jack" ++ CaptureMixerElem "Mic" ++ } ++} ++ ++SectionDevice."Mic2" { ++ Comment "Front Microphone" ++ Value { ++ CapturePriority 300 ++ CapturePCM "hw:${CardId},2" ++ JackControl "Front Mic Jack" ++ CaptureMixerElem "Front Mic" ++ } ++} +diff --git a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio.conf b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio.conf +new file mode 100644 +index 000000000000..656b989762e6 +--- /dev/null ++++ b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio.conf +@@ -0,0 +1,6 @@ ++Syntax 3 ++Comment "Gigabyte Aorus Integrated Audio" ++SectionUseCase."HiFi" { ++ File "Gigabyte-Aorus-Master-Main-Audio-HiFi.conf" ++ Comment "Default Alsa Profile" ++} +-- +2.26.2 + diff --git a/0017-USB-Audio-ALC1220-Bump-analog-Speaker-priority-over-.patch b/0017-USB-Audio-ALC1220-Bump-analog-Speaker-priority-over-.patch new file mode 100644 index 0000000..bb57bfd --- /dev/null +++ b/0017-USB-Audio-ALC1220-Bump-analog-Speaker-priority-over-.patch @@ -0,0 +1,44 @@ +From 062e4710c524283c5d11cbf99931b24c6d963f98 Mon Sep 17 00:00:00 2001 +From: Marijn Suijten +Date: Thu, 14 Jan 2021 14:11:50 +0100 +Subject: [PATCH 17/20] 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 +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf +index 344db8335398..cbf715475e31 100644 +--- a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf ++++ b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf +@@ -2,7 +2,7 @@ SectionDevice."Speaker" { + Comment "Speakers" + Value { + PlaybackChannels 8 +- PlaybackPriority 100 ++ PlaybackPriority 200 + PlaybackPCM "hw:${CardId}" + JackControl "Speaker Jack" + PlaybackMixerElem "Speaker" +@@ -22,7 +22,7 @@ SectionDevice."Headphones" { + SectionDevice."SPDIF" { + Comment "S/PDIF Out" + Value { +- PlaybackPriority 200 ++ PlaybackPriority 100 + PlaybackPCM "hw:${CardId},2" + PlaybackMixerElem "IEC958" + } +-- +2.26.2 + diff --git a/0018-USB-Audio-ALC1220-fix-indentation-for-Speaker-device.patch b/0018-USB-Audio-ALC1220-fix-indentation-for-Speaker-device.patch new file mode 100644 index 0000000..0992f37 --- /dev/null +++ b/0018-USB-Audio-ALC1220-fix-indentation-for-Speaker-device.patch @@ -0,0 +1,34 @@ +From 8e875c9467cc72e53e53104b07d5515f3ef0a779 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Fri, 15 Jan 2021 14:03:35 +0100 +Subject: [PATCH 18/20] USB-Audio/ALC1220: fix indentation for Speaker device + +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf +index cbf715475e31..0d753843e404 100644 +--- a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf ++++ b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf +@@ -1,11 +1,11 @@ + SectionDevice."Speaker" { + Comment "Speakers" + Value { +- PlaybackChannels 8 +- PlaybackPriority 200 +- PlaybackPCM "hw:${CardId}" +- JackControl "Speaker Jack" +- PlaybackMixerElem "Speaker" ++ PlaybackChannels 8 ++ PlaybackPriority 200 ++ PlaybackPCM "hw:${CardId}" ++ JackControl "Speaker Jack" ++ PlaybackMixerElem "Speaker" + } + } + +-- +2.26.2 + diff --git a/0019-USB-Audio-fix-indentation-in-Gigabyte-Aorus-Master-M.patch b/0019-USB-Audio-fix-indentation-in-Gigabyte-Aorus-Master-M.patch new file mode 100644 index 0000000..e8ca7c5 --- /dev/null +++ b/0019-USB-Audio-fix-indentation-in-Gigabyte-Aorus-Master-M.patch @@ -0,0 +1,35 @@ +From 5503703ab95d5ed40b1da138016777bb5429190e Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Fri, 15 Jan 2021 14:55:53 +0100 +Subject: [PATCH 19/20] USB-Audio: fix indentation in + Gigabyte-Aorus-Master-Main-Audio-HiFi.conf + +Signed-off-by: Jaroslav Kysela +--- + .../Gigabyte-Aorus-Master-Main-Audio-HiFi.conf | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf +index 5c241656cf2b..37800fb35411 100644 +--- a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf ++++ b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf +@@ -3,11 +3,11 @@ Define.SecondaryCardId "$${CardIdByName:Aorus Master Front Headphone}" + SectionDevice."Speaker" { + Comment "Speakers" + Value { +- PlaybackChannels 8 +- PlaybackPriority 200 +- PlaybackPCM "hw:${CardId}" +- JackControl "Line Out Jack" +- PlaybackMixerElem "Line Out" ++ PlaybackChannels 8 ++ PlaybackPriority 200 ++ PlaybackPCM "hw:${CardId}" ++ JackControl "Line Out Jack" ++ PlaybackMixerElem "Line Out" + } + } + +-- +2.26.2 + diff --git a/0020-chtnau8824-Add-a-SST-define-variable.patch b/0020-chtnau8824-Add-a-SST-define-variable.patch new file mode 100644 index 0000000..1dbdfd6 --- /dev/null +++ b/0020-chtnau8824-Add-a-SST-define-variable.patch @@ -0,0 +1,60 @@ +From eaa5eacd3e068471537888dee627751dc35e714a Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Wed, 16 Dec 2020 16:38:37 +0100 +Subject: [PATCH 20/20] 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 +Signed-off-by: Jaroslav Kysela +--- + ucm2/chtnau8824/HiFi.conf | 19 +++++++++++++++---- + 1 file changed, 15 insertions(+), 4 deletions(-) + +diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf +index 105f36078d38..b36588f25c81 100644 +--- a/ucm2/chtnau8824/HiFi.conf ++++ b/ucm2/chtnau8824/HiFi.conf +@@ -1,5 +1,16 @@ + Define.Speaker "Speaker" + Define.Mic "InternalMic" ++Define.SST "yes" ++ ++If.Controls { ++ Condition { ++ Type ControlExists ++ Control "name='media0_in Gain 0 Switch'" ++ } ++ False { ++ Define.SST "" ++ } ++} + + If.cfg-mspk { + Condition { +@@ -33,12 +44,12 @@ SectionVerb { + + Include.e.File "/codecs/nau8824/EnableSeq.conf" + +- If.Controls { ++ If.SST { + Condition { +- Type ControlExists +- Control "name='media0_in Gain 0 Switch'" ++ Type String ++ Empty "${var:SST}" + } +- True { ++ False { + Include.pe { + File "/platforms/bytcr/PlatformEnableSeq.conf" + Before.EnableSequence "0" +-- +2.26.2 + diff --git a/0021-kblrt5660-Fix-file-permissions.patch b/0021-kblrt5660-Fix-file-permissions.patch new file mode 100644 index 0000000..daa17ef --- /dev/null +++ b/0021-kblrt5660-Fix-file-permissions.patch @@ -0,0 +1,34 @@ +From 4e0369b4fcebde195a38d5b90c73b08f28e0047a Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 21 Jan 2021 11:15:02 +0100 +Subject: [PATCH] kblrt5660: Fix file permissions + +The exec bit was set wrongly on those files. Fix them. + +Signed-off-by: Takashi Iwai +--- + ucm2/kblrt5660/Hdmi1.conf | 0 + ucm2/kblrt5660/Hdmi2.conf | 0 + ucm2/kblrt5660/HiFi.conf | 0 + ucm2/kblrt5660/kblrt5660.conf | 0 + 4 files changed, 0 insertions(+), 0 deletions(-) + mode change 100755 => 100644 ucm2/kblrt5660/Hdmi1.conf + mode change 100755 => 100644 ucm2/kblrt5660/Hdmi2.conf + mode change 100755 => 100644 ucm2/kblrt5660/HiFi.conf + mode change 100755 => 100644 ucm2/kblrt5660/kblrt5660.conf + +diff --git a/ucm2/kblrt5660/Hdmi1.conf b/ucm2/kblrt5660/Hdmi1.conf +old mode 100755 +new mode 100644 +diff --git a/ucm2/kblrt5660/Hdmi2.conf b/ucm2/kblrt5660/Hdmi2.conf +old mode 100755 +new mode 100644 +diff --git a/ucm2/kblrt5660/HiFi.conf b/ucm2/kblrt5660/HiFi.conf +old mode 100755 +new mode 100644 +diff --git a/ucm2/kblrt5660/kblrt5660.conf b/ucm2/kblrt5660/kblrt5660.conf +old mode 100755 +new mode 100644 +-- +2.26.2 + diff --git a/alsa-ucm-conf.changes b/alsa-ucm-conf.changes index 3fb6421..87feffa 100644 --- a/alsa-ucm-conf.changes +++ b/alsa-ucm-conf.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Thu Jan 21 09:43:27 CET 2021 - tiwai@suse.de + +- Backport upstream fixes: + more Baytrail/Cherrytrail profiles, TRX40 / ALC1220-VLC profiles: + 0013-bytcr-rt5640-Add-support-for-devices-without-speaker.patch + 0014-rt5640-Move-standard-DAC-setup-to-EnableSeq.conf.patch + 0015-bytcr-rt5640-fix-the-execution-order.patch + 0016-ucm2-add-initial-configuration-for-TRX40-Gigabyte-Ao.patch + 0017-USB-Audio-ALC1220-Bump-analog-Speaker-priority-over-.patch + 0018-USB-Audio-ALC1220-fix-indentation-for-Speaker-device.patch + 0019-USB-Audio-fix-indentation-in-Gigabyte-Aorus-Master-M.patch + 0020-chtnau8824-Add-a-SST-define-variable.patch + 0021-kblrt5660-Fix-file-permissions.patch +- Run fdupes to reduce the duplicated files + ------------------------------------------------------------------- Tue Jan 5 15:19:35 CET 2021 - tiwai@suse.de diff --git a/alsa-ucm-conf.spec b/alsa-ucm-conf.spec index 5055ef8..00ae404 100644 --- a/alsa-ucm-conf.spec +++ b/alsa-ucm-conf.spec @@ -22,6 +22,7 @@ Release: 0 Summary: ALSA UCM Profiles License: BSD-3-Clause URL: http://www.alsa-project.org/ +BuildRequires: fdupes Source: ftp://ftp.alsa-project.org/pub/lib/alsa-ucm-conf-%{version}.tar.bz2 Patch1: 0001-fix-the-ucm2-codecs-hda-hdmi.conf-use.patch Patch2: 0002-codecs-hda-hdmi.conf-add-DisplayPort-to-the-device-d.patch @@ -35,6 +36,15 @@ Patch9: 0009-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch Patch10: 0010-HDA-Intel-HiFi-dual-Add-EnableSequence-and-DisableSe.patch Patch11: 0011-HDA-Intel-HiFi-dual-Add-BootSequence-and-disable-pla.patch Patch12: 0012-chtrt5645-Enable-Internal-MIC-of-ECS-EF20EA.patch +Patch13: 0013-bytcr-rt5640-Add-support-for-devices-without-speaker.patch +Patch14: 0014-rt5640-Move-standard-DAC-setup-to-EnableSeq.conf.patch +Patch15: 0015-bytcr-rt5640-fix-the-execution-order.patch +Patch16: 0016-ucm2-add-initial-configuration-for-TRX40-Gigabyte-Ao.patch +Patch17: 0017-USB-Audio-ALC1220-Bump-analog-Speaker-priority-over-.patch +Patch18: 0018-USB-Audio-ALC1220-fix-indentation-for-Speaker-device.patch +Patch19: 0019-USB-Audio-fix-indentation-in-Gigabyte-Aorus-Master-M.patch +Patch20: 0020-chtnau8824-Add-a-SST-define-variable.patch +Patch21: 0021-kblrt5660-Fix-file-permissions.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -55,6 +65,15 @@ This package contains the profiles files for ALSA UCM (Use Case Manager). %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 %build @@ -62,6 +81,7 @@ This package contains the profiles files for ALSA UCM (Use Case Manager). mkdir -p %{buildroot}%{_datadir}/alsa cp -a ucm %{buildroot}%{_datadir}/alsa/ cp -a ucm2 %{buildroot}%{_datadir}/alsa/ +%fdupes -s %{buildroot} %files %defattr(-, root, root)