avs: implement ucm auto switching

pull/2/head
WeirdTreeThing 2023-08-02 21:08:31 -04:00
parent 1310342997
commit 075b9d36e4
No known key found for this signature in database
GPG Key ID: 1F56A4B52998B851
9 changed files with 24 additions and 9 deletions

View File

@ -30,10 +30,10 @@ SectionVerb {
SectionDevice."Headphone" { SectionDevice."Headphone" {
Comment "Headphone" Comment "Headphone"
Value { Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "Headphone" PlaybackMixerElem "Headphone"
JackDev "avs_da7219 Headset Jack" JackControl "Headset Jack"
JackSwitch "2"
} }
EnableSequence [ EnableSequence [
cset "name='Headphone Jack Switch' on" cset "name='Headphone Jack Switch' on"
@ -48,9 +48,10 @@ SectionDevice."Headphone" {
SectionDevice."Mic" { SectionDevice."Mic" {
Comment "Mic" Comment "Mic"
Value { Value {
CapturePriority 200
CapturePCM "hw:${CardId},1" CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic" CaptureMixerElem "Headset Mic"
JackDev "avs_da7219 Headset Jack" JackControl "Headset Jack"
} }
EnableSequence [ EnableSequence [

View File

@ -19,6 +19,7 @@ If.4ch {
Comment "Internal Microphone" Comment "Internal Microphone"
Value { Value {
CapturePriority 100
CapturePCM "hw:${CardId},2" CapturePCM "hw:${CardId},2"
CaptureChannels 4 CaptureChannels 4
} }
@ -40,6 +41,7 @@ If.4ch {
Comment "Internal Microphone" Comment "Internal Microphone"
Value { Value {
CapturePriority 100
CapturePCM "hw:${CardId},2" CapturePCM "hw:${CardId},2"
CaptureChannels 2 CaptureChannels 2
} }

View File

@ -11,6 +11,7 @@ SectionVerb {
SectionDevice."Speaker" { SectionDevice."Speaker" {
Comment "Speaker" Comment "Speaker"
Value { Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},1"
DspName "speaker_eq" DspName "speaker_eq"
} }

View File

@ -80,6 +80,7 @@ SectionDevice."Speaker" {
Comment "Speaker" Comment "Speaker"
Value { Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},1"
DspName "speaker_eq" DspName "speaker_eq"
} }

View File

@ -20,6 +20,7 @@ SectionDevice."Speaker" {
Comment "Speaker" Comment "Speaker"
Value { Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},1"
DspName "speaker_eq" DspName "speaker_eq"
} }

View File

@ -17,10 +17,10 @@ SectionVerb {
SectionDevice."Headphone" { SectionDevice."Headphone" {
Comment "Headphone" Comment "Headphone"
Value { Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "Headphone" PlaybackMixerElem "Headphone"
JackDev "avs_nau8825 Headset Jack" JackControl "Headset Jack"
JackSwitch "2"
} }
EnableSequence [ EnableSequence [
cset "name='Headphone Jack Switch' on" cset "name='Headphone Jack Switch' on"
@ -33,9 +33,10 @@ SectionDevice."Headphone" {
SectionDevice."Mic" { SectionDevice."Mic" {
Comment "Mic" Comment "Mic"
Value { Value {
CapturePriority 200
CapturePCM "hw:${CardId},1" CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic" CaptureMixerElem "Headset Mic"
JackDev "avs_nau8825 Headset Jack" JackControl "Headset Jack"
} }
EnableSequence [ EnableSequence [

View File

@ -25,8 +25,10 @@ SectionDevice."Headphones" {
Comment "Headphones" Comment "Headphones"
Value { Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "Headphone" PlaybackMixerElem "Headphone"
JackControl "Headset Jack"
} }
EnableSequence [ EnableSequence [
cset "name='Headphone Jack Switch' on" cset "name='Headphone Jack Switch' on"
@ -40,8 +42,10 @@ SectionDevice."Headset" {
Comment "Headset Microphone" Comment "Headset Microphone"
Value { Value {
CapturePriority 200
CapturePCM "hw:${CardId},1" CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic" CaptureMixerElem "Headset Mic"
JackControl "Headset Jack"
} }
EnableSequence [ EnableSequence [

View File

@ -18,6 +18,7 @@ SectionVerb {
SectionDevice."Speaker" { SectionDevice."Speaker" {
Comment "Speaker" Comment "Speaker"
Value { Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},1"
DspName "speaker_eq" DspName "speaker_eq"
} }

View File

@ -11,8 +11,9 @@ SectionVerb {
SectionDevice."HDMI1".0 { SectionDevice."HDMI1".0 {
Comment "HDMI1" Comment "HDMI1"
Value { Value {
PlaybackPriority 300
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},1"
JackDev "hdaudioB0D2 HDMI/DP,pcm=1" JackControl "HDMI/DP,pcm=1"
} }
EnableSequence [ EnableSequence [
] ]
@ -23,8 +24,9 @@ SectionDevice."HDMI1".0 {
SectionDevice."HDMI2".0 { SectionDevice."HDMI2".0 {
Comment "HDMI2" Comment "HDMI2"
Value { Value {
PlaybackPriority 400
PlaybackPCM "hw:${CardId},2" PlaybackPCM "hw:${CardId},2"
JackDev "hdaudioB0D2 HDMI/DP,pcm=2" JackControl "HDMI/DP,pcm=2"
} }
EnableSequence [ EnableSequence [
] ]
@ -35,8 +37,9 @@ SectionDevice."HDMI2".0 {
SectionDevice."HDMI3".0 { SectionDevice."HDMI3".0 {
Comment "HDMI3" Comment "HDMI3"
Value { Value {
PlaybackPriority 500
PlaybackPCM "hw:${CardId},3" PlaybackPCM "hw:${CardId},3"
JackDev "hdaudioB0D2 HDMI/DP,pcm=3" JackControl "HDMI/DP,pcm=3"
} }
EnableSequence [ EnableSequence [
] ]