With the model parsers out of the way, we have no custom unsol
events to worry about, we can therefore simplify the code.
In addition, this fixes a bug on the ASUS TC710, which has only
a headphone jack and a mic jack, but no internal mic or speakers.
Therefore the unsol_event pointer was not set, and as a result,
the jack kcontrols were not correctly updated.
/* unsolicited event for HP jack sensing */
-static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res)
+static void alc_unsol_event(struct hda_codec *codec, unsigned int res)
{
int action;
With the model parsers out of the way, we have no custom unsol
events to worry about, we can therefore simplify the code.
In addition, this fixes a bug on the ASUS TC710, which has only
a headphone jack and a mic jack, but no internal mic or speakers.
Therefore the unsol_event pointer was not set, and as a result,
the jack kcontrols were not correctly updated.
BugLink: https:/ /bugs.launchpad .net/bugs/ 1021192
Signed-off-by: David Henningsson <email address hidden>
---
Alsa-info: /bugs.launchpad .net/ubuntu/ +source/ linux/+ bug/1021192/ +attachment/ 3213783/ +files/ eb1030- bad-alsa- info.log
https:/
sound/ pci/hda/ patch_realtek. c | 21 +++---- ------- -------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/sound/ pci/hda/ patch_realtek. c b/sound/ pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c
index c2ff945..04e9243 100644
--- a/sound/
+++ b/sound/
@@ -174,7 +174,6 @@ struct alc_spec {
/* hooks */ event)( struct hda_codec *codec, unsigned int res); SND_HDA_ POWER_SAVE hook)(struct hda_codec *codec); knob_master( struct hda_codec *codec, hda_nid_t nid)
void (*init_hook)(struct hda_codec *codec);
- void (*unsol_
#ifdef CONFIG_
void (*power_
#endif
@@ -688,7 +687,7 @@ static void alc_update_
}
/* unsolicited event for HP jack sensing */ unsol_event( struct hda_codec *codec, unsigned int res) event(struct hda_codec *codec, unsigned int res)
-static void alc_sku_
+static void alc_unsol_
{
int action;
@@ -1024,11 +1023,9 @@ static void alc_init_ automute( struct hda_codec *codec) lo_possible; >automute_ speaker = spec->automute_ speaker_ possible;
spec->automute_lo = spec->automute_
spec-
- if (spec-> automute_ speaker_ possible || spec->automute_ lo_possible) { automute_ speaker_ possible || spec->automute_ lo_possible) add_automute_ mode_enum( codec); unsol_event;
+ if (spec->
/* create a control for automute mode */
alc_
- spec->unsol_event = alc_sku_
- }
}
/* return the position of NID in the list, or -1 if not found */ auto_mic( struct hda_codec *codec)
@@ -1191,7 +1188,6 @@ static void alc_init_
snd_printdd( "realtek: Enable auto-mic switch on NID 0x%x/0x%x/0x%x\n", unsol_event;
ext, fixed, dock);
- spec->unsol_event = alc_sku_
}
/* check the availabilities of auto-mute and auto-mic switches */
@@ -2062,14 +2058,6 @@ static int alc_init(struct hda_codec *codec)
return 0;
}
-static void alc_unsol_ event(struct hda_codec *codec, unsigned int res) event(codec, res); SND_HDA_ POWER_SAVE power_status( struct hda_codec *codec, hda_nid_t nid) mixer(struct hda_codec *codec) init_std( struct hda_codec *codec) init_multi_ out(codec) ; init_extra_ out(codec) ; init_analog_ input(codec) ; init_input_ src(codec) ; init_digital( codec); codec); codec);
-{
- struct alc_spec *spec = codec->spec;
-
- if (spec->unsol_event)
- spec->unsol_
-}
-
#ifdef CONFIG_
static int alc_check_
{
@@ -4271,14 +4259,12 @@ static void set_capture_
*/
static void alc_auto_
{
- struct alc_spec *spec = codec->spec;
alc_auto_
alc_auto_
alc_auto_
alc_auto_
alc_auto_
- if (spec->unsol_event)
- alc_inithook(
+ alc_inithook(
}
/* fixup_gpio1_ toggle( struct hda_codec *codec, >automute_ speaker = 1; >autocfg. hp_pins[ 0] = 0x0f; /* copy it for automute */ hda_jack_ detect_ enable( codec, 0x0f, ALC_HP_EVENT); unsol_event; hda_gen_ add_verbs( &spec-> gen, alc_gpio1_ init_verbs) ;
@@ -4879,7 +4865,6 @@ static void alc260_
spec-
spec-
snd_
- spec->unsol_event = alc_sku_
snd_
}
}
--
1.7.9.5