-
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
Conversation
Add conditional inclusion of sections Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
I didn't see any issue from a06d285 |
For me it's the headphone that doesn't work, but the results are different if I do modprobe snd-sof-pci with the headphone inserted or not. Clearly PulseAudio or alsa-lib are not taking the information into account. |
Does "headphone doesn't work" here mean "Headphone" is not showed in sound setting or it is showed but there is no output when you play with headphone? It works on my side. I can see "headphone" is showed if a headphone is inserted, and disappear when the headphone is unplugged. And of course it plays well. |
Ah, you got me on the 'work' usage ;-) What I meant is that the headset is well detected, but in some cases where I insert the headset after the start and run the test app I hear nothing. the funny thing is that I can play with the hw:0,0 device while the test app is running and hear audio, so I suspect PulseAudio does not even open the device. Maybe this is also an install issue, I added the libasound .deb package to get ucm2 support, but maybe I need both the latest alsa-lib and pulseaudio installed. |
@plbossart Yes, if you are using the built-in pulseaudio of Ubuntu 18.04, it will not support UCM2. |
ucm2/sof-soundwire/RT1308-1.conf
Outdated
| Condition { | ||
| Type String | ||
| Haystack "${CardComponents}" | ||
| Needle "spk:rt1308" |
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.
I didn't find the definition of "spk:rt1308" of the components in the source code. Maybe I missed something?
|
@plbossart @bardliao And BTW, I checked with Jaska and confirmed that his pulseaudio doesn't support UCM2. I have tested on the latest pulseaudio with alsa-lib from http://sof-ci-storage.sh.intel.com/share/alsa/alsa-lib/libasound2_1.2.1.2-intel_amd64.deb, it supports UCM2. |
This goes together with thesofproject/linux#1889. So no rename needed. |
@bardliao Thanks. And I see the CardComponents definition in that patchset. |
|
@plbossart Thanks for the work on UCM2. I planned to support UCM2 after the Dell project. Actually I did have some UCM2 configs for our CI DUTs (but I didn't prepare the soundwire UCM2). I will polish them and submit them later after I finish my current task. |
| cset "name='rt711 ADC 08 Capture Switch' 1" | ||
| cset "name='rt711 AMIC Volume' 1" | ||
| ] | ||
|
|
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.
missed DisableSequence?
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.
those where the settings we've used so far, I don't know if there is a need to turn something off.
Likewise from a hardware perspective, there is no conflict between headphone and speaker, they can work at the same time, but that may get in the way of user-experience
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
how about to unify this UCM setting as other codecs ?
DisableSequence [
cset "name='rt711 ADC 08 Capture Switch' 0"
]
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Settings provided by M, Naveen <naveen.m@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
Test UCM2 SDW PR#29 on CML-U with 711-1308-mono-715 in SDW mode. Many non-soundwire commits in PR#29 and apply failed. So only applied 3 sof-soundwire commit. Test Environment: Found below issues (No issues without UCM2): add dmesg with pulseaduio log for issue 1 and issue 2.
|
| Comment "Headphone" | ||
|
|
||
| EnableSequence [ | ||
| cset "name='rt711 DAC Surr Playback Volume' 87" |
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.
we need to add "cset "name='Headphone Switch' on" here, or no output in headphone when switch speaker to headphone in sound setting
|
@plbossart I installed 19.10 and tested on CML-U. Playback & capture work now and all the mixers are correct. Two issues: first output doesn't move to correct endpoint when switch between headphone & speaker in sound setting. I gave a solution confirmed by Clare in above comments. Another issue is: output doesn't move to correct endpoint automatically when plug or remove headphone. I don't find a solution now. |
@RanderWang If I remember correctly, what you mentioned is the known issue. If we use multiple profiles, the switching between HS and Speaker will be fixed. |
Apply the values suggested by Libin in PR#28 The split between profiles is not done, not sure why it was needed in the first place. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Use settings provided by @shumingfan Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
There is ipc timed out message. (Clare will attach the dmesg in her new reported issue)
Clare will attach the dmesg in her new reported issue
As thesofproject/sof#2358 has been merged, this can be easily fixed by adding : in the Mic "Value" section Others issues which are related the mute/volume/switch can be easily fixed by a little modification in the UCM configuration. |
Use settings provided by @shumingfan Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
sorry @libinyang @ClarexZhou my bad: I pushed the updated branch to the wrong tree :-( See the update I did last week, works fine for me for speaker, headphone, dmic, headset on Olympic w/ latest firmware/kernel + Ubuntu 20.04 |
|
merging to start handling fixes as pull requests |
|
|
||
| EnableSequence [ | ||
|
|
||
| cset "name='DAC Front Playback Volume' 87" |
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.
This goes together with
thesofproject/linux#1889
This seems to work except for headphones, wondering if I am missing a setting for RT711. @bardliao @RanderWang can you take a look?