-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Describe the bug
Non-symmetrical volume controls are not always working correctly. In this case one volume command got ignored.
Also in channel 2 the gain ramp seem to be omitted sometimes. In such case the gain jumps directly to new gain without normal soft transition.
To Reproduce
Prepare a script in DUT e.g. ~/bin/test_capture_volume.sh with content
#!/bin/bash
amixer -c0 cset name='DMIC Raw Capture Volume' 45
sleep 1
amixer -c0 cset name='DMIC Raw Capture Volume' 45,40
sleep 1
amixer -c0 cset name='DMIC Raw Capture Volume' 40,45
sleep 1
amixer -c0 cset name='DMIC Raw Capture Volume' 0
sleep 1
amixer -c0 cset name='DMIC Raw Capture Volume' 45,45
sleep 1
amixer -c0 cset name='DMIC Raw Capture Volume' 1,45
sleep 1
amixer -c0 cset name='DMIC Raw Capture Volume' 45,1
sleep 1
amixer -c0 cset name='DMIC Raw Capture Volume' 45
sleep 1
Open three shell windows to DUT. From one window other device play long enough steady sine wave from DUT speaker or other speaker to DUT microphones. E.g.
$ aplay -Dhw:0,0 sine.wav
Launch from two shell windows first capture command, and immediately after the gains adjust script.
$ arecord -Dhw:0,6 -f S32_LE -r 48000 -c 2 -d 10 rec.wav
$ test_capture_volume.sh
Steps to reproduce the behavior: (e.g. list commands or actions used to reproduce the bug)
Reproduction Rate
100%
Expected behavior
Audio signal envelope should follow follow volume commands and every volume transition should be soft.
Impact
Annoyance
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
- Kernel: {SHA} topic/sof-dev 21a82bd3df0a
- SOF: {SHA} main 8bfb489
- Name of the topology file
- Topology: {FILE} sof-hda-generic-2ch.tplg
- Name of the platform(s) on which the bug is observed.
- Platform: {PLATFORM} TGL-H notebook
Screenshots or console output
Here in the highlighed part of the wav file the volume command "amixer -c0 cset name='DMIC Raw Capture Volume' 1,45" failed.

It can be also seen that the volume ramp is missing from channel 2 just after 8s time in the waveform.
gh_volume_fail_issue.wav.gz