From: lydiawang <lydiawang@viatech.com.cn>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, haraldwelte@viatech.com, lydiawang@viatech.com.cn
Subject: [PATCH 1/1] ALSA: VIA HDA: Fix A-A path mute can't refresh when smart5.1 is enabled.
Date: Thu, 28 Apr 2011 14:54:30 +0800 [thread overview]
Message-ID: <4DB90F26.3020401@viatech.com.cn> (raw)
From: Lydia Wang <lydiawang@viatech.com.cn>
Subject: ALSA: VIA HDA: Fix A-A path mute can't refresh when smart5.1 is enabled.
When Smart5.1 is enabled, A-A path volume should be muted and should be refreshed
in mixer application.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Index: sound-2.6/sound/pci/hda/patch_via.c
===================================================================
--- sound-2.6.orig/sound/pci/hda/patch_via.c 2011-04-28 14:26:11.000000000 +0800
+++ sound-2.6/sound/pci/hda/patch_via.c 2011-04-28 14:44:14.000000000 +0800
@@ -844,14 +844,18 @@
{
int i;
struct snd_ctl_elem_id id;
- const char *labels[] = {"Mic", "Front Mic", "Line"};
+ const char *labels[] = {"Mic", "Front Mic", "Line", "Rear Mic"};
+ struct snd_kcontrol *ctl;
memset(&id, 0, sizeof(id));
id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
for (i = 0; i < ARRAY_SIZE(labels); i++) {
sprintf(id.name, "%s Playback Volume", labels[i]);
- snd_ctl_notify(codec->bus->card, SNDRV_CTL_EVENT_MASK_VALUE,
- &id);
+ ctl = snd_hda_find_mixer_ctl(codec, id.name);
+ if (ctl)
+ snd_ctl_notify(codec->bus->card,
+ SNDRV_CTL_EVENT_MASK_VALUE,
+ &ctl->id);
}
}
next reply other threads:[~2011-04-28 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 6:54 lydiawang [this message]
2011-04-28 7:00 ` [PATCH 1/1] ALSA: VIA HDA: Fix A-A path mute can't refresh when smart5.1 is enabled Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB90F26.3020401@viatech.com.cn \
--to=lydiawang@viatech.com.cn \
--cc=alsa-devel@alsa-project.org \
--cc=haraldwelte@viatech.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.