[alsa-devel] Strange control interactions on Tegra Harmony

Stephen Warren swarren at nvidia.com
Thu Jan 27 19:20:22 CET 2011


I performed some testing on the patch to enable Harmony's internal speaker
that I recently posted, and found a few strange interactions between the
mixer controls.

The relevant controls that appear are in alsamixer are:

Headphone (mute + volume) [default: unmuted, high volume]

Speaker   (mute + volume) [default: unmuted, high volume]

Left/Right Speaker Mixer DACL/DACR/Left Bypass/Right Bypass
(switch, default muted/off)

Now, if I start playing something, and go enable Right Speaker Mixer DACR, I
hear the sound on the speaker. Muting this control turns off the speaker.
However, unmuting again doesn't turn the speaker back on.

This exact same behavior is seen for Right Speaker Mixer DACL/Left Bypass. For
Left Bypass at least, that's odd, since the ADC path shouldn't be active to
Capture anything and bypass it back, and there's no mic attached.

The Right Speaker Right Bypass control works the first and all subsequent
times. Perhaps that's something to do with it being the last entry in
wm8903.c's right_speaker_mixer[] array?

Finally, the muting either the Headphone and Speaker controls actually affects
both the headphone and speaker outputs in all cases, rather than just the
output the control is named for.

I briefly started to debug this, and notice that the SND_SOC_DAPM_SPK event
function isn't being called at all in the cases where muting doesn't toggle
as expected.

I didn't manage to trace the code through the entire ASoc code-base yet, but
initial indications were that some register writes for the speaker mixer
routing setup weren't sticking - i.e. I'd toggle a control to unmuted, exit
alsamixer, restart alsamixer, and the control wouldn't be in the state I'd
placed it.

Can you comment on this? I can certainly continue to debug it, but I figured
it might be immediately obvious to you what the problem was e.g. if the same
thing had happened on other platforms/codecs.



More information about the Alsa-devel mailing list