Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Add a PC-beep workaround for ASUS P5-V
ALSA: hda - Assume PC-beep as default for Realtek
ALSA: hda - Don't register beep input device when no beep is available
ALSA: hda - Fix pin-detection of Nvidia HDMI

+58 -20
+13
sound/pci/hda/patch_hdmi.c
··· 52 52 */ 53 53 struct hda_multi_out multiout; 54 54 unsigned int codec_type; 55 + 56 + /* misc flags */ 57 + /* PD bit indicates only the update, not the current state */ 58 + unsigned int old_pin_detect:1; 55 59 }; 56 60 57 61 ··· 620 616 * Unsolicited events 621 617 */ 622 618 619 + static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid, 620 + struct hdmi_eld *eld); 621 + 623 622 static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) 624 623 { 625 624 struct hdmi_spec *spec = codec->spec; ··· 638 631 index = hda_node_index(spec->pin, tag); 639 632 if (index < 0) 640 633 return; 634 + 635 + if (spec->old_pin_detect) { 636 + if (pind) 637 + hdmi_present_sense(codec, tag, &spec->sink_eld[index]); 638 + pind = spec->sink_eld[index].monitor_present; 639 + } 641 640 642 641 spec->sink_eld[index].monitor_present = pind; 643 642 spec->sink_eld[index].eld_valid = eldv;
+3
sound/pci/hda/patch_nvhdmi.c
··· 478 478 479 479 codec->spec = spec; 480 480 spec->codec_type = HDA_CODEC_NVIDIA_MCP89; 481 + spec->old_pin_detect = 1; 481 482 482 483 if (hdmi_parse_codec(codec) < 0) { 483 484 codec->spec = NULL; ··· 509 508 spec->multiout.max_channels = 8; 510 509 spec->multiout.dig_out_nid = nvhdmi_master_con_nid_7x; 511 510 spec->codec_type = HDA_CODEC_NVIDIA_MCP7X; 511 + spec->old_pin_detect = 1; 512 512 513 513 codec->patch_ops = nvhdmi_patch_ops_8ch_7x; 514 514 ··· 530 528 spec->multiout.max_channels = 2; 531 529 spec->multiout.dig_out_nid = nvhdmi_master_con_nid_7x; 532 530 spec->codec_type = HDA_CODEC_NVIDIA_MCP7X; 531 + spec->old_pin_detect = 1; 533 532 534 533 codec->patch_ops = nvhdmi_patch_ops_2ch; 535 534
+42 -20
sound/pci/hda/patch_realtek.c
··· 1267 1267 unsigned nid = 0; 1268 1268 struct alc_spec *spec = codec->spec; 1269 1269 1270 + spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ 1271 + 1270 1272 ass = codec->subsystem_id & 0xffff; 1271 - if (ass != codec->bus->pci->subsystem_device && (ass & 1)) { 1272 - spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ 1273 + if (ass != codec->bus->pci->subsystem_device && (ass & 1)) 1273 1274 goto do_sku; 1274 - } 1275 1275 1276 1276 nid = 0x1d; 1277 1277 if (codec->vendor_id == 0x10ec0260) ··· 5180 5180 #ifdef CONFIG_SND_HDA_INPUT_BEEP 5181 5181 #define set_beep_amp(spec, nid, idx, dir) \ 5182 5182 ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir)) 5183 + 5184 + static struct snd_pci_quirk beep_white_list[] = { 5185 + SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), 5186 + {} 5187 + }; 5188 + 5189 + static inline int has_cdefine_beep(struct hda_codec *codec) 5190 + { 5191 + struct alc_spec *spec = codec->spec; 5192 + const struct snd_pci_quirk *q; 5193 + q = snd_pci_quirk_lookup(codec->bus->pci, beep_white_list); 5194 + if (q) 5195 + return q->value; 5196 + return spec->cdefine.enable_pcbeep; 5197 + } 5183 5198 #else 5184 5199 #define set_beep_amp(spec, nid, idx, dir) /* NOP */ 5200 + #define has_cdefine_beep(codec) 0 5185 5201 #endif 5186 5202 5187 5203 /* ··· 10582 10566 } 10583 10567 } 10584 10568 10585 - err = snd_hda_attach_beep_device(codec, 0x1); 10586 - if (err < 0) { 10587 - alc_free(codec); 10588 - return err; 10569 + if (has_cdefine_beep(codec)) { 10570 + err = snd_hda_attach_beep_device(codec, 0x1); 10571 + if (err < 0) { 10572 + alc_free(codec); 10573 + return err; 10574 + } 10589 10575 } 10590 10576 10591 10577 if (board_config != ALC882_AUTO) ··· 10637 10619 10638 10620 set_capture_mixer(codec); 10639 10621 10640 - if (spec->cdefine.enable_pcbeep) 10622 + if (has_cdefine_beep(codec)) 10641 10623 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 10642 10624 10643 10625 if (board_config == ALC882_AUTO) ··· 12453 12435 } 12454 12436 } 12455 12437 12456 - if (!spec->no_analog) { 12438 + if (!spec->no_analog && has_cdefine_beep(codec)) { 12457 12439 err = snd_hda_attach_beep_device(codec, 0x1); 12458 12440 if (err < 0) { 12459 12441 alc_free(codec); ··· 12504 12486 } 12505 12487 if (!spec->cap_mixer && !spec->no_analog) 12506 12488 set_capture_mixer(codec); 12507 - if (!spec->no_analog && spec->cdefine.enable_pcbeep) 12489 + if (!spec->no_analog && has_cdefine_beep(codec)) 12508 12490 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 12509 12491 12510 12492 spec->vmaster_nid = 0x0c; ··· 14476 14458 } 14477 14459 } 14478 14460 14479 - err = snd_hda_attach_beep_device(codec, 0x1); 14480 - if (err < 0) { 14481 - alc_free(codec); 14482 - return err; 14461 + if (has_cdefine_beep(codec)) { 14462 + err = snd_hda_attach_beep_device(codec, 0x1); 14463 + if (err < 0) { 14464 + alc_free(codec); 14465 + return err; 14466 + } 14483 14467 } 14484 14468 14485 14469 if (board_config != ALC269_AUTO) ··· 14514 14494 14515 14495 if (!spec->cap_mixer) 14516 14496 set_capture_mixer(codec); 14517 - if (spec->cdefine.enable_pcbeep) 14497 + if (has_cdefine_beep(codec)) 14518 14498 set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); 14519 14499 14520 14500 if (board_config == ALC269_AUTO) ··· 18711 18691 } 18712 18692 } 18713 18693 18714 - err = snd_hda_attach_beep_device(codec, 0x1); 18715 - if (err < 0) { 18716 - alc_free(codec); 18717 - return err; 18694 + if (has_cdefine_beep(codec)) { 18695 + err = snd_hda_attach_beep_device(codec, 0x1); 18696 + if (err < 0) { 18697 + alc_free(codec); 18698 + return err; 18699 + } 18718 18700 } 18719 18701 18720 18702 if (board_config != ALC662_AUTO) ··· 18738 18716 if (!spec->cap_mixer) 18739 18717 set_capture_mixer(codec); 18740 18718 18741 - if (spec->cdefine.enable_pcbeep) { 18719 + if (has_cdefine_beep(codec)) { 18742 18720 switch (codec->vendor_id) { 18743 18721 case 0x10ec0662: 18744 18722 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);