Skip to content

Conversation

@plbossart
Copy link
Member

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?

Add conditional inclusion of sections

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@bardliao
Copy link

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?

I didn't see any issue from a06d285
But both Headset Mic and SoundWire microphones doesn't work when I tested it with my Dell laptop. However, both headphone and speaker playback work fine. I am wondering if the enable sequence is applied. Actually, I tried modifying cset "name='rt711 DAC Surr Playback Volume' 87" to cset "name='rt711 DAC Surr Playback Volume' 30" in RT711.conf. The 'rt711 DAC Surr Playback Volume' control is still 87 when I play with headphone.

@plbossart
Copy link
Member Author

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?

I didn't see any issue from a06d285
But both Headset Mic and SoundWire microphones doesn't work when I tested it with my Dell laptop. However, both headphone and speaker playback work fine. I am wondering if the enable sequence is applied. Actually, I tried modifying cset "name='rt711 DAC Surr Playback Volume' 87" to cset "name='rt711 DAC Surr Playback Volume' 30" in RT711.conf. The 'rt711 DAC Surr Playback Volume' control is still 87 when I play with headphone.

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.

@bardliao
Copy link

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.

@plbossart
Copy link
Member Author

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.

@libinyang
Copy link

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.

Condition {
Type String
Haystack "${CardComponents}"
Needle "spk:rt1308"

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?

@libinyang
Copy link

@plbossart @bardliao
I have run the verify-ucm-config.sh in sof-ci/sof-test on sof-soundwire config. The test result shows there is no grammar issue.
And what platform are you using? Dell Olympic? If so, I think you have already renamed sof-soundwire to sof-sdw-rt711-1308-715 and put them in alsa/ucm2 folder, right?
After fixing the Needle string issue, I believe the UCM2 will work.

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.

@bardliao
Copy link

I think you have already renamed sof-soundwire to sof-sdw-rt711-1308-715

This goes together with thesofproject/linux#1889. So no rename needed.

@libinyang
Copy link

I think you have already renamed sof-soundwire to sof-sdw-rt711-1308-715

This goes together with thesofproject/linux#1889. So no rename needed.

@bardliao Thanks. And I see the CardComponents definition in that patchset.

@libinyang
Copy link

@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.
Back to this sof-soundwire UCM2 config. I refined my kernel code to support the correct CardComponents on my Dell Olympic with updated pulseaudio and alsa-lib. It works well. Speaker, Headphone, embedded MIC and Headset MIC worked. (I didn't test HDMI).
I'm planning to build a pulseaudio deb package which supports UCM2 and submit to the server.

cset "name='rt711 ADC 08 Capture Switch' 1"
cset "name='rt711 AMIC Volume' 1"
]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed DisableSequence?

Copy link
Member Author

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

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.

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>
@ClarexZhou
Copy link

ClarexZhou commented Mar 26, 2020

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:
Ubuntu: 20.04 (from cdimage.ubuntu.com/ubuntu/daily-live) , with alsa-lib: 1.2.2-2.1, Pulseaudio: 13.99.1
Kernel: Sof-dev (commit:33f864de)
Firmware &tplg: Master(commit: b8b96a20) + PR #2603 to avoid bug #2570 + PR# 2358 to enable mute LED.

Found below issues (No issues without UCM2): add dmesg with pulseaduio log for issue 1 and issue 2.
syslog.txt

  1. Runtime PM keeps active after boot up
  2. Call trace then System hang when start headset aplay/arecord or select Headphone as output source from sound setting
  3. MIC mute LED won’t light on, but mute/unmute control is working.
  4. Both rt1308-1 DAC L and rt1308-1 DAC R are muted in default
  5. Won’t auto switch output source when plug headset.
  6. HDMI/DP jack detection works OK. Audio output can auto switch to speaker if disconnect HDMI/DP during paplay via HDMI/DP. -> This is expected behavior, not issue.
  7. Both HDMI and DP connected, HDMI is HDMI1/DP1 output, DP is HDMI2/DP2. ->S/PDIF is muted in default, need to unmute manually
  8. “rt715 ADC 07 Capture Switch” is default off, need to manually switch to on for DMIC capture
  9. DMIC default volume is too low. Need set default volume for DMIC “PGA5.0 5 Master”

Comment "Headphone"

EnableSequence [
cset "name='rt711 DAC Surr Playback Volume' 87"
Copy link

@RanderWang RanderWang Mar 26, 2020

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

@RanderWang
Copy link

RanderWang commented Mar 26, 2020

@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.

@libinyang
Copy link

@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>
@libinyang
Copy link

  • Runtime PM keeps active after boot up

There is ipc timed out message. (Clare will attach the dmesg in her new reported issue)

  • Call trace then System hang when start headset aplay/arecord or select Headphone as output source from sound setting

Clare will attach the dmesg in her new reported issue

  • MIC mute LED won’t light on, but mute/unmute control is working.

As thesofproject/sof#2358 has been merged, this can be easily fixed by adding :

CaptureSwitch "PGAx.0 x Master Capture Switch"
CaptureVolume "PGAx.0 x Master Capture Volume"

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>
@plbossart
Copy link
Member Author

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

@plbossart
Copy link
Member Author

merging to start handling fixes as pull requests

@plbossart plbossart merged commit bd7e4d6 into thesofproject:master Apr 8, 2020

EnableSequence [

cset "name='DAC Front Playback Volume' 87"

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?

Copy link
Member Author

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.

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants