diff options
author | Jaroslav Kysela <perex@perex.cz> | 2019-11-20 19:32:56 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2019-11-21 14:57:59 +0100 |
commit | cbd201a9617b45ed77bb2bc35dda71724150cac5 (patch) | |
tree | 26248bcfc270d5ee44e198eed939ea732c971bb6 | |
parent | faf69ec816a412da2e62d1bda00bb14ffb321495 (diff) |
bytcht-es8316: adapt to ucm2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
21 files changed, 121 insertions, 169 deletions
diff --git a/ucm/bytcht-es8316-mono-spk-in1-mic/HiFi.conf b/ucm/bytcht-es8316-mono-spk-in1-mic/HiFi.conf deleted file mode 100644 index 9789949..0000000 --- a/ucm/bytcht-es8316-mono-spk-in1-mic/HiFi.conf +++ /dev/null @@ -1,23 +0,0 @@ -SectionVerb { - EnableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformEnableSeq.conf> - <codecs/es8316/EnableSeq.conf> - ] - - DisableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformDisableSeq.conf> - ] - - Value { - PlaybackPCM "hw:bytchtes8316" - CapturePCM "hw:bytchtes8316" - } -} - -<codecs/es8316/MonoSpeaker.conf> -<codecs/es8316/HeadPhones.conf> - -<codecs/es8316/IN1-InternalMic.conf> -<codecs/es8316/IN2-HeadsetMic.conf> diff --git a/ucm/bytcht-es8316-mono-spk-in1-mic/bytcht-es8316-mono-spk-in1-mic.conf b/ucm/bytcht-es8316-mono-spk-in1-mic/bytcht-es8316-mono-spk-in1-mic.conf deleted file mode 100644 index 26d82ea..0000000 --- a/ucm/bytcht-es8316-mono-spk-in1-mic/bytcht-es8316-mono-spk-in1-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcht-es8316-mono-spk-in1-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytchtes8316" -] diff --git a/ucm/bytcht-es8316-mono-spk-in2-mic/HiFi.conf b/ucm/bytcht-es8316-mono-spk-in2-mic/HiFi.conf deleted file mode 100644 index 2821eb5..0000000 --- a/ucm/bytcht-es8316-mono-spk-in2-mic/HiFi.conf +++ /dev/null @@ -1,23 +0,0 @@ -SectionVerb { - EnableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformEnableSeq.conf> - <codecs/es8316/EnableSeq.conf> - ] - - DisableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformDisableSeq.conf> - ] - - Value { - PlaybackPCM "hw:bytchtes8316" - CapturePCM "hw:bytchtes8316" - } -} - -<codecs/es8316/MonoSpeaker.conf> -<codecs/es8316/HeadPhones.conf> - -<codecs/es8316/IN1-HeadsetMic.conf> -<codecs/es8316/IN2-InternalMic.conf> diff --git a/ucm/bytcht-es8316-mono-spk-in2-mic/bytcht-es8316-mono-spk-in2-mic.conf b/ucm/bytcht-es8316-mono-spk-in2-mic/bytcht-es8316-mono-spk-in2-mic.conf deleted file mode 100644 index b9885c2..0000000 --- a/ucm/bytcht-es8316-mono-spk-in2-mic/bytcht-es8316-mono-spk-in2-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcht-es8316-mono-spk-in2-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytchtes8316" -] diff --git a/ucm/bytcht-es8316-stereo-spk-in1-mic/HiFi.conf b/ucm/bytcht-es8316-stereo-spk-in1-mic/HiFi.conf deleted file mode 100644 index 9f1801c..0000000 --- a/ucm/bytcht-es8316-stereo-spk-in1-mic/HiFi.conf +++ /dev/null @@ -1,23 +0,0 @@ -SectionVerb { - EnableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformEnableSeq.conf> - <codecs/es8316/EnableSeq.conf> - ] - - DisableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformDisableSeq.conf> - ] - - Value { - PlaybackPCM "hw:bytchtes8316" - CapturePCM "hw:bytchtes8316" - } -} - -<codecs/es8316/Speaker.conf> -<codecs/es8316/HeadPhones.conf> - -<codecs/es8316/IN1-InternalMic.conf> -<codecs/es8316/IN2-HeadsetMic.conf> diff --git a/ucm/bytcht-es8316-stereo-spk-in1-mic/bytcht-es8316-stereo-spk-in1-mic.conf b/ucm/bytcht-es8316-stereo-spk-in1-mic/bytcht-es8316-stereo-spk-in1-mic.conf deleted file mode 100644 index 9bd3266..0000000 --- a/ucm/bytcht-es8316-stereo-spk-in1-mic/bytcht-es8316-stereo-spk-in1-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcht-es8316-stereo-spk-in1-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytchtes8316" -] diff --git a/ucm/bytcht-es8316-stereo-spk-in2-mic/HiFi.conf b/ucm/bytcht-es8316-stereo-spk-in2-mic/HiFi.conf deleted file mode 100644 index 00d4b7f..0000000 --- a/ucm/bytcht-es8316-stereo-spk-in2-mic/HiFi.conf +++ /dev/null @@ -1,23 +0,0 @@ -SectionVerb { - EnableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformEnableSeq.conf> - <codecs/es8316/EnableSeq.conf> - ] - - DisableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformDisableSeq.conf> - ] - - Value { - PlaybackPCM "hw:bytchtes8316" - CapturePCM "hw:bytchtes8316" - } -} - -<codecs/es8316/Speaker.conf> -<codecs/es8316/HeadPhones.conf> - -<codecs/es8316/IN1-HeadsetMic.conf> -<codecs/es8316/IN2-InternalMic.conf> diff --git a/ucm/bytcht-es8316-stereo-spk-in2-mic/bytcht-es8316-stereo-spk-in2-mic.conf b/ucm/bytcht-es8316-stereo-spk-in2-mic/bytcht-es8316-stereo-spk-in2-mic.conf deleted file mode 100644 index a94f0f7..0000000 --- a/ucm/bytcht-es8316-stereo-spk-in2-mic/bytcht-es8316-stereo-spk-in2-mic.conf +++ /dev/null @@ -1,8 +0,0 @@ -SectionUseCase."HiFi" { - File "../bytcht-es8316-stereo-spk-in2-mic/HiFi.conf" - Comment "Play HiFi quality Music" -} - -SectionDefaults [ - cdev "hw:bytchtes8316" -] diff --git a/ucm/bytcht-es8316/HiFi.conf b/ucm/bytcht-es8316/HiFi.conf deleted file mode 100644 index 7af3daa..0000000 --- a/ucm/bytcht-es8316/HiFi.conf +++ /dev/null @@ -1,26 +0,0 @@ -SectionVerb { - EnableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformEnableSeq.conf> - <codecs/es8316/EnableSeq.conf> - ] - - DisableSequence [ - cdev "hw:bytchtes8316" - <platforms/bytcr/PlatformDisableSeq.conf> - ] - - Value { - PlaybackPCM "hw:bytchtes8316" - CapturePCM "hw:bytchtes8316" - } -} - -<codecs/es8316/Speaker.conf> -<codecs/es8316/MonoSpeaker.conf> -<codecs/es8316/HeadPhones.conf> - -<codecs/es8316/IN1-InternalMic.conf> -<codecs/es8316/IN2-InternalMic.conf> -<codecs/es8316/IN1-HeadsetMic.conf> -<codecs/es8316/IN2-HeadsetMic.conf> diff --git a/ucm2/bytcht-es8316/HiFi-Components.conf b/ucm2/bytcht-es8316/HiFi-Components.conf new file mode 100644 index 0000000..314d355 --- /dev/null +++ b/ucm2/bytcht-es8316/HiFi-Components.conf @@ -0,0 +1,45 @@ +If.spk { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-spk:2" + } + True { + <codecs/es8316/Speaker.conf> + } +} + +If.mono { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-spk:1" + } + True { + <codecs/es8316/MonoSpeaker.conf> + } +} + +If.in1 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-mic:in1" + } + True { + <codecs/es8316/IN1-InternalMic.conf> + <codecs/es8316/IN2-HeadsetMic.conf> + } +} + +If.in2 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-mic:in2" + } + True { + <codecs/es8316/IN1-HeadsetMic.conf> + <codecs/es8316/IN2-InternalMic.conf> + } +} diff --git a/ucm2/bytcht-es8316/HiFi-LongName.conf b/ucm2/bytcht-es8316/HiFi-LongName.conf new file mode 100644 index 0000000..ea7d1c3 --- /dev/null +++ b/ucm2/bytcht-es8316/HiFi-LongName.conf @@ -0,0 +1,45 @@ +If.spk { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-stereo-spk" + } + True { + <codecs/es8316/Speaker.conf> + } +} + +If.mono { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-mono-spk" + } + True { + <codecs/es8316/MonoSpeaker.conf> + } +} + +If.in1 { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-in1-mic" + } + True { + <codecs/es8316/IN1-InternalMic.conf> + <codecs/es8316/IN2-HeadsetMic.conf> + } +} + +If.in2 { + Condition { + Type String + Haystack "${CardLongName}" + Needle "-in2-mic" + } + True { + <codecs/es8316/IN1-HeadsetMic.conf> + <codecs/es8316/IN2-InternalMic.conf> + } +} diff --git a/ucm2/bytcht-es8316/HiFi.conf b/ucm2/bytcht-es8316/HiFi.conf new file mode 100644 index 0000000..768f010 --- /dev/null +++ b/ucm2/bytcht-es8316/HiFi.conf @@ -0,0 +1,29 @@ +SectionVerb { + EnableSequence [ + <platforms/bytcr/PlatformEnableSeq.conf> + <codecs/es8316/EnableSeq.conf> + ] + + DisableSequence [ + <platforms/bytcr/PlatformDisableSeq.conf> + ] + + Value { + PlaybackPCM "hw:${CardId}" + CapturePCM "hw:${CardId}" + } +} + +If.0 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "cfg-spk:" + } + True { + <bytcht-es8316/HiFi-Components.conf> + } + False { + <bytcht-es8316/HiFi-LongName.conf> + } +} diff --git a/ucm/bytcht-es8316/bytcht-es8316.conf b/ucm2/bytcht-es8316/bytcht-es8316.conf index e77e297..d7a0518 100644 --- a/ucm/bytcht-es8316/bytcht-es8316.conf +++ b/ucm2/bytcht-es8316/bytcht-es8316.conf @@ -1,8 +1,6 @@ +Syntax 2 + SectionUseCase."HiFi" { File "HiFi.conf" Comment "Play HiFi quality Music" } - -SectionDefaults [ - cdev "hw:bytchtes8316" -] diff --git a/ucm/codecs/es8316/EnableSeq.conf b/ucm2/codecs/es8316/EnableSeq.conf index 551b79b..551b79b 100644 --- a/ucm/codecs/es8316/EnableSeq.conf +++ b/ucm2/codecs/es8316/EnableSeq.conf diff --git a/ucm/codecs/es8316/HeadPhones.conf b/ucm2/codecs/es8316/HeadPhones.conf index ff13ef1..3f3e591 100644 --- a/ucm/codecs/es8316/HeadPhones.conf +++ b/ucm2/codecs/es8316/HeadPhones.conf @@ -7,12 +7,10 @@ SectionDevice."Headphones" { ] EnableSequence [ - cdev "hw:bytchtes8316" cset "name='Headphone Switch' on" ] DisableSequence [ - cdev "hw:bytchtes8316" cset "name='Headphone Switch' off" ] diff --git a/ucm/codecs/es8316/IN1-HeadsetMic.conf b/ucm2/codecs/es8316/IN1-HeadsetMic.conf index 0501646..997a50b 100644 --- a/ucm/codecs/es8316/IN1-HeadsetMic.conf +++ b/ucm2/codecs/es8316/IN1-HeadsetMic.conf @@ -8,13 +8,11 @@ SectionDevice."HeadsetMic-IN1" { ] EnableSequence [ - cdev "hw:bytchtes8316" cset "name='Differential Mux' lin1-rin1" cset "name='Headset Mic Switch' on" ] DisableSequence [ - cdev "hw:bytchtes8316" cset "name='Headset Mic Switch' off" ] diff --git a/ucm/codecs/es8316/IN1-InternalMic.conf b/ucm2/codecs/es8316/IN1-InternalMic.conf index 5386fda..70a77b9 100644 --- a/ucm/codecs/es8316/IN1-InternalMic.conf +++ b/ucm2/codecs/es8316/IN1-InternalMic.conf @@ -8,13 +8,11 @@ SectionDevice."InternalMic-IN1" { ] EnableSequence [ - cdev "hw:bytchtes8316" cset "name='Differential Mux' lin1-rin1" cset "name='Internal Mic Switch' on" ] DisableSequence [ - cdev "hw:bytchtes8316" cset "name='Internal Mic Switch' off" ] diff --git a/ucm/codecs/es8316/IN2-HeadsetMic.conf b/ucm2/codecs/es8316/IN2-HeadsetMic.conf index 229e7e7..1ab1221 100644 --- a/ucm/codecs/es8316/IN2-HeadsetMic.conf +++ b/ucm2/codecs/es8316/IN2-HeadsetMic.conf @@ -8,13 +8,11 @@ SectionDevice."HeadsetMic-IN2" { ] EnableSequence [ - cdev "hw:bytchtes8316" cset "name='Differential Mux' lin2-rin2" cset "name='Headset Mic Switch' on" ] DisableSequence [ - cdev "hw:bytchtes8316" cset "name='Headset Mic Switch' off" ] diff --git a/ucm/codecs/es8316/IN2-InternalMic.conf b/ucm2/codecs/es8316/IN2-InternalMic.conf index 59892fd..7809f8a 100644 --- a/ucm/codecs/es8316/IN2-InternalMic.conf +++ b/ucm2/codecs/es8316/IN2-InternalMic.conf @@ -8,13 +8,11 @@ SectionDevice."InternalMic-IN2" { ] EnableSequence [ - cdev "hw:bytchtes8316" cset "name='Differential Mux' lin2-rin2" cset "name='Internal Mic Switch' on" ] DisableSequence [ - cdev "hw:bytchtes8316" cset "name='Internal Mic Switch' off" ] diff --git a/ucm/codecs/es8316/MonoSpeaker.conf b/ucm2/codecs/es8316/MonoSpeaker.conf index b1a95a5..704556a 100644 --- a/ucm/codecs/es8316/MonoSpeaker.conf +++ b/ucm2/codecs/es8316/MonoSpeaker.conf @@ -7,8 +7,6 @@ SectionDevice."MonoSpeaker" { ] EnableSequence [ - cdev "hw:bytchtes8316" - # BYT/CHT devices with an ES8316 codec use a single speaker # connected between the headhpone LOUT and ROUT pins, expecting # the output to be in a mono differential mode. Presumably this @@ -27,7 +25,6 @@ SectionDevice."MonoSpeaker" { ] DisableSequence [ - cdev "hw:bytchtes8316" cset "name='Speaker Switch' off" # DAC settings back to normal for stereo headphones output cset "name='Playback Polarity' 0" diff --git a/ucm/codecs/es8316/Speaker.conf b/ucm2/codecs/es8316/Speaker.conf index f0894c7..0e77746 100644 --- a/ucm/codecs/es8316/Speaker.conf +++ b/ucm2/codecs/es8316/Speaker.conf @@ -7,12 +7,10 @@ SectionDevice."Speaker" { ] EnableSequence [ - cdev "hw:bytchtes8316" cset "name='Speaker Switch' on" ] DisableSequence [ - cdev "hw:bytchtes8316" cset "name='Speaker Switch' off" ] |