[ASUS TC710] Broken jack sense

Bug #1021192 reported by David Henningsson on 2012-07-05
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
David Henningsson

Bug Description

The jack sense does not update, leading to the headphone/mic not showing up unless it is plugged in at boot time.

David Henningsson (diwic) wrote :
Changed in alsa-driver (Ubuntu):
assignee: nobody → David Henningsson (diwic)
status: New → In Progress
David Henningsson (diwic) wrote :
affects: alsa-driver (Ubuntu) → linux (Ubuntu)
Download full text (3.4 KiB)

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:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1021192/+attachment/3213783/+files/eb1030-bad-alsa-info.log

 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
index c2ff945..04e9243 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -174,7 +174,6 @@ struct alc_spec {

  /* hooks */
  void (*init_hook)(struct hda_codec *codec);
- void (*unsol_event)(struct hda_codec *codec, unsigned int res);
 #ifdef CONFIG_SND_HDA_POWER_SAVE
  void (*power_hook)(struct hda_codec *codec);
 #endif
@@ -688,7 +687,7 @@ static void alc_update_knob_master(struct hda_codec *codec, hda_nid_t nid)
 }

 /* 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;

@@ -1024,11 +1023,9 @@ static void alc_init_automute(struct hda_codec *codec)
  spec->automute_lo = spec->automute_lo_possible;
  spec->automute_speaker = spec->automute_speaker_possible;

- if (spec->automute_speaker_possible || spec->automute_lo_possible) {
+ if (spec->automute_speaker_possible || spec->automute_lo_possible)
   /* create a control for automute mode */
   alc_add_automute_mode_enum(codec);
- spec->unsol_event = alc_sku_unsol_event;
- }
 }

 /* return the position of NID in the list, or -1 if not found */
@@ -1191,7 +1188,6 @@ static void alc_init_auto_mic(struct hda_codec *codec)

  snd_printdd("realtek: Enable auto-mic switch on NID 0x%x/0x%x/0x%x\n",
       ext, fixed, dock);
- spec->unsol_event = alc_sku_unsol_event;
 }

 /* 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)
-{
- struct alc_spec *spec = codec->spec;
-
- if (spec->unsol_event)
- spec->unsol_event(codec, res);
-}
-
 #ifdef CONFIG_SND_HDA_POWER_SAVE
 static int alc_check_power_status(struct hda_codec *codec, hda_nid_t nid)
 {
@@ -4271,14 +4259,12 @@ static void set_capture_mixer(struct hda_codec *codec)
  */
 static void alc_auto_init_std(struct hda_codec *codec)
 {
- struct alc_spec *spec = codec->spec;
  alc_auto_init_multi_out(codec);
  alc_auto_init_extra_out(codec);
  alc_auto_init_analog_input(codec);
  alc_auto_init_input_src(codec);
  alc_auto_init_digital(codec);
- if (spec->unsol_event)
- alc_inithook(codec);
+ alc_inithook(codec);
 }

 /*
@@ -4879,7 +4865,6 @@ static void alc260_fixup_gpio1_toggle(struct hda_codec *codec,
   spec->autom...

Read more...

David Henningsson (diwic) wrote :

On 07/05/2012 12:00 PM, David Henningsson wrote:
> 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:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1021192/+attachment/3213783/+files/eb1030-bad-alsa-info.log

Hmm, maybe the subject line should have said "ALSA: hda - Always call
standard unsolicited event for Realtek codecs" for clarity.

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

David Henningsson (diwic) wrote :
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
tags: added: patch
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: blocks-hwcert-enablement
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.5.0-14.15

---------------
linux (3.5.0-14.15) quantal-proposed; urgency=low

  [ Andy Whitcroft ]

  * SAUCE: fs: d_revalidate methods may be passed a NULL nameidata
    - LP: #1038075

  [ Dave Airlie ]

  * SAUCE: drm/vmwgfx: add MODULE_DEVICE_TABLE so vmwgfx loads at boot
    - LP: #1039157

  [ Ike Panhc ]

  * [Config] Enable CONFIG_DEVPTS_MULTIPLE_INSTANCES for highbank
    - LP: #1038259

  [ Tim Gardner ]

  * SAUCE: wlcore: Declare MODULE_FIRMWARE usage
    - LP: #1042918

  [ Upstream Kernel Changes ]

  * asus-nb-wmi: add some video toggle keys
    - LP: #1022427
  * [media] uvcvideo: Fix frame drop in bulk video stream
  * [media] uvcvideo: Fix alternate setting selection
  * Input: wacom - add support to Cintiq 22HD
    - LP: #1043733
  * ALSA: HDA: Create phantom jacks for fixed inputs and outputs
  * ALSA: HDA: Support single 3-pin jack without VREF on the actual pin
    - LP: #1018262
  * ALSA: hda - give 3-pin jack the name "Headphone Mic Jack"
  * ALSA: hda - Do not set GPIOs for speakers on IDT if there are no
    speakers
    - LP: #1040077
  * ALSA: hda - Fix pop noise in headphones on S3 for Asus X55A, X55V
    - LP: #1034779
  * ALSA: hda - Always call standard unsolicited event for Realtek codecs
    - LP: #1021192
  * ALSA: hda - Add the inverted digital mic workaround to Realtek codecs
  * ALSA: hda - Add inverted mic quirks for Asus U41SV, Acer 1810TZ and
    AOD260
    - LP: #1006089, #996611, #997227
  * ALSA: hda - don't create dysfunctional mixer controls for ca0132
    - LP: #1038651
  * ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxx
 -- Leann Ogasawara <email address hidden> Thu, 06 Sep 2012 10:06:28 -0700

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers