# Use case Configuration for ASUS Google Nexus 7 (2012)
-Define.HaveAif1 "yes"
-Define.HaveAif2 ""
-Define.HaveSpeaker "yes"
+Define.HaveAif "1"
+Define.HaveSpeaker "2"
Define.HaveHeadsetMic ""
-Define.HaveInternalMic "yes"
+Define.HaveInternalMic "dmic1"
Include.hp.File "/codecs/rt5640/HeadPhones.conf"
Include.mspk.File "/codecs/rt5640/Speaker.conf"
-Define.HaveSpeaker ""
-Define.HaveHeadsetMic ""
-Define.HaveInternalMic ""
-
If.spk {
Condition {
Type String
Haystack "${CardComponents}"
Needle "cfg-spk:2"
}
- True {
- Include.spk.File "/codecs/rt5640/Speaker.conf"
- Define.HaveSpeaker "yes"
-
- SectionDevice."Speaker" {
- EnableSequence [
- cset "name='Speaker Switch' on"
- ]
-
- DisableSequence [
- cset "name='Speaker Switch' off"
- ]
- }
- }
+ True.Define.HaveSpeaker "2"
}
If.mono {
Haystack "${CardComponents}"
Needle "cfg-spk:1"
}
- True {
- Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf"
- Define.HaveSpeaker "yes"
-
- SectionDevice."Speaker" {
- EnableSequence [
- cset "name='Speaker Switch' on"
- ]
-
- DisableSequence [
- cset "name='Speaker Switch' off"
- ]
- }
- }
-}
-
-If.hp {
- Condition { Type String Empty "" }
- True.Include.hs.File "/codecs/rt5640/HeadPhones.conf"
-
- SectionDevice."Headphones" {
- EnableSequence [
- cset "name='Headphone Switch' on"
- ]
-
- DisableSequence [
- cset "name='Headphone Switch' off"
- ]
- }
+ True.Define.HaveSpeaker "1"
}
If.dmic1 {
Haystack "${CardComponents}"
Needle "cfg-mic:dmic1"
}
- True {
- Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
- Define.HaveInternalMic "yes"
-
- SectionDevice."Mic" {
- EnableSequence [
- cset "name='Internal Mic Switch' on"
- ]
-
- DisableSequence [
- cset "name='Internal Mic Switch' off"
- ]
- }
- }
+ True.Define.HaveInternalMic "dmic1"
}
If.in1 {
Haystack "${CardComponents}"
Needle "cfg-mic:in1"
}
- True {
- Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf"
- Define.HaveInternalMic "yes"
-
- SectionDevice."Mic" {
- EnableSequence [
- cset "name='Internal Mic Switch' on"
- ]
-
- DisableSequence [
- cset "name='Internal Mic Switch' off"
- ]
- }
- }
+ True.Define.HaveInternalMic "in1"
}
If.in3 {
Haystack "${CardComponents}"
Needle "cfg-mic:in3"
}
- True {
- Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf"
- Define.HaveInternalMic "yes"
-
- SectionDevice."Mic" {
- EnableSequence [
- cset "name='Internal Mic Switch' on"
- ]
-
- DisableSequence [
- cset "name='Internal Mic Switch' off"
- ]
- }
- }
-}
-
-If.hsmic {
- Condition { Type String Empty "" }
- True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
- Define.HaveHeadsetMic "yes"
-
- SectionDevice."Headset" {
- EnableSequence [
- cset "name='Headset Mic Switch' on"
- ]
-
- DisableSequence [
- cset "name='Headset Mic Switch' off"
- ]
- }
+ True.Define.HaveInternalMic "in3"
}
-Define.HaveSpeaker ""
-Define.HaveHeadsetMic ""
-Define.HaveInternalMic ""
-
If.spk {
Condition {
Type String
Haystack "${CardLongName}"
Needle "-stereo-spk"
}
- True {
- Include.spk.File "/codecs/rt5640/Speaker.conf"
- Define.HaveSpeaker "yes"
-
- SectionDevice."Speaker" {
- EnableSequence [
- cset "name='Speaker Switch' on"
- ]
-
- DisableSequence [
- cset "name='Speaker Switch' off"
- ]
- }
- }
+ True.Define.HaveSpeaker "2"
}
If.mono {
Haystack "${CardLongName}"
Needle "-mono-spk"
}
- True {
- Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf"
- Define.HaveSpeaker "yes"
-
- SectionDevice."Speaker" {
- EnableSequence [
- cset "name='Speaker Switch' on"
- ]
-
- DisableSequence [
- cset "name='Speaker Switch' off"
- ]
- }
- }
-}
-
-If.hp {
- Condition { Type String Empty "" }
- True.Include.hs.File "/codecs/rt5640/HeadPhones.conf"
-
- SectionDevice."Headphones" {
- EnableSequence [
- cset "name='Headphone Switch' on"
- ]
-
- DisableSequence [
- cset "name='Headphone Switch' off"
- ]
- }
+ True.Define.HaveSpeaker "1"
}
If.dmic1 {
Haystack "${CardLongName}"
Needle "-dmic1-mic"
}
- True {
- Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
- Define.HaveInternalMic "yes"
-
- SectionDevice."Mic" {
- EnableSequence [
- cset "name='Internal Mic Switch' on"
- ]
-
- DisableSequence [
- cset "name='Internal Mic Switch' off"
- ]
- }
- }
+ True.Define.HaveInternalMic "dmic1"
}
If.in1 {
Haystack "${CardLongName}"
Needle "-in1-mic"
}
- True {
- Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf"
- Define.HaveInternalMic "yes"
-
- SectionDevice."Mic" {
- EnableSequence [
- cset "name='Internal Mic Switch' on"
- ]
-
- DisableSequence [
- cset "name='Internal Mic Switch' off"
- ]
- }
- }
+ True.Define.HaveInternalMic "in1"
}
If.in3 {
Haystack "${CardLongName}"
Needle "-in3-mic"
}
- True {
- Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf"
- Define.HaveInternalMic "yes"
-
- SectionDevice."Mic" {
- EnableSequence [
- cset "name='Internal Mic Switch' on"
- ]
-
- DisableSequence [
- cset "name='Internal Mic Switch' off"
- ]
- }
- }
-}
-
-If.hsmic {
- Condition { Type String Empty "" }
- True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
- Define.HaveHeadsetMic "yes"
-
- SectionDevice."Headset" {
- EnableSequence [
- cset "name='Headset Mic Switch' on"
- ]
-
- DisableSequence [
- cset "name='Headset Mic Switch' off"
- ]
- }
+ True.Define.HaveInternalMic "in3"
}
# Use case Configuration for bytcr-rt5640
-Define.HaveAif1 ""
-Define.HaveAif2 ""
+Define.HaveAif ""
+Define.HaveSpeaker ""
+Define.HaveInternalMic ""
+Define.HaveHeadsetMic "yes"
If.DefineAif1 {
Condition {
Haystack "${CardComponents}"
Needle "aif:1"
}
- True.Define.HaveAif1 "yes"
+ True.Define.HaveAif "1"
}
If.DefineAif2 {
Haystack "${CardComponents}"
Needle "aif:2"
}
- True.Define.HaveAif2 "yes"
+ True.Define.HaveAif "2"
+}
+
+If.0 {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-spk:"
+ }
+ True.Include.comp.File "/bytcr-rt5640/HiFi-Components.conf"
+ False.Include.long.File "/bytcr-rt5640/HiFi-LongName.conf"
}
SectionVerb {
}
}
-If.0 {
+If.spk {
Condition {
Type String
- Haystack "${CardComponents}"
- Needle "cfg-spk:"
+ Haystack "${var:HaveSpeaker}"
+ Needle "2"
+ }
+ True {
+ Include.spk.File "/codecs/rt5640/Speaker.conf"
+
+ SectionDevice."Speaker" {
+ EnableSequence [
+ cset "name='Speaker Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Speaker Switch' off"
+ ]
+ }
+ }
+}
+
+If.mono {
+ Condition {
+ Type String
+ Haystack "${var:HaveSpeaker}"
+ Needle "1"
+ }
+ True {
+ Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf"
+
+ SectionDevice."Speaker" {
+ EnableSequence [
+ cset "name='Speaker Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Speaker Switch' off"
+ ]
+ }
+ }
+}
+
+If.hp {
+ Condition { Type String Empty "" }
+ True.Include.hs.File "/codecs/rt5640/HeadPhones.conf"
+
+ SectionDevice."Headphones" {
+ EnableSequence [
+ cset "name='Headphone Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Headphone Switch' off"
+ ]
+ }
+}
+
+If.dmic1 {
+ Condition {
+ Type String
+ Haystack "${var:HaveInternalMic}"
+ Needle "dmic1"
+ }
+ True {
+ Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
+
+ SectionDevice."Mic" {
+ EnableSequence [
+ cset "name='Internal Mic Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Internal Mic Switch' off"
+ ]
+ }
+ }
+}
+
+If.in1 {
+ Condition {
+ Type String
+ Haystack "${var:HaveInternalMic}"
+ Needle "in1"
+ }
+ True {
+ Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf"
+
+ SectionDevice."Mic" {
+ EnableSequence [
+ cset "name='Internal Mic Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Internal Mic Switch' off"
+ ]
+ }
+ }
+}
+
+If.in3 {
+ Condition {
+ Type String
+ Haystack "${var:HaveInternalMic}"
+ Needle "in3"
+ }
+ True {
+ Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf"
+
+ SectionDevice."Mic" {
+ EnableSequence [
+ cset "name='Internal Mic Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Internal Mic Switch' off"
+ ]
+ }
+ }
+}
+
+If.hsmic {
+ Condition { Type String Empty "" }
+ True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
+
+ SectionDevice."Headset" {
+ EnableSequence [
+ cset "name='Headset Mic Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Headset Mic Switch' off"
+ ]
}
- True.Include.comp.File "/bytcr-rt5640/HiFi-Components.conf"
- False.Include.long.File "/bytcr-rt5640/HiFi-LongName.conf"
}
CapturePriority 100
CapturePCM "hw:${CardId}"
If.DmicAif1 {
- Condition { Type String Empty "${var:HaveAif1}" }
- False {
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "1"
+ }
+ True {
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
CaptureSwitch "ADC Capture Switch"
}
}
If.DmicAif2 {
- Condition { Type String Empty "${var:HaveAif2}" }
- False {
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "2"
+ }
+ True {
CaptureMixerElem "Mono ADC"
CaptureVolume "Mono ADC Capture Volume"
CaptureSwitch "Mono ADC Capture Switch"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
If.HpAif1 {
- Condition { Type String Empty "${var:HaveAif1}" }
- False {
- PlaybackMasterElem "DAC1"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "1"
}
+ True.PlaybackMasterElem "DAC1"
}
If.HpAif2 {
- Condition { Type String Empty "${var:HaveAif2}" }
- False {
- PlaybackMasterElem "DAC2"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "2"
}
+ True.PlaybackMasterElem "DAC2"
}
}
}
CaptureMixerElem "IN2 Boost"
CaptureVolume "IN2 Boost"
If.HSmicAif1 {
- Condition { Type String Empty "${var:HaveAif1}" }
- False {
- CaptureMasterElem "ADC"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "1"
}
+ True.CaptureMasterElem "ADC"
}
If.HSmicAif2 {
- Condition { Type String Empty "${var:HaveAif2}" }
- False {
- CaptureMasterElem "Mono ADC"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "2"
}
+ True.CaptureMasterElem "Mono ADC"
}
}
}
CaptureMixerElem "IN1 Boost"
CaptureVolume "IN1 Boost"
If.In1Aif1 {
- Condition { Type String Empty "${var:HaveAif1}" }
- False {
- CaptureMasterElem "ADC"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "1"
}
+ True.CaptureMasterElem "ADC"
}
If.In1Aif2 {
- Condition { Type String Empty "${var:HaveAif2}" }
- False {
- CaptureMasterElem "Mono ADC"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "2"
}
+ True.CaptureMasterElem "Mono ADC"
}
}
}
CaptureMixerElem "IN3 Boost"
CaptureVolume "IN3 Boost"
If.In3Aif1 {
- Condition { Type String Empty "${var:HaveAif1}" }
- False {
- CaptureMasterElem "ADC"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "1"
}
+ True.CaptureMasterElem "ADC"
}
If.In3Aif2 {
- Condition { Type String Empty "${var:HaveAif2}" }
- False {
- CaptureMasterElem "Mono ADC"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "2"
}
+ True.CaptureMasterElem "Mono ADC"
}
}
}
PlaybackMixerElem "Speaker"
PlaybackVolume "Speaker Playback Volume"
If.MonoSpkAif1 {
- Condition { Type String Empty "${var:HaveAif1}" }
- False {
- PlaybackMasterElem "DAC1"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "1"
}
+ True.PlaybackMasterElem "DAC1"
}
If.MonoSpkAif2 {
- Condition { Type String Empty "${var:HaveAif2}" }
- False {
- PlaybackMasterElem "DAC2"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "2"
}
+ True.PlaybackMasterElem "DAC2"
}
}
}
PlaybackMixerElem "Speaker"
PlaybackVolume "Speaker Playback Volume"
If.SpkAif1 {
- Condition { Type String Empty "${var:HaveAif1}" }
- False {
- PlaybackMasterElem "DAC1"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "1"
}
+ True.PlaybackMasterElem "DAC1"
}
If.SpkAif2 {
- Condition { Type String Empty "${var:HaveAif2}" }
- False {
- PlaybackMasterElem "DAC2"
+ Condition {
+ Type String
+ String1 "${var:HaveAif}"
+ String2 "2"
}
+ True.PlaybackMasterElem "DAC2"
}
}
}