-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Describe the bug
The volume unmute and level change ramp stops when one of the channels reach the target gain. The channels reach the target gain at different times due to constant linear gain slope vs. time. As result only one of the channel has the correct gain.
To Reproduce
Run this script
#!/bin/bash
ARECORD="arecord -Dhw:0,1 -f S32_LE -c 4 -r 48000"
SLEEP="sleep 1"
cset_nom () { amixer cset 'name=Dmic0 Capture Volume' 70%; }
cset_max () { amixer cset 'name=Dmic0 Capture Volume' 100%; }
cset_min () { amixer cset 'name=Dmic0 Capture Volume' 0%; }
cset_diff1 () { amixer cset 'name=Dmic0 Capture Volume' 90%,80%,50%,10%; }
cset_diff2 () { amixer cset 'name=Dmic0 Capture Volume' 10%,50%,80%,90%; }
cset_mute () { amixer cset 'name=Dmic0 Capture Switch' off; }
cset_unmute () { amixer cset 'name=Dmic0 Capture Switch' on; }
# Test 1
# Prepare, set vol to 100%, unmute, record in background
cset_max
cset_unmute
$SLEEP
$ARECORD -d 10 vol_test_1.wav &
$SLEEP
# Set different gains
cset_diff1
$SLEEP
# Set nominal gain
cset_nom
$SLEEP
# Mute
cset_mute
$SLEEP
# Set umute
cset_unmute
$SLEEP
# Mute
cset_mute
$SLEEP
# Set max gain
cset_max
$SLEEP
# Set umute
cset_unmute
$SLEEP
# Set different gains
cset_diff2
$SLEEP
Reproduction Rate
Always. The incorrect gains look like this:
Expected behavior
The different and correct gains need to be observed in the recording. This was ran with PR #3450 .
Impact
Showstopper if different channel gains are needed. Usually they are not. It is also recommended to use EQ to adjust to tune e.g. non-symmetrical speakers to sound similar.
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
- Kernel: {SHA}
- SOF: {SHA}
- Name of the topology file
- Topology: {FILE}
- Name of the platform(s) on which the bug is observed.
- Platform: {PLATFORM}
Screenshots or console output
If applicable, add a screenshot (drag-and-drop an image), or console logs
(cut-and-paste text and put a code fence (```) before and after, to help
explain the issue.
Please also include the relevant sections from the firmware log and kernel log in the report (and attach the full logs for complete reference). Kernel log is taken from dmesg and firmware log from sof-logger. See https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html

