ALSACTL wrong restore on ARM9
Quoted 5 lines · Alexandre BOUIN
Hi list,
I'm using an intern AT91SAM92620-EK board with a WM8900 codec. ALSACTL restores bad values to controls after doing this :
Quoted 8 lines
$ rm /var/lib/alsa/asound.state $ alsactl store $ alsactl restoreAnyone has seen this issue before ?
Any ideas to solve it ? (I don't know much these utils neither alsa API) Could it come from our ASoC codec driver ?
Can you describe 'bad values' in a little more detail.
Liam
Quoted 1 line
Can you describe 'bad values' in a little more detail.
You're right, some details are missing.
For example, for first control, a playback volume control, value can go from 0 to 63.
Before "store" command, I'd set it to 20.
I've check that in "/var/lib/alsa/asound/state", I had the same value. Here is a part of this file :
state.codec {
control.1 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 63'
iface MIXER
name 'HP Playback Volume'
value.0 20
value.1 20
}So saved value seems ok.
After "restore" command, I get this :
$amixer cget numid=1
numid=1,iface=MIXER,name='HP Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=63,step=0 : values=45,45
That's why I say that values are not correct.
I'm currently using debian alsa-utils_1.0.16-1_arm package.
Quoted 26 lines · Alexandre BOUIN
Quoted 1 line
Can you describe 'bad values' in a little more detail.
You're right, some details are missing.
For example, for first control, a playback volume control, value can go from 0 to 63.
Before "store" command, I'd set it to 20.
I've check that in "/var/lib/alsa/asound/state", I had the same value. Here is a part of this file :state.codec { control.1 { comment.access 'read write' comment.type INTEGER comment.count 2 comment.range '0 - 63' iface MIXER name 'HP Playback Volume' value.0 20 value.1 20 }So saved value seems ok.
After "restore" command, I get this :
Quoted 8 lines
$amixer cget numid=1
numid=1,iface=MIXER,name='HP Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=63,step=0 : values=45,45That's why I say that values are not correct.
I'm currently using debian alsa-utils_1.0.16-1_arm package.
It's possible that your codec drivers register caching is borked. This can be easily confirmed with debug in your driver kcontrol code.
If your driver looks ok, then I'd suggest looking into your alsa-lib cross build. There have been some problems with it being incorrectly cross compiled for ARM in the past (pls search the list for details). Fwiw, I use OpenEmbedded to build ALSA for ARM and I've never ran into this issue.
Liam
Quoted 2 lines
It's possible that your codec drivers register caching is borked. This can be easily confirmed with debug in your driver kcontrol code.
Could you detail what you mean ?
One thing is sure : I've always used directly amixer controls and controls values are correctly set.
Thus, these wrong values are constant for each control (for one control, the wrong affected value is not random).
Quoted 5 lines
If your driver looks ok, then I'd suggest looking into your alsa-lib cross build. There have been some problems with it being incorrectly cross compiled for ARM in the past (pls search the list for details). Fwiw, I use OpenEmbedded to build ALSA for ARM and I've never ran into this issue.
I'm looking for recompile it ...
Thanks.
Alex.
Quoted 10 lines
It's possible that your codec drivers register caching is borked. This can be easily confirmed with debug in your driver kcontrol code.
If your driver looks ok, then I'd suggest looking into your alsa-lib cross build. There have been some problems with it being incorrectly cross compiled for ARM in the past (pls search the list for details). Fwiw, I use OpenEmbedded to build ALSA for ARM and I've never ran into this issue.
Liam
Thanks Liam, I've find the issue.
After having learned many things about kcontrols, I've detected that one of my controls rewrites other ones but should not do it with alsactl. As this control aim is for debug, and all my other controls are ok, I can remove it.
alsactl (re)store works fine now ;)
Thanks again.
Alex.