You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]Output very loud at the beginning when aplay via headset(0,0) or media playback(0,4) from Runtime PM status suspend mode #1463
changed the title [-][BUG][APL-UP2][I2S]When aplay sine_48k_stereo_440.wav use media play/headset,it has noise at the beginning[/-][+][BUG][APL-UP2][I2S]When aplay sine_48k_stereo_440.wav using media play/headset,it has noise at the beginning[/+]on Nov 11, 2019
changed the title [-][BUG][APL-UP2][I2S]When aplay sine_48k_stereo_440.wav using media play/headset,it has noise at the beginning[/-][+][BUG][APL-UP2][I2S]Aplay via media playback/headset,noise occurred at the beginning[/+]on Nov 11, 2019
changed the title [-][BUG][APL-UP2][I2S]Aplay via media playback/headset,noise occurred at the beginning[/-][+][BUG][APL-UP2][I2S]Changing aplay between media playback/headset,noise occurred at the beginning[/+]on Nov 12, 2019
changed the title [-][BUG][APL-UP2][I2S]Changing aplay between media playback/headset,noise occurred at the beginning[/-][+][BUG][APL-UP2][I2S]The sound become louder suddenly at the beginning when changing aplay between media playback and headset[/+]on Nov 12, 2019
Issue can not reproduce on:
CFL-S RVP with onborad codec ALC700 in HDA mode
ICL RVP with onborad codec ALC700 in HDA mode
GLK Chrome with onbord codec DA7219 in I2S mode
APL UP2 nocodec
BYT MB nocodec
BYT MB rt5682 in I2S mode
Issue can reproduce on:
APL UP2 with codec PCM512X in I2S mode
TGL RVP with onboard ALC711 in SDW mod and ALC1308 in I2S mode
CML SDW Laptop with ALC711+ ALC1308+ ALC715
@dengyangchao I don't understand your results and the description of the bug.
On APL Up2, there is a single output, so we cannot change between media and headset. The bug description is misleading, I have no idea what to look for.
On SDW platforms, you did you clarify on which output the sound is 'too loud'? Is this a problem with the speaker outputs? with the headset? both?
And btw the headset and speakers are completely independent, so when you switch from one to the other, it's equivalent to waiting for the same output to go through a pm_runtime suspend/resume cycles (typically need 5s of idle).
Please clarify what the problem really is and how you observe it, thanks.
@plbossart
1.For APL UP2 change aplay between media(hw0,4) and headset(hw0,0) actual is hw 0,4 <=>hw0,0.
2.For TGL RVP with onboard ALC711 in SDW mod and ALC1308 in I2S mode, hw0,0 is headset, and TGL can reproduce the issue in 2 scenarios, when pm_runtime from idle to active or wake up from S3 during aplay headset(hw0,0).
I retested on APL UP2 with codec PCM512X in I2S mode,the problem is
Output very loud at the beginning when aplay via (0,0) or media playback(0,4) from Runtime PM status suspend mode
changed the title [-][BUG][APL-UP2][I2S]The sound become louder suddenly at the beginning when changing aplay between media playback and headset[/-][+][BUG][APL-UP2][I2S]Output very loud at the beginning when aplay via headset(0,0) or media playback(0,4) from Runtime PM status suspend mode[/+]on Nov 13, 2019
Sorry, I don't get the issue. Your wording combines changes to the output as well as suspend/resume, that's two separate cases which can be tested separately
I think you should first focus on suspend-resume and describe the issue there.
The change from outputs does not happen usually at the alsa hardware device level.
Sorry, I don't get the issue. Your wording combines changes to the output as well as suspend/resume, that's two separate cases which can be tested separately
I think you should first focus on suspend-resume and describe the issue there.
The change from outputs does not happen usually at the alsa hardware device level.
1.sudo reboot
2. wait the runtime_status is suspend,then aplay via (0,0) or (0,4)media playback can reproduce this issue
if the runtime_status is still active ,then you aplay via (0,0) or (0,4) media play back,can not reproduce this issue
Test with Logic Analysis and got some result: (above is capture with external USB card, below is raw data from LA result from SSP5 from UP2) 12.txt
I think something wrong with the volume and PM is make chaos here. If I start 2 playback with very short delay. It seems the second playback will not have such issue.
1.with runtime PM disabled
after disabled PM , error not seen
2. with volume change with nocodec.
tested with nocodec with aplay -Dhw:0,5 -r48000 -c2 -fs16_le sine_48k_stereo_440.wav & arecord -Dhw:0,5 -c2 -r48000 -fs32 t1st.wav -vv -i,error can reproduce,at the beginning the volume is very loud,but when change volume during aplay can not reproduce this issue
Here is my question, if we find we are restore a volume change, do we still need to make the ramp up/down? For this case, we should make the volume start as the restore volume right?
It would be better if the volume would ramp in playback start would be from mute/min to actual. Do you know why does suspending impact this (apparently this does not happen always)? I feel this is a driver issue even if initializing to mute instead of 0 dB in volume new() might help in this case.
changed the title [-][BUG][APL-UP2][I2S]Output very loud at the beginning when aplay via headset(0,0) or media playback(0,4) from Runtime PM status suspend mode[/-][+][BUG]Output very loud at the beginning when aplay via headset(0,0) or media playback(0,4) from Runtime PM status suspend mode[/+]on Dec 9, 2019
@dengyangchao Could you test if SOF PR thesofproject/sof#2109 helps with this issue. The PR is for capture but the part of PR that forces volume component to start with ramp from mute even if the driver does not request it should impact this issue as well.
@dengyangchao Could you test if SOF PR thesofproject/sof#2109 helps with this issue. The PR is for capture but the part of PR that forces volume component to start with ramp from mute even if the driver does not request it should impact this issue as well.
Tried with thesofproject/sof#2109,error not seen on below platforms:
APL UP2 with codec PCM512X in I2S mode
GLK Chrome with onboard codec DA7219 in I2S mode
Verified this issue with thesofproject/sof#2109 on below platform, issue can not be reproduced.
TGL-U RVP with codec ALC711 in SDW mode and RT1308 in I2S mode
CML-H Laptop with codec ALC711, 2 x RT1308, RT715 in SDW mode
Activity
[-][BUG][APL-UP2][I2S]When aplay sine_48k_stereo_440.wav use media play/headset,it has noise at the beginning[/-][+][BUG][APL-UP2][I2S]When aplay sine_48k_stereo_440.wav using media play/headset,it has noise at the beginning[/+][-][BUG][APL-UP2][I2S]When aplay sine_48k_stereo_440.wav using media play/headset,it has noise at the beginning[/-][+][BUG][APL-UP2][I2S]Aplay via media playback/headset,noise occurred at the beginning[/+][-][BUG][APL-UP2][I2S]Aplay via media playback/headset,noise occurred at the beginning[/-][+][BUG][APL-UP2][I2S]Changing aplay between media playback/headset,noise occurred at the beginning[/+][-][BUG][APL-UP2][I2S]Changing aplay between media playback/headset,noise occurred at the beginning[/-][+][BUG][APL-UP2][I2S]The sound become louder suddenly at the beginning when changing aplay between media playback and headset[/+]sinahuang commentedon Nov 12, 2019
Issue still can be reproduced on TGL RVP with onboard ACL711 in SDW mod and ALC1308 in I2S mode.
scenario1: aplay -Dhw:0,0 -r48000 -c2 -fs16_le cut.wav -vv -i-->the audio become louder at the beginning.
scenario2:aplay -Dhw:0,0 -r48000 -c2 -fs16_le cut.wav -vv -i-->s3-->wake up-->the audio become louder at the beginning.
Test recipe
Kernel:https://github.com/thesofproject/linux/commits/integration/soundwire-latest commit: 2933f73
FW: https://github.com/thesofproject/sof/commits/master commit: d1dcdfe
Tplg: Same with TGL FW branch commit: sof-tgl-rt711-rt1308-nohdmi.tplg rename to sof-tgl-rt711-rt1308.tplg
Platform:TGL RVP with onboard ACL711 in SDW mod and ALC1308 in I2S mode.
demsg.log
sof_error_trace.log
sof_trace.log
dengyangchao commentedon Nov 12, 2019
Issue can not reproduce on:
CFL-S RVP with onborad codec ALC700 in HDA mode
ICL RVP with onborad codec ALC700 in HDA mode
GLK Chrome with onbord codec DA7219 in I2S mode
APL UP2 nocodec
BYT MB nocodec
BYT MB rt5682 in I2S mode
Issue can reproduce on:
APL UP2 with codec PCM512X in I2S mode
TGL RVP with onboard ALC711 in SDW mod and ALC1308 in I2S mode
CML SDW Laptop with ALC711+ ALC1308+ ALC715
plbossart commentedon Nov 12, 2019
@dengyangchao I don't understand your results and the description of the bug.
On APL Up2, there is a single output, so we cannot change between media and headset. The bug description is misleading, I have no idea what to look for.
On SDW platforms, you did you clarify on which output the sound is 'too loud'? Is this a problem with the speaker outputs? with the headset? both?
And btw the headset and speakers are completely independent, so when you switch from one to the other, it's equivalent to waiting for the same output to go through a pm_runtime suspend/resume cycles (typically need 5s of idle).
Please clarify what the problem really is and how you observe it, thanks.
dengyangchao commentedon Nov 13, 2019
@plbossart
1.For APL UP2 change aplay between media(hw0,4) and headset(hw0,0) actual is hw 0,4 <=>hw0,0.
2.For TGL RVP with onboard ALC711 in SDW mod and ALC1308 in I2S mode, hw0,0 is headset, and TGL can reproduce the issue in 2 scenarios, when pm_runtime from idle to active or wake up from S3 during aplay headset(hw0,0).
Liviali155 commentedon Nov 13, 2019
I retested on APL UP2 with codec PCM512X in I2S mode,the problem is
Output very loud at the beginning when aplay via (0,0) or media playback(0,4) from Runtime PM status suspend mode
[-][BUG][APL-UP2][I2S]The sound become louder suddenly at the beginning when changing aplay between media playback and headset[/-][+][BUG][APL-UP2][I2S]Output very loud at the beginning when aplay via headset(0,0) or media playback(0,4) from Runtime PM status suspend mode[/+]plbossart commentedon Nov 13, 2019
Sorry, I don't get the issue. Your wording combines changes to the output as well as suspend/resume, that's two separate cases which can be tested separately
I think you should first focus on suspend-resume and describe the issue there.
The change from outputs does not happen usually at the alsa hardware device level.
Liviali155 commentedon Nov 14, 2019
1.sudo reboot
2. wait the runtime_status is suspend,then aplay via (0,0) or (0,4)media playback can reproduce this issue
if the runtime_status is still active ,then you aplay via (0,0) or (0,4) media play back,can not reproduce this issue
10 remaining items
Liviali155 commentedon Nov 19, 2019
1.with runtime PM disabled
after disabled PM , error not seen
2. with volume change with nocodec.
tested with nocodec with
aplay -Dhw:0,5 -r48000 -c2 -fs16_le sine_48k_stereo_440.wav & arecord -Dhw:0,5 -c2 -r48000 -fs32 t1st.wav -vv -i,error can reproduce,at the beginning the volume is very loud,but when change volume during aplay can not reproduce this issuesingalsu commentedon Nov 19, 2019
It would be better if the volume would ramp in playback start would be from mute/min to actual. Do you know why does suspending impact this (apparently this does not happen always)? I feel this is a driver issue even if initializing to mute instead of 0 dB in volume new() might help in this case.
dengyangchao commentedon Dec 9, 2019
GLK speaker pipeline(HW:0,0) can reproduce the issue.
below two scenarios can reproduce:
Platform: GLK Chrome with onboard codec DA7219 in I2S mode
Firmware: 65de27d https://github.com/thesofproject/sof/commits/master
Kernel: 7c7cc04 https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: file: tools/topology/sof-glk-da7219.tplg same as firmware
dmesg.log
logger.log
[-][BUG][APL-UP2][I2S]Output very loud at the beginning when aplay via headset(0,0) or media playback(0,4) from Runtime PM status suspend mode[/-][+][BUG]Output very loud at the beginning when aplay via headset(0,0) or media playback(0,4) from Runtime PM status suspend mode[/+]singalsu commentedon Dec 17, 2019
@dengyangchao Could you test if SOF PR thesofproject/sof#2109 helps with this issue. The PR is for capture but the part of PR that forces volume component to start with ramp from mute even if the driver does not request it should impact this issue as well.
Liviali155 commentedon Dec 19, 2019
Tried with thesofproject/sof#2109,error not seen on below platforms:
APL UP2 with codec PCM512X in I2S mode
GLK Chrome with onboard codec DA7219 in I2S mode
sinahuang commentedon Dec 20, 2019
Verified this issue with thesofproject/sof#2109 on below platform, issue can not be reproduced.
TGL-U RVP with codec ALC711 in SDW mode and RT1308 in I2S mode
CML-H Laptop with codec ALC711, 2 x RT1308, RT715 in SDW mode
Liviali155 commentedon Jan 17, 2020
closed it , PR #2109 merged