[alsa-devel] [PATCH] ASoC: cs42l51: Fix SOC_DOUBLE_R_SX_TLV shift values for ADC, PCM, and Analog kcontrols

Brian Austin brian.austin at cirrus.com
Fri Apr 18 16:00:35 CEST 2014


On Fri, 18 Apr 2014, Thomas Petazzoni wrote:


> Simple mixer control 'Analog',0
>  Capabilities: pvolume
>  Playback channels: Front Left - Front Right
>  Limits: Playback 0 - 177
This is wrong

>  Mono:
>  Front Left: Playback 204 [115%] [0.00dB]
>  Front Right: Playback 204 [115%] [0.00dB]

root at beagleboard:~# amixer sget 'Analog'
Simple mixer control 'Analog',0
   Capabilities: pvolume penum
   Playback channels: Front Left - Front Right
   Limits: Playback 0 - 229
   Mono:
   Front Left: Playback 204 [89%] [0.00dB]
   Front Right: Playback 204 [89%] [0.00dB]

root at beagleboard:~# i2cdump -y -f 1 0x4b
No size specified (using byte-data access)
      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 d9 7e ae 00 00 a0 00 60 44 00 00 00 00 84 84    .?~?..?.`D....??
10: 19 19 00 00 00 88 00 00 00 00 7f 00 01 3f 00 00    ??...?....?.??..
[...]

As you can see the output of amixer is wrong on your system. There are 229 
steps for gain on this control. At 89% we are at 0dB which is correct 
according to I2C Tools (0h)

root at beagleboard:~# amixer sset 'Analog' 0
Simple mixer control 'Analog',0
   Capabilities: pvolume penum
   Playback channels: Front Left - Front Right
   Limits: Playback 0 - 229
   Mono:
   Front Left: Playback 0 [0%] [-102.00dB]
   Front Right: Playback 0 [0%] [-102.00dB]
root at beagleboard:~# i2cdump -y -f 1 0x4b
No size specified (using byte-data access)
      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 d9 7e ae 00 00 a0 00 60 44 00 00 00 00 84 84    .?~?..?.`D....??
10: 19 19 00 00 00 88 34 34 00 00 7f 00 01 3f 00 00    ??...?44..?.??..

-102dB gives the correct output and register writes as well. (34h)

My regmap output maps correctly too. Weird.

So lets get a few versions of some things to see what and where things 
went wrong.

What kernel version?
Alsa-lib version?
What distro are you using?

Thanks,
Brian


More information about the Alsa-devel mailing list