pmaports/device/testing/device-xiaomi-vince/ucm2/msm8953-snd-car/HiFi.conf
Gianluca Boiano 9f334cb0a3
xiaomi-vince: move audio resources under alsa subpkg (MR 2716)
[ci:skip-build] already built successfully in CI
2021-12-10 11:11:53 -08:00

171 lines
4 KiB
Text

# Use case configuration for Xiaomi Redmi Note 5 / Plus
# All analog outputs/inputs connected to internal PM8953 codec,
Define {
WcdPlaybackPCM "hw:${CardId}"
WcdCapturePCM "hw:${CardId}"
}
SectionVerb {
EnableSequence[
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence[
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
TQ "HiFi"
PlaybackPCM "${var:WcdPlaybackPCM}"
CapturePCM "${var:WcdCapturePCM}"
}
}
SectionDevice."Headphones" {
Comment "Headphones playback"
EnableSequence[
cdev "${var:WcdPlaybackPCM}"
cset "name='MI2S_RX Channels' Two"
cset "name='RX1 MIX1 INP1' RX1"
cset "name='RX2 MIX1 INP1' RX2"
cset "name='RX HPH Mode' HD2"
cset "name='RDAC2 MUX' RX2"
cset "name='HPHL' Switch"
cset "name='HPHR' Switch"
# cset "name='Ext Spk Switch' On"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
]
DisableSequence[
cdev "${var:WcdPlaybackPCM}"
cset "name='MI2S_RX Channels' One"
cset "name='RX1 MIX1 INP1' ZERO"
cset "name='RX2 MIX1 INP1' ZERO"
cset "name='RX HPH Mode' NORMAL"
cset "name='RDAC2 MUX' ZERO"
cset "name='HPHL' ZERO"
cset "name='HPHR' ZERO"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
]
Value {
PlaybackPCM "${var:WcdPlaybackPCM}"
PlaybackChannels 2
PlaybackPriority 100
JackControl "Headphone Jack"
}
}
SectionDevice."Handset" {
Comment "Handset earpiece"
ConflictingDevice[
"Headphones"
]
EnableSequence[
cdev "${var:WcdPlaybackPCM}"
cset "name='RX1 MIX1 INP1' RX1"
cset "name='RDAC2 MUX' RX1"
cset "name='RX1 Digital Volume' 88"
cset "name='EAR PA Gain' POS_6_DB"
cset "name='EAR_S' Switch"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
]
DisableSequence[
cdev "${var:WcdPlaybackPCM}"
cset "name='RX1 MIX1 INP1' ZERO"
cset "name='RDAC2 MUX' ZERO"
## cset "name='RX1 Digital Volume' 84"
cset "name='EAR PA Gain' POS_6_DB"
cset "name='EAR_S' ZERO"
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
]
Value {
PlaybackPCM "${var:WcdPlaybackPCM}"
PlaybackChannels 2
PlaybackPriority 100
}
}
SectionDevice."HandsetMic" {
Comment "Handset microphone"
ConflictingDevice[
"SpeakerMic"
"HeadsetMic"
]
EnableSequence[
cdev "${var:WcdCapturePCM}"
cset "name='ADC1 Volume' 6"
cset "name='DEC1 MUX' ADC1"
cset "name='ADC1_INP1 Switch' 1"
cset "name='IIR1 INP1 MUX' DEC1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence[
cdev "${var:WcdCapturePCM}"
cset "name='ADC1 Volume' 4"
cset "name='DEC1 MUX' ZERO"
cset "name='ADC1_INP1 Switch' 0"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
CapturePCM "${var:WcdCapturePCM}"
CaptureChannels 2
CapturePriority 300
}
}
SectionDevice."SpeakerMic" {
Comment "Handset microphone for speaker-mode"
ConflictingDevice[
"Handset"
"HandsetMic"
"HeadsetMic"
]
EnableSequence[
cdev "${var:WcdCapturePCM}"
cset "name='ADC1 Volume' 6"
cset "name='DEC1 MUX' ADC1"
cset "name='ADC1_INP1 Switch' 1"
cset "name='IIR1 INP1 MUX' DEC1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence[
cdev "${var:WcdCapturePCM}"
cset "name='ADC1 Volume' 4"
cset "name='DEC1 MUX' ZERO"
cset "name='ADC1_INP1 Switch' 0"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
CapturePCM "${var:WcdCapturePCM}"
CaptureChannels "2"
}
}
SectionDevice."HeadsetMic" {
Comment "Headset microphone"
ConflictingDevice[
"HandsetMic"
"SpeakerMic"
]
EnableSequence[
cdev "${var:WcdCapturePCM}"
cset "name='ADC2 Volume' 6"
cset "name='DEC1 MUX' ADC2"
cset "name='ADC2 MUX' INP2"
cset "name='IIR1 INP1 MUX' DEC1"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 1"
]
DisableSequence[
cdev "${var:WcdCapturePCM}"
cset "name='ADC2 Volume' 4"
cset "name='DEC1 MUX' ZERO"
cset "name='ADC2 MUX' ZERO"
cset "name='MultiMedia1 Mixer TERT_MI2S_TX' 0"
]
Value {
CapturePCM "${var:WcdCapturePCM}"
CaptureChannels 2
CapturePriority 100
JackControl "Headset Mic Jack"
}
}