* [PATCH] hda: 92hd71xxx disable unmute support for codecs that don't have input amps.
@ 2009-01-24 19:19 Matthew Ranostay
2009-01-26 9:00 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Ranostay @ 2009-01-24 19:19 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai
Some revisions of the 92hd71xxx codec families don't have input amps on ports
0xa, 0xd and 0xf, so probe the widget caps on port 0xa and check for support,
if found run snd_hda_sequence_write() on the stac92hd71xxx_unmute_core_init verb
list.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
---
sound/pci/hda/patch_sigmatel.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 80a4c28..ffef091 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -858,26 +858,25 @@ static struct hda_verb stac92hd83xxx_core_init[] = {
static struct hda_verb stac92hd71bxx_core_init[] = {
/* set master volume and direct control */
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
- /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */
- { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
- { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
- { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{}
};
-#define HD_DISABLE_PORTF 2
+#define HD_DISABLE_PORTF 1
static struct hda_verb stac92hd71bxx_analog_core_init[] = {
/* start of config #1 */
/* connect port 0f to audio mixer */
{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2},
- /* unmute right and left channels for node 0x0f */
- { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
/* start of config #2 */
/* set master volume and direct control */
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
- /* unmute right and left channels for nodes 0x0a, 0xd */
+ {}
+};
+
+static struct hda_verb stac92hd71bxx_unmute_core_init[] = {
+ /* unmute right and left channels for nodes 0x0f, 0xa, 0x0d */
+ { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{}
@@ -4942,6 +4941,7 @@ static struct hda_input_mux stac92hd71bxx_dmux = {
static int patch_stac92hd71bxx(struct hda_codec *codec)
{
struct sigmatel_spec *spec;
+ struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init;
int err = 0;
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
@@ -5015,6 +5015,7 @@ again:
/* disable VSW */
spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF];
+ unmute_init++;
stac_change_pin_config(codec, 0xf, 0x40f000f0);
break;
case 0x111d7603: /* 6 Port with Analog Mixer */
@@ -5031,6 +5032,9 @@ again:
codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
}
+ if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP)
+ snd_hda_sequence_write(codec, unmute_init);
+
spec->aloopback_mask = 0x50;
spec->aloopback_shift = 0;
--
1.5.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] hda: 92hd71xxx disable unmute support for codecs that don't have input amps.
2009-01-24 19:19 [PATCH] hda: 92hd71xxx disable unmute support for codecs that don't have input amps Matthew Ranostay
@ 2009-01-26 9:00 ` Takashi Iwai
2009-01-26 11:51 ` Matthew Ranostay
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2009-01-26 9:00 UTC (permalink / raw)
To: Matthew Ranostay; +Cc: alsa-devel
At Sat, 24 Jan 2009 14:19:31 -0500,
Matthew Ranostay wrote:
>
> @@ -5031,6 +5032,9 @@ again:
> codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
> }
>
> + if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP)
> + snd_hda_sequence_write(codec, unmute_init);
This sequence should be cached so that it'll be replayed at
suspend/resume.
Could you fix and repost?
thanks,
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hda: 92hd71xxx disable unmute support for codecs that don't have input amps.
2009-01-26 9:00 ` Takashi Iwai
@ 2009-01-26 11:51 ` Matthew Ranostay
0 siblings, 0 replies; 5+ messages in thread
From: Matthew Ranostay @ 2009-01-26 11:51 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Takashi Iwai wrote:
> At Sat, 24 Jan 2009 14:19:31 -0500,
> Matthew Ranostay wrote:
>> @@ -5031,6 +5032,9 @@ again:
>> codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
>> }
>>
>> + if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP)
>> + snd_hda_sequence_write(codec, unmute_init);
>
> This sequence should be cached so that it'll be replayed at
> suspend/resume.
>
Good catch, can't believe I missed that.
> Could you fix and repost?
>
Yep.
Thanks,
Matt Ranostay
>
> thanks,
>
> Takashi
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] hda: 92hd71xxx disable unmute support for codecs that don't have input amps.
@ 2009-01-26 14:33 Matthew Ranostay
2009-01-26 15:51 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Ranostay @ 2009-01-26 14:33 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai
Some revisions of the 92hd71xxx codec families don't have input amps on ports
0xa, 0xd and 0xf, so probe the widget caps on port 0xa and check for support,
if found run snd_hda_sequence_write_cache() on the stac92hd71xxx_unmute_core_init
verb list.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
---
sound/pci/hda/patch_sigmatel.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 80a4c28..ffef091 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -858,26 +858,25 @@ static struct hda_verb stac92hd83xxx_core_init[] = {
static struct hda_verb stac92hd71bxx_core_init[] = {
/* set master volume and direct control */
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
- /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */
- { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
- { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
- { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{}
};
-#define HD_DISABLE_PORTF 2
+#define HD_DISABLE_PORTF 1
static struct hda_verb stac92hd71bxx_analog_core_init[] = {
/* start of config #1 */
/* connect port 0f to audio mixer */
{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2},
- /* unmute right and left channels for node 0x0f */
- { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
/* start of config #2 */
/* set master volume and direct control */
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
- /* unmute right and left channels for nodes 0x0a, 0xd */
+ {}
+};
+
+static struct hda_verb stac92hd71bxx_unmute_core_init[] = {
+ /* unmute right and left channels for nodes 0x0f, 0xa, 0x0d */
+ { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{}
@@ -4942,6 +4941,7 @@ static struct hda_input_mux stac92hd71bxx_dmux = {
static int patch_stac92hd71bxx(struct hda_codec *codec)
{
struct sigmatel_spec *spec;
+ struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init;
int err = 0;
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
@@ -5015,6 +5015,7 @@ again:
/* disable VSW */
spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF];
+ unmute_init++;
stac_change_pin_config(codec, 0xf, 0x40f000f0);
break;
case 0x111d7603: /* 6 Port with Analog Mixer */
@@ -5031,6 +5032,9 @@ again:
codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
}
+ if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP)
+ snd_hda_sequence_write_cache(codec, unmute_init);
+
spec->aloopback_mask = 0x50;
spec->aloopback_shift = 0;
--
1.5.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] hda: 92hd71xxx disable unmute support for codecs that don't have input amps.
2009-01-26 14:33 Matthew Ranostay
@ 2009-01-26 15:51 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2009-01-26 15:51 UTC (permalink / raw)
To: Matthew Ranostay; +Cc: alsa-devel
At Mon, 26 Jan 2009 09:33:52 -0500,
Matthew Ranostay wrote:
>
> Some revisions of the 92hd71xxx codec families don't have input amps on ports
> 0xa, 0xd and 0xf, so probe the widget caps on port 0xa and check for support,
> if found run snd_hda_sequence_write_cache() on the stac92hd71xxx_unmute_core_init
> verb list.
>
> Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-01-26 15:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-24 19:19 [PATCH] hda: 92hd71xxx disable unmute support for codecs that don't have input amps Matthew Ranostay
2009-01-26 9:00 ` Takashi Iwai
2009-01-26 11:51 ` Matthew Ranostay
-- strict thread matches above, loose matches on Subject: below --
2009-01-26 14:33 Matthew Ranostay
2009-01-26 15:51 ` Takashi Iwai
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.