From: Jaroslav Kysela Date: Tue, 19 Nov 2019 20:19:39 +0000 (+0100) Subject: bytcr-rt5640: adapt to ucm2 X-Git-Tag: v1.2.1.2~26 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=62ae6affd9f8cd415dbeca2d5ca70fce8ad197fd;p=alsa-ucm-conf.git bytcr-rt5640: adapt to ucm2 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm/bytcr-rt5640-mono-spk-dmic1-mic/HiFi.conf b/ucm/bytcr-rt5640-mono-spk-dmic1-mic/HiFi.conf deleted file mode 100644 index 0e21d6e..0000000 --- a/ucm/bytcr-rt5640-mono-spk-dmic1-mic/HiFi.conf +++ /dev/null @@ -1,27 +0,0 @@ -# Use case Configuration for bytcr-rt5640 - - -SectionVerb { - EnableSequence [ - cdev "hw:bytcrrt5640" - - - - ] - - DisableSequence [ - cdev "hw:bytcrrt5640" - - ] - - Value { - PlaybackPCM "hw:bytcrrt5640" - CapturePCM "hw:bytcrrt5640" - } -} - - - - - - diff --git a/ucm/bytcr-rt5640-mono-spk-dmic1-mic/bytcr-rt5640-mono-spk-dmic1-mic.conf b/ucm/bytcr-rt5640-mono-spk-dmic1-mic/bytcr-rt5640-mono-spk-dmic1-mic.conf deleted file mode 100644 index f5297e9..0000000 --- a/ucm/bytcr-rt5640-mono-spk-dmic1-mic/bytcr-rt5640-mono-spk-dmic1-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcr-rt5640-mono-spk-dmic1-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytcrrt5640" -] diff --git a/ucm/bytcr-rt5640-mono-spk-in1-mic/HiFi.conf b/ucm/bytcr-rt5640-mono-spk-in1-mic/HiFi.conf deleted file mode 100644 index d8ca499..0000000 --- a/ucm/bytcr-rt5640-mono-spk-in1-mic/HiFi.conf +++ /dev/null @@ -1,27 +0,0 @@ -# Use case Configuration for bytcr-rt5640 - - -SectionVerb { - EnableSequence [ - cdev "hw:bytcrrt5640" - - - - ] - - DisableSequence [ - cdev "hw:bytcrrt5640" - - ] - - Value { - PlaybackPCM "hw:bytcrrt5640" - CapturePCM "hw:bytcrrt5640" - } -} - - - - - - diff --git a/ucm/bytcr-rt5640-mono-spk-in1-mic/bytcr-rt5640-mono-spk-in1-mic.conf b/ucm/bytcr-rt5640-mono-spk-in1-mic/bytcr-rt5640-mono-spk-in1-mic.conf deleted file mode 100644 index cdac03a..0000000 --- a/ucm/bytcr-rt5640-mono-spk-in1-mic/bytcr-rt5640-mono-spk-in1-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcr-rt5640-mono-spk-in1-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytcrrt5640" -] diff --git a/ucm/bytcr-rt5640-mono-spk-in3-mic/HiFi.conf b/ucm/bytcr-rt5640-mono-spk-in3-mic/HiFi.conf deleted file mode 100644 index e4fb28d..0000000 --- a/ucm/bytcr-rt5640-mono-spk-in3-mic/HiFi.conf +++ /dev/null @@ -1,27 +0,0 @@ -# Use case Configuration for bytcr-rt5640 - - -SectionVerb { - EnableSequence [ - cdev "hw:bytcrrt5640" - - - - ] - - DisableSequence [ - cdev "hw:bytcrrt5640" - - ] - - Value { - PlaybackPCM "hw:bytcrrt5640" - CapturePCM "hw:bytcrrt5640" - } -} - - - - - - diff --git a/ucm/bytcr-rt5640-mono-spk-in3-mic/bytcr-rt5640-mono-spk-in3-mic.conf b/ucm/bytcr-rt5640-mono-spk-in3-mic/bytcr-rt5640-mono-spk-in3-mic.conf deleted file mode 100644 index 1580736..0000000 --- a/ucm/bytcr-rt5640-mono-spk-in3-mic/bytcr-rt5640-mono-spk-in3-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcr-rt5640-mono-spk-in3-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytcrrt5640" -] diff --git a/ucm/bytcr-rt5640-stereo-spk-dmic1-mic/HiFi.conf b/ucm/bytcr-rt5640-stereo-spk-dmic1-mic/HiFi.conf deleted file mode 100644 index bb31bf5..0000000 --- a/ucm/bytcr-rt5640-stereo-spk-dmic1-mic/HiFi.conf +++ /dev/null @@ -1,27 +0,0 @@ -# Use case Configuration for bytcr-rt5640 - - -SectionVerb { - EnableSequence [ - cdev "hw:bytcrrt5640" - - - - ] - - DisableSequence [ - cdev "hw:bytcrrt5640" - - ] - - Value { - PlaybackPCM "hw:bytcrrt5640" - CapturePCM "hw:bytcrrt5640" - } -} - - - - - - diff --git a/ucm/bytcr-rt5640-stereo-spk-dmic1-mic/bytcr-rt5640-stereo-spk-dmic1-mic.conf b/ucm/bytcr-rt5640-stereo-spk-dmic1-mic/bytcr-rt5640-stereo-spk-dmic1-mic.conf deleted file mode 100644 index a84bf84..0000000 --- a/ucm/bytcr-rt5640-stereo-spk-dmic1-mic/bytcr-rt5640-stereo-spk-dmic1-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcr-rt5640-stereo-spk-dmic1-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytcrrt5640" -] diff --git a/ucm/bytcr-rt5640-stereo-spk-in1-mic/HiFi.conf b/ucm/bytcr-rt5640-stereo-spk-in1-mic/HiFi.conf deleted file mode 100644 index 9474a64..0000000 --- a/ucm/bytcr-rt5640-stereo-spk-in1-mic/HiFi.conf +++ /dev/null @@ -1,27 +0,0 @@ -# Use case Configuration for bytcr-rt5640 - - -SectionVerb { - EnableSequence [ - cdev "hw:bytcrrt5640" - - - - ] - - DisableSequence [ - cdev "hw:bytcrrt5640" - - ] - - Value { - PlaybackPCM "hw:bytcrrt5640" - CapturePCM "hw:bytcrrt5640" - } -} - - - - - - diff --git a/ucm/bytcr-rt5640-stereo-spk-in1-mic/bytcr-rt5640-stereo-spk-in1-mic.conf b/ucm/bytcr-rt5640-stereo-spk-in1-mic/bytcr-rt5640-stereo-spk-in1-mic.conf deleted file mode 100644 index e8231c1..0000000 --- a/ucm/bytcr-rt5640-stereo-spk-in1-mic/bytcr-rt5640-stereo-spk-in1-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcr-rt5640-stereo-spk-in1-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytcrrt5640" -] diff --git a/ucm/bytcr-rt5640-stereo-spk-in3-mic/HiFi.conf b/ucm/bytcr-rt5640-stereo-spk-in3-mic/HiFi.conf deleted file mode 100644 index 478130e..0000000 --- a/ucm/bytcr-rt5640-stereo-spk-in3-mic/HiFi.conf +++ /dev/null @@ -1,27 +0,0 @@ -# Use case Configuration for bytcr-rt5640 - - -SectionVerb { - EnableSequence [ - cdev "hw:bytcrrt5640" - - - - ] - - DisableSequence [ - cdev "hw:bytcrrt5640" - - ] - - Value { - PlaybackPCM "hw:bytcrrt5640" - CapturePCM "hw:bytcrrt5640" - } -} - - - - - - diff --git a/ucm/bytcr-rt5640-stereo-spk-in3-mic/bytcr-rt5640-stereo-spk-in3-mic.conf b/ucm/bytcr-rt5640-stereo-spk-in3-mic/bytcr-rt5640-stereo-spk-in3-mic.conf deleted file mode 100644 index ba369dc..0000000 --- a/ucm/bytcr-rt5640-stereo-spk-in3-mic/bytcr-rt5640-stereo-spk-in3-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcr-rt5640-stereo-spk-in3-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytcrrt5640" -] diff --git a/ucm/bytcr-rt5640/HiFi.conf b/ucm/bytcr-rt5640/HiFi.conf deleted file mode 100644 index 54dd251..0000000 --- a/ucm/bytcr-rt5640/HiFi.conf +++ /dev/null @@ -1,30 +0,0 @@ -# Use case Configuration for bytcr-rt5640 - - -SectionVerb { - EnableSequence [ - cdev "hw:bytcrrt5640" - - - - ] - - DisableSequence [ - cdev "hw:bytcrrt5640" - - ] - - Value { - PlaybackPCM "hw:bytcrrt5640" - CapturePCM "hw:bytcrrt5640" - } -} - - - - - - - - - diff --git a/ucm2/bytcr-rt5640/HiFi-Components.conf b/ucm2/bytcr-rt5640/HiFi-Components.conf new file mode 100644 index 0000000..75f0c83 --- /dev/null +++ b/ucm2/bytcr-rt5640/HiFi-Components.conf @@ -0,0 +1,58 @@ +If.spk { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-spk:2" + } + True { + + } +} + +If.mono { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-spk:1" + } + True { + + } +} + + + +If.dmic1 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-mic:dmic1" + } + True { + + } +} + +If.in1 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-mic:in1" + } + True { + + } +} + +If.in3 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-mic:in3" + } + True { + + } +} + + diff --git a/ucm2/bytcr-rt5640/HiFi-LongName.conf b/ucm2/bytcr-rt5640/HiFi-LongName.conf new file mode 100644 index 0000000..e930f35 --- /dev/null +++ b/ucm2/bytcr-rt5640/HiFi-LongName.conf @@ -0,0 +1,58 @@ +If.spk { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-stereo-spk" + } + True { + + } +} + +If.mono { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-mono-spk" + } + True { + + } +} + + + +If.dmic1 { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-dmic1-mic" + } + True { + + } +} + +If.in1 { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-in1-mic" + } + True { + + } +} + +If.in3 { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-in3-mic" + } + True { + + } +} + + diff --git a/ucm2/bytcr-rt5640/HiFi.conf b/ucm2/bytcr-rt5640/HiFi.conf new file mode 100644 index 0000000..a616106 --- /dev/null +++ b/ucm2/bytcr-rt5640/HiFi.conf @@ -0,0 +1,32 @@ +# Use case Configuration for bytcr-rt5640 + + +SectionVerb { + EnableSequence [ + + + ] + + DisableSequence [ + + ] + + Value { + PlaybackPCM "hw:${CardId}" + CapturePCM "hw:${CardId}" + } +} + +If.0 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-spk:" + } + True { + + } + False { + + } +} diff --git a/ucm/bytcr-rt5640/bytcr-rt5640.conf b/ucm2/bytcr-rt5640/bytcr-rt5640.conf similarity index 65% rename from ucm/bytcr-rt5640/bytcr-rt5640.conf rename to ucm2/bytcr-rt5640/bytcr-rt5640.conf index 676b4fd..d7a0518 100644 --- a/ucm/bytcr-rt5640/bytcr-rt5640.conf +++ b/ucm2/bytcr-rt5640/bytcr-rt5640.conf @@ -1,8 +1,6 @@ +Syntax 2 + SectionUseCase."HiFi" { File "HiFi.conf" Comment "Play HiFi quality Music" } - -SectionDefaults [ - cdev "hw:bytcrrt5640" -] diff --git a/ucm/codecs/rt5640/DigitalMics.conf b/ucm2/codecs/rt5640/DigitalMics.conf similarity index 90% rename from ucm/codecs/rt5640/DigitalMics.conf rename to ucm2/codecs/rt5640/DigitalMics.conf index 06b42f1..36982c4 100644 --- a/ucm/codecs/rt5640/DigitalMics.conf +++ b/ucm2/codecs/rt5640/DigitalMics.conf @@ -8,8 +8,6 @@ SectionDevice."DigitalMics" { ] EnableSequence [ - cdev "hw:bytcrrt5640" - cset "name='Stereo ADC MIXL ADC2 Switch' on" cset "name='Stereo ADC MIXR ADC2 Switch' on" cset "name='Internal Mic Switch' on" @@ -17,8 +15,6 @@ SectionDevice."DigitalMics" { ] DisableSequence [ - cdev "hw:bytcrrt5640" - cset "name='Stereo ADC MIXL ADC2 Switch' off" cset "name='Stereo ADC MIXR ADC2 Switch' off" cset "name='Internal Mic Switch' off" diff --git a/ucm/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf similarity index 100% rename from ucm/codecs/rt5640/EnableSeq.conf rename to ucm2/codecs/rt5640/EnableSeq.conf diff --git a/ucm/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf similarity index 95% rename from ucm/codecs/rt5640/HeadPhones.conf rename to ucm2/codecs/rt5640/HeadPhones.conf index 38f37a6..e37442d 100644 --- a/ucm/codecs/rt5640/HeadPhones.conf +++ b/ucm2/codecs/rt5640/HeadPhones.conf @@ -7,8 +7,6 @@ SectionDevice."Headphones" { ] EnableSequence [ - cdev "hw:bytcrrt5640" - cset "name='DAC MIXL INF1 Switch' on" cset "name='DAC MIXR INF1 Switch' on" cset "name='Stereo DAC MIXL DAC L1 Switch' on" @@ -26,7 +24,6 @@ SectionDevice."Headphones" { ] DisableSequence [ - cdev "hw:bytcrrt5640" cset "name='Headphone Switch' off" cset "name='HP Channel Switch' off" cset "name='HP L Playback Switch' off" diff --git a/ucm/codecs/rt5640/HeadsetMic.conf b/ucm2/codecs/rt5640/HeadsetMic.conf similarity index 95% rename from ucm/codecs/rt5640/HeadsetMic.conf rename to ucm2/codecs/rt5640/HeadsetMic.conf index 567d412..a99b295 100644 --- a/ucm/codecs/rt5640/HeadsetMic.conf +++ b/ucm2/codecs/rt5640/HeadsetMic.conf @@ -8,8 +8,6 @@ SectionDevice."HeadsetMic" { ] EnableSequence [ - cdev "hw:bytcrrt5640" - cset "name='Headset Mic Switch' on" cset "name='RECMIXL BST2 Switch' on" @@ -25,8 +23,6 @@ SectionDevice."HeadsetMic" { ] DisableSequence [ - cdev "hw:bytcrrt5640" - cset "name='Stereo ADC MIXL ADC1 Switch' off" cset "name='Stereo ADC MIXR ADC1 Switch' off" diff --git a/ucm/codecs/rt5640/IN1-InternalMic.conf b/ucm2/codecs/rt5640/IN1-InternalMic.conf similarity index 95% rename from ucm/codecs/rt5640/IN1-InternalMic.conf rename to ucm2/codecs/rt5640/IN1-InternalMic.conf index 3bf31e6..95fc89e 100644 --- a/ucm/codecs/rt5640/IN1-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf @@ -8,8 +8,6 @@ SectionDevice."IN1-InternalMics" { ] EnableSequence [ - cdev "hw:bytcrrt5640" - cset "name='Internal Mic Switch' on" cset "name='RECMIXL BST1 Switch' on" @@ -27,8 +25,6 @@ SectionDevice."IN1-InternalMics" { ] DisableSequence [ - cdev "hw:bytcrrt5640" - cset "name='Stereo ADC MIXL ADC1 Switch' off" cset "name='Stereo ADC MIXR ADC1 Switch' off" diff --git a/ucm/codecs/rt5640/IN3-InternalMic.conf b/ucm2/codecs/rt5640/IN3-InternalMic.conf similarity index 95% rename from ucm/codecs/rt5640/IN3-InternalMic.conf rename to ucm2/codecs/rt5640/IN3-InternalMic.conf index e1a6c49..b8270e9 100644 --- a/ucm/codecs/rt5640/IN3-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf @@ -8,8 +8,6 @@ SectionDevice."IN3-InternalMics" { ] EnableSequence [ - cdev "hw:bytcrrt5640" - cset "name='Internal Mic Switch' on" cset "name='RECMIXL BST1 Switch' off" @@ -28,8 +26,6 @@ SectionDevice."IN3-InternalMics" { ] DisableSequence [ - cdev "hw:bytcrrt5640" - cset "name='Stereo ADC MIXL ADC1 Switch' off" cset "name='Stereo ADC MIXR ADC1 Switch' off" diff --git a/ucm/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf similarity index 96% rename from ucm/codecs/rt5640/MonoSpeaker.conf rename to ucm2/codecs/rt5640/MonoSpeaker.conf index 58ab780..ee4eff3 100644 --- a/ucm/codecs/rt5640/MonoSpeaker.conf +++ b/ucm2/codecs/rt5640/MonoSpeaker.conf @@ -7,8 +7,6 @@ SectionDevice."MonoSpeaker" { ] EnableSequence [ - cdev "hw:bytcrrt5640" - cset "name='DAC MIXL INF1 Switch' on" cset "name='DAC MIXR INF1 Switch' on" cset "name='Stereo DAC MIXL DAC L1 Switch' on" @@ -31,7 +29,6 @@ SectionDevice."MonoSpeaker" { ] DisableSequence [ - cdev "hw:bytcrrt5640" cset "name='Speaker Switch' off" cset "name='Speaker Channel Switch' off" cset "name='Speaker L Playback Switch' off" diff --git a/ucm/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf similarity index 96% rename from ucm/codecs/rt5640/Speaker.conf rename to ucm2/codecs/rt5640/Speaker.conf index a7df9fb..564a6b3 100644 --- a/ucm/codecs/rt5640/Speaker.conf +++ b/ucm2/codecs/rt5640/Speaker.conf @@ -7,8 +7,6 @@ SectionDevice."Speaker" { ] EnableSequence [ - cdev "hw:bytcrrt5640" - cset "name='DAC MIXL INF1 Switch' on" cset "name='DAC MIXR INF1 Switch' on" cset "name='Stereo DAC MIXL DAC L1 Switch' on" @@ -31,7 +29,6 @@ SectionDevice."Speaker" { ] DisableSequence [ - cdev "hw:bytcrrt5640" cset "name='Speaker Switch' off" cset "name='Speaker Channel Switch' off" cset "name='Speaker L Playback Switch' off"