Skip to content

[BUG] plain arecord issue found when testing RT711 headset recording on TGLU_SKU0A3E_SDW  #3804

Description

@keqiaozhang

Describe the bug
We observed this issue after upgrading Ubuntu from 20.04 to 22.04. The issue is that when testing plain arecord on headset, the Max peak will be reached to 100% in verbose logs, it should be 0%.

arecord -D hw:0,1 -r 48000 -c 2 -f S16_LE -vvv -i /dev/null -d 10
Recording WAVE '/dev/null' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Hardware PCM card 0 'sof-soundwire' device 1 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 1
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
Max peak (8192 samples): 0x00000515 # 3%
Max peak (8192 samples): 0x00000713 ## 5%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00007fff #################### 99%
Max peak (8192 samples): 0x00007fff #################### 99%
Max peak (8192 samples): 0x00007fff #################### 99%
Max peak (8192 samples): 0x00007fff #################### 99%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
Max peak (8192 samples): 0x00008000 #################### 100%
....

Checked the amixer setting, this issue is related to control 'rt711 ADC 08 Capture Volume'. The default value set in UCM2 is 63.
please refer to https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/codecs/rt711/init.conf.
The issue will disappear if I change the volume to 0: amixer -c sofsoundwire cset name='rt711 ADC 08 Capture Volume' 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Blocker bugs or important featuresbugSomething isn't workingcodecCodec HW or driver restriction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions