+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-
-SectionVerb {
- EnableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5651/EnableSeq.conf>
- ]
-
- DisableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
-
- Value {
- PlaybackPCM "hw:bytcrrt5651"
- CapturePCM "hw:bytcrrt5651"
- }
-}
-
-<codecs/rt5651/MonoSpeaker.conf>
-<codecs/rt5651/HeadPhones.conf>
-
-<codecs/rt5651/IN1-InternalMic.conf>
-<codecs/rt5651/IN3-HeadsetMic.conf>
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-SectionUseCase."HiFi" {
- File "../bytcr-rt5651-mono-spk-in1-mic/HiFi.conf"
- Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
- cdev "hw:bytcrrt5651"
-]
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-
-SectionVerb {
- EnableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5651/EnableSeq.conf>
- ]
-
- DisableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
-
- Value {
- PlaybackPCM "hw:bytcrrt5651"
- CapturePCM "hw:bytcrrt5651"
- }
-}
-
-<codecs/rt5651/MonoSpeaker.conf>
-<codecs/rt5651/HeadPhones-swapped.conf>
-
-<codecs/rt5651/IN2-InternalMic.conf>
-<codecs/rt5651/IN3-HeadsetMic.conf>
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-SectionUseCase."HiFi" {
- File "../bytcr-rt5651-mono-spk-in2-mic-hp-swapped/HiFi.conf"
- Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
- cdev "hw:bytcrrt5651"
-]
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-
-SectionVerb {
- EnableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5651/EnableSeq.conf>
- ]
-
- DisableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
-
- Value {
- PlaybackPCM "hw:bytcrrt5651"
- CapturePCM "hw:bytcrrt5651"
- }
-}
-
-<codecs/rt5651/MonoSpeaker.conf>
-<codecs/rt5651/HeadPhones.conf>
-
-<codecs/rt5651/IN2-InternalMic.conf>
-<codecs/rt5651/IN3-HeadsetMic.conf>
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-SectionUseCase."HiFi" {
- File "../bytcr-rt5651-mono-spk-in2-mic/HiFi.conf"
- Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
- cdev "hw:bytcrrt5651"
-]
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-
-SectionVerb {
- EnableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5651/EnableSeq.conf>
- ]
-
- DisableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
-
- Value {
- PlaybackPCM "hw:bytcrrt5651"
- CapturePCM "hw:bytcrrt5651"
- }
-}
-
-<codecs/rt5651/Speaker.conf>
-<codecs/rt5651/HeadPhones.conf>
-
-<codecs/rt5651/DigitalMic.conf>
-<codecs/rt5651/IN2-HeadsetMic.conf>
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-SectionUseCase."HiFi" {
- File "../bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf"
- Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
- cdev "hw:bytcrrt5651"
-]
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-
-SectionVerb {
- EnableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5651/EnableSeq.conf>
- ]
-
- DisableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
-
- Value {
- PlaybackPCM "hw:bytcrrt5651"
- CapturePCM "hw:bytcrrt5651"
- }
-}
-
-<codecs/rt5651/Speaker.conf>
-<codecs/rt5651/HeadPhones.conf>
-
-<codecs/rt5651/IN1-InternalMic.conf>
-<codecs/rt5651/IN3-HeadsetMic.conf>
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-SectionUseCase."HiFi" {
- File "../bytcr-rt5651-stereo-spk-in1-mic/HiFi.conf"
- Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
- cdev "hw:bytcrrt5651"
-]
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-
-SectionVerb {
- EnableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5651/EnableSeq.conf>
- ]
-
- DisableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
-
- Value {
- PlaybackPCM "hw:bytcrrt5651"
- CapturePCM "hw:bytcrrt5651"
- }
-}
-
-<codecs/rt5651/Speaker.conf>
-<codecs/rt5651/HeadPhones.conf>
-
-<codecs/rt5651/IN12-InternalMic.conf>
-<codecs/rt5651/IN3-HeadsetMic.conf>
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-SectionUseCase."HiFi" {
- File "../bytcr-rt5651-stereo-spk-in12-mic/HiFi.conf"
- Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
- cdev "hw:bytcrrt5651"
-]
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-SectionUseCase."HiFi" {
- File "../bytcr-rt5651-stereo-spk-in2-mic/HiFi.conf"
- Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
- cdev "hw:bytcrrt5651"
-]
+++ /dev/null
-# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
-
-
-SectionVerb {
- EnableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5651/EnableSeq.conf>
- ]
-
- DisableSequence [
- cdev "hw:bytcrrt5651"
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
-
- Value {
- PlaybackPCM "hw:bytcrrt5651"
- CapturePCM "hw:bytcrrt5651"
- }
-}
-
-<codecs/rt5651/Speaker.conf>
-<codecs/rt5651/MonoSpeaker.conf>
-<codecs/rt5651/HeadPhones.conf>
-
-<codecs/rt5651/DigitalMic.conf>
-<codecs/rt5651/IN1-InternalMic.conf>
-<codecs/rt5651/IN2-InternalMic.conf>
-<codecs/rt5651/IN12-InternalMic.conf>
-<codecs/rt5651/IN2-HeadsetMic.conf>
-<codecs/rt5651/IN3-HeadsetMic.conf>
--- /dev/null
+If.spk {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-spk:2"
+ }
+ True {
+ <codecs/rt5651/Speaker.conf>
+ }
+}
+
+If.mono {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-spk:1"
+ }
+ True {
+ <codecs/rt5651/MonoSpeaker.conf>
+ }
+}
+
+If.headphones {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-hp:lrswap"
+ }
+ True {
+ <codecs/rt5651/HeadPhones-swapped.conf>
+ }
+ False {
+ <codecs/rt5651/HeadPhones.conf>
+ }
+}
+
+If.dmic1 {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-mic:dmic1"
+ }
+ True {
+ <codecs/rt5651/DigitalMic.conf>
+ }
+}
+
+If.in1 {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-mic:in1"
+ }
+ True {
+ <codecs/rt5651/IN1-InternalMic.conf>
+ }
+}
+
+If.in2 {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-mic:in2"
+ }
+ True {
+ <codecs/rt5651/IN2-InternalMic.conf>
+ }
+}
+
+If.in12 {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-mic:in12"
+ }
+ True {
+ <codecs/rt5651/IN12-InternalMic.conf>
+ }
+}
+
+<codecs/rt5651/IN3-HeadsetMic.conf>
--- /dev/null
+If.spk {
+ Condition {
+ Type String
+ Haystack "${CardLongName}"
+ Needle "-stereo-spk"
+ }
+ True {
+ <codecs/rt5651/Speaker.conf>
+ }
+}
+
+If.mono {
+ Condition {
+ Type String
+ Haystack "${CardLongName}"
+ Needle "-mono-spk"
+ }
+ True {
+ <codecs/rt5651/MonoSpeaker.conf>
+ }
+}
+
+If.headphones {
+ Condition {
+ Type String
+ Haystack "${CardLongName}"
+ Needle "-mic-hp-swapped"
+ }
+ True {
+ <codecs/rt5651/HeadPhones-swapped.conf>
+ }
+ False {
+ <codecs/rt5651/HeadPhones.conf>
+ }
+}
+
+If.dmic1 {
+ Condition {
+ Type String
+ Haystack "${CardLongName}"
+ Needle "-dmic1-mic"
+ }
+ True {
+ <codecs/rt5651/DigitalMic.conf>
+ }
+}
+
+If.in1 {
+ Condition {
+ Type String
+ Haystack "${CardLongName}"
+ Needle "-in1-mic"
+ }
+ True {
+ <codecs/rt5651/IN1-InternalMic.conf>
+ }
+}
+
+If.in2 {
+ Condition {
+ Type String
+ Haystack "${CardLongName}"
+ Needle "-in2-mic"
+ }
+ True {
+ <codecs/rt5651/IN2-InternalMic.conf>
+ }
+}
+
+If.in12 {
+ Condition {
+ Type String
+ Haystack "${CardLongName}"
+ Needle "-in12-mic"
+ }
+ True {
+ <codecs/rt5651/IN12-InternalMic.conf>
+ }
+}
+
+<codecs/rt5651/IN3-HeadsetMic.conf>
SectionVerb {
EnableSequence [
- cdev "hw:bytcrrt5651"
<platforms/bytcr/PlatformEnableSeq.conf>
<codecs/rt5651/EnableSeq.conf>
]
DisableSequence [
- cdev "hw:bytcrrt5651"
<platforms/bytcr/PlatformDisableSeq.conf>
]
Value {
- PlaybackPCM "hw:bytcrrt5651"
- CapturePCM "hw:bytcrrt5651"
+ PlaybackPCM "hw:${CardId}"
+ CapturePCM "hw:${CardId}"
}
}
-<codecs/rt5651/Speaker.conf>
-<codecs/rt5651/HeadPhones.conf>
-
-<codecs/rt5651/IN2-InternalMic.conf>
-<codecs/rt5651/IN3-HeadsetMic.conf>
+If.0 {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-spk:"
+ }
+ True {
+ <bytcr-rt5651/HiFi-Components.conf>
+ }
+ False {
+ <bytcr-rt5651/HiFi-LongName.conf>
+ }
+}
# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
+Syntax 2
+
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Play HiFi quality Music"
}
-
-SectionDefaults [
- cdev "hw:bytcrrt5651"
-]
]
EnableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Stereo1 ADC MIXL ADC2 Switch' on"
cset "name='Stereo1 ADC MIXR ADC2 Switch' on"
cset "name='Internal Mic Switch' on"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Stereo1 ADC MIXL ADC2 Switch' off"
cset "name='Stereo1 ADC MIXR ADC2 Switch' off"
cset "name='Internal Mic Switch' off"
]
EnableSequence [
- cdev "hw:bytcrrt5651"
-
# Swap left and right
cset "name='Stereo DAC MIXL DAC R1 Switch' on"
cset "name='Stereo DAC MIXL DAC L1 Switch' off"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
# Disabling the HP switches is done by the Speaker EnableSeq
# Unswap left and right
]
EnableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Headphone Switch' on"
cset "name='HPO L Playback Switch' on"
cset "name='HPO R Playback Switch' on"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
# This is done by the Speaker EnableSequence, so that the
# Platform Clock and BIAS do not temporarily get turned off
# as that breaks audio-streams which are playing when
]
EnableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Internal Mic Switch' on"
cset "name='RECMIXL BST1 Switch' on"
cset "name='RECMIXR BST1 Switch' on"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Stereo1 ADC MIXL ADC1 Switch' off"
cset "name='Stereo1 ADC MIXR ADC1 Switch' off"
cset "name='Internal Mic Switch' off"
]
EnableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Internal Mic Switch' on"
cset "name='RECMIXL BST1 Switch' on"
cset "name='RECMIXR BST1 Switch' on"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Stereo1 ADC MIXL ADC1 Switch' off"
cset "name='Stereo1 ADC MIXR ADC1 Switch' off"
cset "name='Internal Mic Switch' off"
]
EnableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Headset Mic Switch' on"
cset "name='RECMIXL BST2 Switch' on"
cset "name='RECMIXR BST2 Switch' on"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Stereo1 ADC MIXL ADC1 Switch' off"
cset "name='Stereo1 ADC MIXR ADC1 Switch' off"
cset "name='Headset Mic Switch' off"
]
EnableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Internal Mic Switch' on"
cset "name='RECMIXL BST2 Switch' on"
cset "name='RECMIXR BST2 Switch' on"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Stereo1 ADC MIXL ADC1 Switch' off"
cset "name='Stereo1 ADC MIXR ADC1 Switch' off"
cset "name='Internal Mic Switch' off"
]
EnableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Headset Mic Switch' on"
cset "name='RECMIXL BST3 Switch' on"
cset "name='RECMIXR BST3 Switch' on"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Stereo1 ADC MIXL ADC1 Switch' off"
cset "name='Stereo1 ADC MIXR ADC1 Switch' off"
cset "name='Headset Mic Switch' off"
]
EnableSequence [
- cdev "hw:bytcrrt5651"
-
# On most (all?) devices with a single / mono speaker an
# amplifier with a differential input connected between LOUT
# right and left is used. We deal with this by silencing the
]
DisableSequence [
- cdev "hw:bytcrrt5651"
# Disabling the switches is done by the Speaker EnableSeq
# Undo mono mapping
]
EnableSequence [
- cdev "hw:bytcrrt5651"
cset "name='Speaker Switch' on"
cset "name='LOUT L Playback Switch' on"
cset "name='LOUT R Playback Switch' on"
]
DisableSequence [
- cdev "hw:bytcrrt5651"
# This is done by the Headphones EnableSequence, so that the
# Platform Clock and BIAS do not temporarily get turned off
# as that breaks audio-streams which are playing when