-
Notifications
You must be signed in to change notification settings - Fork 12
Sof soundwire #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sof soundwire #29
Changes from all commits
a06d285
5315b0f
b41fb1c
12ab70e
8907bc4
a363784
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Use case Configuration for sof-soundwire card | ||
|
|
||
| If.hdmi1 { | ||
| Condition { | ||
| Type ControlExists | ||
| Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'" | ||
| } | ||
| True { | ||
| SectionDevice."HDMI1" { | ||
| Comment "HDMI1/DP1 Output" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='IEC958 Playback Switch' on" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='IEC958 Playback Switch' off" | ||
| ] | ||
|
|
||
| Value { | ||
| PlaybackPriority 500 | ||
| PlaybackPCM "hw:${CardId},5" | ||
| JackControl "HDMI/DP,pcm=5 Jack" | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| If.hdmi2 { | ||
| Condition { | ||
| Type ControlExists | ||
| Control "iface=CARD,name='HDMI/DP,pcm=6 Jack'" | ||
| } | ||
| True { | ||
| SectionDevice."HDMI2" { | ||
| Comment "HDMI2/DP2 Output" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='IEC958 Playback Switch',index=1 on" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='IEC958 Playback Switch',index=1 off" | ||
| ] | ||
|
|
||
| Value { | ||
| PlaybackPriority 600 | ||
| PlaybackPCM "hw:${CardId},6" | ||
| JackControl "HDMI/DP,pcm=6 Jack" | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| If.hdmi3 { | ||
| Condition { | ||
| Type ControlExists | ||
| Control "iface=CARD,name='HDMI/DP,pcm=7 Jack'" | ||
| } | ||
| True { | ||
| SectionDevice."HDMI3" { | ||
| Comment "HDMI3/DP3 Output" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='IEC958 Playback Switch',index=2 on" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='IEC958 Playback Switch',index=2 off" | ||
| ] | ||
|
|
||
| Value { | ||
| PlaybackPriority 700 | ||
| PlaybackPCM "hw:${CardId},7" | ||
| JackControl "HDMI/DP,pcm=7 Jack" | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Use case Configuration for sof-soundwire card | ||
|
|
||
| SectionVerb { | ||
|
|
||
| EnableSequence [ | ||
| cset "name='PGA1.0 1 Master Playback Volume' 50" | ||
| ] | ||
|
|
||
| } | ||
|
|
||
| <sof-soundwire/RT700.conf> | ||
| <sof-soundwire/RT711.conf> | ||
| <sof-soundwire/RT5682.conf> | ||
| <sof-soundwire/RT1308-1.conf> | ||
| <sof-soundwire/RT715.conf> | ||
| <sof-soundwire/Hdmi.conf> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Use case Configuration for sof-soundwire card | ||
|
|
||
| If.RT1308-1 { | ||
| Condition { | ||
| Type String | ||
| Haystack "${CardComponents}" | ||
| Needle "spk:rt1308" | ||
| } | ||
| True { | ||
|
|
||
| SectionDevice."Speaker" { | ||
| Comment "Speaker" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='PGA3.0 3 Master Playback Volume' 50" | ||
|
|
||
| cset "name='rt1308-1 DAC L Switch' 1" | ||
| cset "name='rt1308-1 DAC R Switch' 1" | ||
| cset "name='Speaker Switch' on" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='rt1308-1 DAC L Switch' 0" | ||
| cset "name='rt1308-1 DAC R Switch' 0" | ||
| cset "name='Speaker Switch' off" | ||
| ] | ||
|
|
||
| Value { | ||
| PlaybackPriority 300 | ||
| PlaybackPCM "hw:${CardId},2" | ||
| PlaybackChannels "2" | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Use case Configuration for sof-soundwire card | ||
|
|
||
| If.RT5682 { | ||
| Condition { | ||
| Type String | ||
| Haystack "${CardComponents}" | ||
| Needle "hs:rt5682" | ||
| } | ||
| True { | ||
|
|
||
| SectionDevice."Headphone" { | ||
| Comment "Headphone" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='Headphone Jack' on" | ||
| cset "name='rt5682 HPOL Playback Switch' 1" | ||
| cset "name='rt5682 HPOR Playback Switch' 1" | ||
| cset "name='rt5682 Stereo1 DAC MIXL DAC L1 Switch' 1" | ||
| cset "name='rt5682 Stereo1 DAC MIXR DAC R1 Switch' 1" | ||
| cset "name='rt5682 DAC L Mux' 1" | ||
| cset "name='rt5682 DAC R Mux' 1" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='rt5682 HPOL Playback Switch' 0" | ||
| cset "name='rt5682 HPOR Playback Switch' 0" | ||
| ] | ||
|
|
||
| Value { | ||
| PlaybackPriority 200 | ||
| PlaybackPCM "hw:${CardId},0" | ||
| PlaybackChannels "2" | ||
| JackControl "Headphone Jack" | ||
| } | ||
| } | ||
|
|
||
| SectionDevice."Microphone" { | ||
| Comment "Headset Mic" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='STO1 ADC Capture Switch' 1" | ||
| cset "name='rt5682 RECMIX1L CBJ Switch' 1" | ||
| cset "name='IF1 01 ADC Swap Mux' 2" | ||
| cset "name='CBJ Boost Volume' 3" | ||
| cset "name='rt5682 Stereo1 ADC L Mux' 0" | ||
| cset "name='rt5682 Stereo1 ADC R Mux' 0" | ||
| cset "name='rt5682 Stereo1 ADC L1 Mux' 1" | ||
| cset "name='rt5682 Stereo1 ADC R1 Mux' 1" | ||
| cset "name='rt5682 Stereo1 ADC MIXL ADC2 Switch' 0" | ||
| cset "name='rt5682 Stereo1 ADC MIXR ADC2 Switch' 0" | ||
| cset "name='rt5682 Stereo1 ADC MIXL ADC1 Switch' 1" | ||
| cset "name='rt5682 Stereo1 ADC MIXR ADC1 Switch' 1" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='STO1 ADC Capture Switch' 0" | ||
| cset "name='rt5682 RECMIX1L CBJ Switch' 0" | ||
| cset "name='rt5682 Stereo1 ADC MIXL ADC1 Switch' 0" | ||
| cset "name='rt5682 Stereo1 ADC MIXR ADC1 Switch' 0" | ||
| ] | ||
|
|
||
| Value { | ||
| CapturePriority 200 | ||
| CapturePCM "hw:${CardId},1" | ||
| CaptureChannels "2" | ||
| JackControl "Headset Mic Jack" | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Use case Configuration for sof-soundwire card | ||
|
|
||
| If.RT700 { | ||
| Condition { | ||
| Type String | ||
| Haystack "${CardComponents}" | ||
| Needle "hs:rt700" | ||
| } | ||
| True { | ||
|
|
||
| SectionDevice."Headphone" { | ||
| Comment "Headphone" | ||
|
|
||
| ConflictingDevice [ | ||
| "Speaker" | ||
| ] | ||
|
|
||
| EnableSequence [ | ||
| cset "name='DAC Front Playback Volume' 87" | ||
| cset "name='HPO Mux' 'Front'" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
|
|
||
| ] | ||
|
|
||
| Value { | ||
| PlaybackPriority 200 | ||
| PlaybackPCM "hw:${CardId},0" | ||
| PlaybackChannels "2" | ||
| JackControl "Headphone Jack" | ||
| } | ||
| } | ||
|
|
||
| SectionDevice."Speaker" { | ||
| Comment "Speaker" | ||
|
|
||
| ConflictingDevice [ | ||
| "Headphone" | ||
| ] | ||
|
|
||
| EnableSequence [ | ||
| cset "name='DAC Front Playback Volume' 87" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
|
|
||
| ] | ||
|
|
||
| Value { | ||
| PlaybackPriority 300 | ||
| PlaybackPCM "hw:${CardId},0" | ||
| PlaybackChannels "2" | ||
| } | ||
| } | ||
|
|
||
| SectionDevice."Microphone" { | ||
| Comment "Headset Mic" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='ADC 22 Mux' 'MIC2'" | ||
| cset "name='ADC 09 Capture Volume' 63" | ||
| cset "name='ADC 09 Capture Switch' 1" | ||
| cset "name='AMIC Volume' 1" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='ADC 09 Capture Switch' 0" | ||
| ] | ||
|
|
||
| Value { | ||
| CapturePriority 200 | ||
| CapturePCM "hw:${CardId},1" | ||
| CaptureChannels "2" | ||
| JackControl "Headset Mic Jack" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Use case Configuration for sof-soundwire card | ||
|
|
||
| If.RT711 { | ||
| Condition { | ||
| Type String | ||
| Haystack "${CardComponents}" | ||
| Needle "hs:rt711" | ||
| } | ||
| True { | ||
|
|
||
| SectionDevice."Headphone" { | ||
| Comment "Headphone" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='rt711 DAC Surr Playback Volume' 87" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to add "cset "name='Headphone Switch' on" here, or no output in headphone when switch speaker to headphone in sound setting |
||
| cset "name='Headphone Switch' on" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='Headphone Switch' off" | ||
| ] | ||
|
|
||
| Value { | ||
| PlaybackPriority 200 | ||
| PlaybackPCM "hw:${CardId},0" | ||
| PlaybackChannels "2" | ||
| JackControl "Headphone Jack" | ||
| } | ||
| } | ||
|
|
||
| SectionDevice."Microphone" { | ||
| Comment "Headset Mic" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='rt711 ADC 23 Mux' 'MIC2'" | ||
| cset "name='rt711 ADC 08 Capture Volume' 63" | ||
| cset "name='rt711 ADC 08 Capture Switch' 1" | ||
| cset "name='rt711 AMIC Volume' 1" | ||
|
|
||
| cset "name='PGA2.0 2 Master Capture Switch' 1" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='PGA2.0 2 Master Capture Switch' 0" | ||
| ] | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missed DisableSequence?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. those where the settings we've used so far, I don't know if there is a need to turn something off. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. Mostly if we switch on something in enablesequence, we will switch off it in disablesequence unless it impacts on other streams. However, even we don't switch off it, it still works well because pulseaudio will switch stream automatically. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about to unify this UCM setting as other codecs ? |
||
| Value { | ||
| CapturePriority 200 | ||
| CapturePCM "hw:${CardId},1" | ||
| CaptureChannels "2" | ||
| JackControl "Headset Mic Jack" | ||
| CaptureSwitch "PGA2.0 2 Master Capture Switch" | ||
| CaptureVolume "PGA2.0 2 Master Capture Volume" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Use case Configuration for sof-soundwire card | ||
|
|
||
| If.RT715 { | ||
| Condition { | ||
| Type String | ||
| Haystack "${CardComponents}" | ||
| Needle "mic:rt715" | ||
| } | ||
| True { | ||
|
|
||
| SectionDevice."Dmic" { | ||
| Comment "SoundWire microphones" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='rt715 DMIC3 Boost' 2" | ||
| cset "name='rt715 DMIC4 Boost' 2" | ||
| cset "name='rt715 ADC 24 Mux' 3" | ||
| cset "name='rt715 ADC 25 Mux' 4" | ||
| cset "name='rt715 ADC 27 Capture Switch' 1" | ||
| cset "name='rt715 ADC 07 Capture Switch' 1" | ||
|
|
||
| cset "name='PGA5.0 5 Master Capture Switch' 1" | ||
| ] | ||
|
|
||
| DisableSequence [ | ||
| cset "name='rt715 ADC 27 Capture Switch' 0" | ||
| cset "name='rt715 ADC 07 Capture Switch' 0" | ||
|
|
||
| cset "name='PGA5.0 5 Master Capture Switch' 0" | ||
| ] | ||
|
|
||
| Value { | ||
| CapturePriority 300 | ||
| CapturePCM "hw:${CardId},4" | ||
| CaptureChannels "2" | ||
| CaptureSwitch "PGA5.0 5 Master Capture Switch" | ||
| CaptureVolume "PGA5.0 5 Master Capture Volume" | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Syntax 2 | ||
|
|
||
| SectionUseCase."HiFi" { | ||
| File "HiFi.conf" | ||
| Comment "Play HiFi quality Music" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart speaker and headphone are using the same PCM. Do you know whether there is a kcontrol to control the sound come from, for example, mute headphone and unmute speaker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd need to rely on the jack information and use priorities to switch from one to the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart Speaker and Headphone are using the same PCM. When we play with speaker, the headphone still have sound if we don't mute it. Jaroslav has a comment on RT700: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/854#note_471481. I think he is asking for this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart I checked the SDW platforms with RT700, and there are "Headphones Switch" and "Speaker Switch". I think we can use them in the EnableSequence/DisableSequence. I will make a patch for it.