are these correct so far? analog-output-headphones.conf.patch http://pastebin.com/cSZEpc10
analog-output-speaker.conf.patch http://pastebin.com/0fXR5gmZ ac97_codec.h.patch http://pastebin.com/mkj5tmzN I need your help with the following section, i'm guessing goes in ac97_codec.h but i dont know if it does or where in the file to edit: diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index f4234ed..581000c 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -1886,6 +1886,23 @@ static int patch_ad1981a(struct snd_ac97 *ac97) static const struct snd_kcontrol_new snd_ac97_ad198x_2cmic = AC97_SINGLE("Stereo Mic", AC97_AD_MISC, 6, 1, 0); +#define AD198X_JS1_ST 0x08 +#define AD198X_JS0_ST 0x04 + +void ad198x_handle_hp_jack(struct snd_ac97 *ac97) +{ + bool hp_plugged = (snd_ac97_read(ac97, AC97_AD_JACK_SPDIF) & + AD198X_JS1_ST) == AD198X_JS1_ST; + snd_jack_report(ac97->hp_jack, hp_plugged ? SND_JACK_HEADPHONE : 0); +} + +void ad198x_handle_lo_jack(struct snd_ac97 *ac97) +{ + bool lo_plugged = (snd_ac97_read(ac97, AC97_AD_JACK_SPDIF) & + AD198X_JS0_ST) == AD198X_JS0_ST; + snd_jack_report(ac97->lo_jack, lo_plugged ? SND_JACK_LINEOUT : 0); +} + static int patch_ad1981b_specific(struct snd_ac97 *ac97) { int err; @@ -1894,8 +1911,23 @@ static int patch_ad1981b_specific(struct snd_ac97 *ac97) return err; if (check_list(ac97, ad1981_jacks_blacklist)) return 0; - return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, + err = patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); + if (err < 0) + return err; + if (( err = snd_jack_new(ac97->bus->card, "Headphone", SND_JACK_HEADPHONE, + &ac97->hp_jack, true, false)) < 0) + return err; + ad198x_handle_hp_jack(ac97); + if (( err = snd_jack_new(ac97->bus->card, "Line Out", SND_JACK_LINEOUT, + &ac97->lo_jack, true, false)) < 0) + return err; + ad198x_handle_lo_jack(ac97); + if (( err = snd_jack_new(ac97->bus->card, "SPEAKER", SND_JACK_LINEOUT, + &ac97->sp_jack, true, true)) < 0) + return err; + snd_jack_report(ac97->sp_jack, SND_JACK_LINEOUT); + return 0; } static const struct snd_ac97_build_ops patch_ad1981b_build_ops = { -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/893210 Title: [Dell OptiPlex GX620 - AD1981b, playback] No sound at all To manage notifications about this bug go to: https://bugs.launchpad.net/alsa-driver/+bug/893210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs