# Use case configuration for Nothing Phone (1) # Author: Danila Tikhonov # Based on: # https://github.com/LineageOS/android_device_nothing_Spacewar/blob/lineage-22.1/configs/audio/mixer_paths_yupikqrd.xml SectionVerb { EnableSequence [ # Speaker & Earpiece playback cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1" # wcd9385 cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1" cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1" ] DisableSequence [ # Speaker & Earpiece playback cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0" cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0" cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 0" ] Value { TQ "HiFi" } } SectionDevice."Speakers" { Comment "Speaker & Earpiece playback" Value { PlaybackChannels 2 PlaybackPriority 100 PlaybackPCM "hw:${CardId},0" # MultiMedia1 PlaybackMixer "default:${CardId}" } } SectionDevice."Headphones" { Comment "Headphones Playback" Include.wcdhpe.File "/codecs/wcd938x/HeadphoneEnableSeq.conf" Include.wcdhpd.File "/codecs/wcd938x/HeadphoneDisableSeq.conf" Include.rxmhpe.File "/codecs/qcom-lpass/rx-macro/HeadphoneEnableSeq.conf" Include.rxmhpd.File "/codecs/qcom-lpass/rx-macro/HeadphoneDisableSeq.conf" Value { PlaybackPriority 200 PlaybackPCM "hw:${CardId},1" # MultiMedia2 PlaybackMixer "default:${CardId}" PlaybackMixerElem "HP Digital" JackControl "Headphone Jack" JackHWMute "Speaker" } } SectionDevice."Mic1" { Comment "Top Microphone" EnableSequence [ cset "name='TX DEC1 MUX' SWR_MIC" cset "name='TX SMIC MUX1' SWR_MIC0" cset "name='TX_AIF1_CAP Mixer DEC1' 1" cset "name='TX_DEC1 Volume' 100" // ? cset "name='ADC1_MIXER Switch' 1" cset "name='ADC1 Switch' 1" cset "name='TX0 MODE' ADC_NORMAL" // TX1_CH1? ] DisableSequence [ cset "name='TX SMIC MUX1' ZERO" cset "name='TX_AIF1_CAP Mixer DEC1' 0" cset "name='ADC1_MIXER Switch' 0" cset "name='ADC1 Switch' 0" cset "name='TX0 MODE' ADC_INVALID" // TX1_CH1? ] Value { CaptureChannels 1 CapturePriority 200 CapturePCM "hw:${CardId},2" # MultiMedia3 CaptureMixerElem "ADC1" } } SectionDevice."Mic2" { Comment "Headphone Microphone" EnableSequence [ cset "name='TX DEC0 MUX' SWR_MIC" cset "name='TX SMIC MUX0' SWR_MIC1" cset "name='TX_AIF2_CAP Mixer DEC0' 1" #cset "name='DEC0 MODE' ADC_DEFAULT" // ? cset "name='TX_DEC0 Volume' 110" // ? cset "name='ADC2_MIXER Switch' 1" cset "name='HDR12 MUX' NO_HDR12" cset "name='ADC2 MUX' INP2" cset "name='ADC2 Switch' 1" cset "name='TX1 MODE' ADC_NORMAL" // TX2_CH3? ] DisableSequence [ cset "name='TX SMIC MUX0' ZERO" cset "name='TX_AIF2_CAP Mixer DEC0' 0" cset "name='ADC2_MIXER Switch' 0" cset "name='ADC2 Switch' 0" cset "name='TX1 MODE' ADC_INVALID" // TX2_CH3? ] Value { CaptureChannels 1 CapturePriority 150 CapturePCM "hw:${CardId},2" # MultiMedia3 CaptureMixerElem "ADC2" } } SectionDevice."Mic4" { Comment "Bottom Microphone" EnableSequence [ cset "name='TX DEC1 MUX' SWR_MIC" cset "name='TX SMIC MUX1' SWR_MIC4" cset "name='TX_AIF1_CAP Mixer DEC1' 1" #cset "name='DEC0 MODE' ADC_DEFAULT" // ? cset "name='TX_DEC1 Volume' 110" // ? cset "name='ADC3_MIXER Switch' 1" cset "name='HDR34 MUX' NO_HDR34" cset "name='ADC3 MUX' INP5" cset "name='ADC3 Switch' 1" cset "name='TX3 MODE' ADC_NORMAL" // TX2_CH1? ] DisableSequence [ cset "name='TX SMIC MUX1' ZERO" cset "name='TX_AIF1_CAP Mixer DEC1' 0" cset "name='ADC3_MIXER Switch' 0" cset "name='ADC3 Switch' 0" cset "name='TX3 MODE' ADC_INVALID" // TX2_CH1? ] Value { CaptureChannels 1 CapturePriority 100 CapturePCM "hw:${CardId},2" # MultiMedia3 CaptureMixerElem "ADC4" } } SectionDevice."Mic5" { Comment "Back Microphone" EnableSequence [ cset "name='TX DEC1 MUX' SWR_MIC" cset "name='TX SMIC MUX1' SWR_MIC5" cset "name='TX_AIF1_CAP Mixer DEC1' 1" #cset "name='DEC1 MODE' ADC_DEFAULT" // ? cset "name='TX_DEC1 Volume' 110" // ? cset "name='ADC4_MIXER Switch' 1" cset "name='ADC4 MUX' INP5" cset "name='ADC4 Switch' 1" cset "name='TX2 MODE' ADC_NORMAL" // TX2_CH2? ] DisableSequence [ cset "name='TX SMIC MUX1' ZERO" cset "name='TX_AIF1_CAP Mixer DEC1' 0" cset "name='ADC4_MIXER Switch' 0" cset "name='ADC4 Switch' 0" cset "name='TX2 MODE' ADC_INVALID" // TX2_CH2? ] Value { CaptureChannels 1 CapturePriority 50 CapturePCM "hw:${CardId},2" # MultiMedia3 CaptureMixerElem "ADC4" } }