Skip to contentSkip to conversation

Re-2: [PATCH 2/6] ASoC: ad1980: fix names of a few kcontrols

DISCUSSION [email protected] 2 participants 2 messages Aug 30, 2010 – Aug 31, 2010

lore
Share & tools
lore
#0 lore raw
Subject: Re: [alsa-devel] [PATCH 2/6] ASoC: ad1980: fix names of a few kcontrols (27-Aug-2010 20:32)
From:    Mark Brown <[email protected]>
To:      [email protected]
Quoted 9 lines · Uwe Kleine-K??nig
Quoted 5 lines

From: Marcus Weigelt <[email protected]>

The names used before keep alsamixer from showing the appropriate controls for the AD1980. Mic and phone volume controls were shown in alsamixers' capture tab where they don??t belong to. Phone playback

It's not massively obvious that microphone and phone aren't inputs and therefore don't sensibly appear in the capture tab?

The volume controls for mic and phone are actually hw mixing volumes that do not affect the recording path, therefore only the record selector belongs to capture tab, but not the volume control.

Quoted 8 lines
Quoted 4 lines

volume did not appear in playback tab and the microphone playback could never be unmuted. Further it was not possible to select phone as capture source. Changing the names fixes these problems.

This doesn't sound real - misnamed controls might cause UI problems but you'd have to try *really* hard to make the control name completely prevent the setting of the control.

May sound unreal, but if you look at the specific changes I´ve done, you will notice that I just added "Playback" to the mic volume and mic switch and changed "Phone Capture" to "Phone Playback". From the ALSA amixer.c I know, that there is some string compare on "playback" and "capture", don´t know if it is the same with the alsamixer, but this would explain the different behaviour after changing the names. I can see the result here - the controls are in the right place now and they are doing what they were supposed to.

Quoted 2 lines

What is the actual problem that is is being fixed here?

- microphone playback could not be unmuted before, that means that the hw mixing path from mic in to spk out/line out could never work - fixed by this
- microphone volume was shown twice in "All" tab of Alsamixer, but running synchroniously, if you change one, the other will follow with the same value - fixed by this
- if microphone voulme was changed in capture tab, the volume also changed in playback tab - fixed by this
- microphone was never shown as active capture source, even if it was selected correctly, neither in capture tab nor in all-tab - fixed by this
- phone was shown as selected capture source in capture tab, but actually it was not selected, instead it was muted/unmuted everytime one tries to select it as capture source - fixed by this

Quoted 34 lines
Quoted 3 lines

Please remember to CC maintaintainers on patches.

Quoted 28 lines
---
 sound/soc/codecs/ad1980.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/ad1980.c +0 -0
index 35c0580..c1550b8 100644
                    SOC_SINGLE("PCM Capture Switch", AC97_REC_GAIN, 15, 1, 

1),
SOC_SINGLE("Mono Playback Volume", AC97_MASTER_MONO, 0, 31, 1), SOC_SINGLE("Mono Playback Switch", AC97_MASTER_MONO, 15, 1, 1),

sound/soc/codecs/ad1980.c +4 -4
-SOC_SINGLE("Phone Capture Volume", AC97_PHONE, 0, 31, 1),
-SOC_SINGLE("Phone Capture Switch", AC97_PHONE, 15, 1, 1),
+SOC_SINGLE("Phone Playback Volume", AC97_PHONE, 0, 31, 1),
+SOC_SINGLE("Phone Playback Switch", AC97_PHONE, 15, 1, 1),
 
-SOC_SINGLE("Mic Volume", AC97_MIC, 0, 31, 1),
-SOC_SINGLE("Mic Switch", AC97_MIC, 15, 1, 1),
+SOC_SINGLE("Mic Playback Volume", AC97_MIC, 0, 31, 1),
+SOC_SINGLE("Mic Playback Switch", AC97_MIC, 15, 1, 1),
 
 SOC_SINGLE("Stereo Mic Switch", AC97_AD_MISC, 6, 1, 0),
 SOC_DOUBLE("Line HP Swap Switch", AC97_AD_MISC, 10, 5, 1, 0),
Signature · 1 line
1.7.1
Quoted 7 lines
Quoted 4 lines

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 1 line
"You grabbed my hand and we fell into it, like a daydream - or a fever."

To: [email protected]
[email protected]
Cc: [email protected]
[email protected]
[email protected]

#1 lore raw

On Mon, Aug 30, 2010 at 11:52:52AM +0000, [email protected] wrote:

[Please fix your MUA to word wrap within paragraphs, I've reflowed the text. Not doing this makes your message very hard to read and reply to.]

Quoted 6 lines
Quoted 2 lines

It's not massively obvious that microphone and phone aren't inputs and therefore don't sensibly appear in the capture tab?

The volume controls for mic and phone are actually hw mixing volumes that do not affect the recording path, therefore only the record selector belongs to capture tab, but not the volume control.

Then these aren't playback controls either - "Bypass" would be more appropriate.

Quoted 5 lines
Quoted 1 line

What is the actual problem that is is being fixed here?

- microphone playback could not be unmuted before, that means that the hw mixing path from mic in to spk out/line out could never work - fixed by this

Could you please provide the output of 'alsactl store -f <filename>' for the case before your changes? Your problem description seems very suprising, you're saying that the control just doesn't appear to userspace at all.

Quoted 3 lines

- microphone volume was shown twice in "All" tab of Alsamixer, but running synchroniously, if you change one, the other will follow with the same value - fixed by this

Again, what is actually going on here? You've renamed controls rather than removing any of them so this feels like randomly changing things to work around some other problem elsewhere in the system.

Quoted 2 lines

- if microphone voulme was changed in capture tab, the volume also changed in playback tab - fixed by this

What is the actual problem? Are these different controls that are being updated in tandem or is the control being displayed multiple times?

Quoted 3 lines

- microphone was never shown as active capture source, even if it was selected correctly, neither in capture tab nor in all-tab - fixed by this

With these you've again not provided any analysis of the actual failure mechanism or how your change helps so it's a bit hard to follow what you believe your patch fixes.

Quoted 3 lines

- phone was shown as selected capture source in capture tab, but actually it was not selected, instead it was muted/unmuted everytime one tries to select it as capture source - fixed by this

I'm having a hard time parsing this but I think you're saying that the phone input was shown as a capture source rather than a playback source?