|
| 1 | +# Use case Configuration for sof-soundwire card |
| 2 | + |
| 3 | +If.codecmic { |
| 4 | + Condition { |
| 5 | + Type RegexMatch |
| 6 | + Regex "(rt721(-sdca)?)" |
| 7 | + String "${var:MultiMicShadow}" |
| 8 | + } |
| 9 | + True { |
| 10 | + SectionDevice."Mic" { |
| 11 | + Comment "SoundWire microphones" |
| 12 | + |
| 13 | + EnableSequence [ |
| 14 | + cset "name='rt721 FU1E Capture Switch' 1" |
| 15 | + ] |
| 16 | + |
| 17 | + DisableSequence [ |
| 18 | + cset "name='rt721 FU1E Capture Switch' 0" |
| 19 | + ] |
| 20 | + |
| 21 | + Value { |
| 22 | + CapturePriority 100 |
| 23 | + CapturePCM "hw:${CardId},4" |
| 24 | + CaptureSwitch "rt721 FU1E Capture Switch" |
| 25 | + CaptureVolume "rt721 FU1E Capture Volume" |
| 26 | + CaptureMixerElem "rt721 FU1E" |
| 27 | + } |
| 28 | + } |
| 29 | + } |
| 30 | +} |
| 31 | + |
| 32 | +If.codecspk { |
| 33 | + Condition { |
| 34 | + Type RegexMatch |
| 35 | + Regex "(rt721(-sdca)?)" |
| 36 | + String "${var:MultiSpeakerShadow}" |
| 37 | + } |
| 38 | + True { |
| 39 | + SectionDevice."Speaker" { |
| 40 | + Comment "Speaker" |
| 41 | + |
| 42 | + EnableSequence [ |
| 43 | + cset "name='Speaker Switch' on" |
| 44 | + ] |
| 45 | + |
| 46 | + DisableSequence [ |
| 47 | + cset "name='Speaker Switch' off" |
| 48 | + ] |
| 49 | + |
| 50 | + Value { |
| 51 | + PlaybackPriority 100 |
| 52 | + PlaybackPCM "hw:${CardId},2" |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | +} |
| 57 | + |
| 58 | +SectionDevice."Headphones" { |
| 59 | + Comment "Headphones" |
| 60 | + |
| 61 | + EnableSequence [ |
| 62 | + cset "name='Headphone Switch' on" |
| 63 | + ] |
| 64 | + |
| 65 | + DisableSequence [ |
| 66 | + cset "name='Headphone Switch' off" |
| 67 | + ] |
| 68 | + |
| 69 | + Value { |
| 70 | + PlaybackPriority 200 |
| 71 | + PlaybackPCM "hw:${CardId}" |
| 72 | + JackControl "Headphone Jack" |
| 73 | + } |
| 74 | +} |
| 75 | + |
| 76 | +SectionDevice."Headset" { |
| 77 | + Comment "Headset Microphone" |
| 78 | + |
| 79 | + EnableSequence [ |
| 80 | + cset "name='rt721 FU0F Capture Switch' 1" |
| 81 | + ] |
| 82 | + |
| 83 | + DisableSequence [ |
| 84 | + cset "name='rt721 FU0F Capture Switch' 0" |
| 85 | + ] |
| 86 | + |
| 87 | + Value { |
| 88 | + CapturePriority 200 |
| 89 | + CapturePCM "hw:${CardId},1" |
| 90 | + JackControl "Headset Mic Jack" |
| 91 | + CaptureSwitch "rt721 FU0F Capture Switch" |
| 92 | + CaptureVolume "rt721 FU0F Capture Volume" |
| 93 | + CaptureMixerElem "rt721 FU0F" |
| 94 | + } |
| 95 | +} |
0 commit comments