[alsa-devel] First test of the hda-jack branch
Takashi Iwai
tiwai at suse.de
Fri Nov 11 17:52:06 CET 2011
At Fri, 11 Nov 2011 17:23:32 +0100,
David Henningsson wrote:
>
> Hi Takashi,
>
> After having some troubles with the kernel scripts (on the Ubuntu side)
> I've managed to try out your test/hda-jack branch. I'm attaching a patch
> I had to apply to make the modules load properly.
>
> After having applied the attached patch, I get stuck at an OOPS, which I
> don't have time to troubleshoot further today. I'm attaching the OOPS
> log as well (alsa-info for the system I'm testing on is the same as I
> sent you a few days ago).
Thanks for testing! I obviously didn't test the recent version :-<
Try the patch below.
Takashi
---
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index 1389958..05489dc 100644
--- a/sound/pci/hda/hda_jack.c
+++ b/sound/pci/hda/hda_jack.c
@@ -193,6 +193,8 @@ void snd_hda_jack_report_sync(struct hda_codec *codec)
for (i = 0; i < codec->jacktbl.used; i++, jack++)
if (jack->nid) {
jack_detect_update(codec, jack);
+ if (!jack->kctl)
+ continue;
state = get_jack_plug_state(jack->pin_sense);
snd_kctl_jack_report(codec->bus->card, jack->kctl, state);
}
@@ -341,6 +343,7 @@ int snd_hda_input_jack_add(struct hda_codec *codec, hda_nid_t nid, int type,
err = snd_jack_new(codec->bus->card, name, type, &jack->jack);
if (err < 0)
return err;
+ jack->type = type;
jack->jack->private_data = jack;
jack->jack->private_free = hda_free_jack_priv;
return 0;
@@ -354,7 +357,7 @@ void snd_hda_input_jack_report(struct hda_codec *codec, hda_nid_t nid)
unsigned int present;
int type;
- if (!jack)
+ if (!jack || !jack->jack)
return;
present = snd_hda_jack_detect(codec, nid);
More information about the Alsa-devel
mailing list