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 tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Nothing too exciting here, just a few regression and trivial fixes,
and new quirks for HD-audio and USB-audio.

- HD-audio mute LED mode enum fix
- Fix kernel panic of Digidesign Mbox2 usb-audio quirk (which was new
in 3.8-rc1)
- Creative BT-D1 usb-audio quirk
- mute LED fixup for HP Pavillion 17 laptop"

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
ALSA: au88x0: fix incorrect left shift
sound: oss/pas2: Fix possible access out of array
ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirk
ALSA: usb-audio: Add support for Creative BT-D1 via usb sound quirks
ALSA: hda - Switch "On" and "Off" for "Mute-LED Mode" kcontrol

+67 -17
+5
sound/oss/pas2_card.c
··· 333 333 { 334 334 char temp[100]; 335 335 336 + if (pas_model < 0 || 337 + pas_model >= ARRAY_SIZE(pas_model_names)) { 338 + printk(KERN_ERR "pas2 unrecognized model.\n"); 339 + return; 340 + } 336 341 sprintf(temp, 337 342 "%s rev %d", pas_model_names[(int) pas_model], 338 343 pas_read(0x2789));
+1 -1
sound/pci/au88x0/au88x0_synth.c
··· 58 58 if (en) 59 59 temp |= (1 << (wt & 0x1f)); 60 60 else 61 - temp &= (1 << ~(wt & 0x1f)); 61 + temp &= ~(1 << (wt & 0x1f)); 62 62 hwwrite(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0), temp); 63 63 } 64 64
+1 -1
sound/pci/hda/hda_codec.c
··· 2531 2531 struct snd_ctl_elem_info *uinfo) 2532 2532 { 2533 2533 static const char * const texts[] = { 2534 - "Off", "On", "Follow Master" 2534 + "On", "Off", "Follow Master" 2535 2535 }; 2536 2536 unsigned int index; 2537 2537
+30
sound/pci/hda/patch_realtek.c
··· 5992 5992 spec->automute_hook = alc269_quanta_automute; 5993 5993 } 5994 5994 5995 + /* update mute-LED according to the speaker mute state via mic1 VREF pin */ 5996 + static void alc269_fixup_mic1_mute_hook(void *private_data, int enabled) 5997 + { 5998 + struct hda_codec *codec = private_data; 5999 + unsigned int pinval = AC_PINCTL_IN_EN + (enabled ? 6000 + AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80); 6001 + snd_hda_set_pin_ctl_cache(codec, 0x18, pinval); 6002 + } 6003 + 6004 + static void alc269_fixup_mic1_mute(struct hda_codec *codec, 6005 + const struct alc_fixup *fix, int action) 6006 + { 6007 + struct alc_spec *spec = codec->spec; 6008 + switch (action) { 6009 + case ALC_FIXUP_ACT_BUILD: 6010 + spec->vmaster_mute.hook = alc269_fixup_mic1_mute_hook; 6011 + snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, true); 6012 + /* fallthru */ 6013 + case ALC_FIXUP_ACT_INIT: 6014 + snd_hda_sync_vmaster_hook(&spec->vmaster_mute); 6015 + break; 6016 + } 6017 + } 6018 + 5995 6019 /* update mute-LED according to the speaker mute state via mic2 VREF pin */ 5996 6020 static void alc269_fixup_mic2_mute_hook(void *private_data, int enabled) 5997 6021 { ··· 6067 6043 ALC269_FIXUP_DMIC, 6068 6044 ALC269VB_FIXUP_AMIC, 6069 6045 ALC269VB_FIXUP_DMIC, 6046 + ALC269_FIXUP_MIC1_MUTE_LED, 6070 6047 ALC269_FIXUP_MIC2_MUTE_LED, 6071 6048 ALC269_FIXUP_INV_DMIC, 6072 6049 ALC269_FIXUP_LENOVO_DOCK, ··· 6196 6171 { } 6197 6172 }, 6198 6173 }, 6174 + [ALC269_FIXUP_MIC1_MUTE_LED] = { 6175 + .type = ALC_FIXUP_FUNC, 6176 + .v.func = alc269_fixup_mic1_mute, 6177 + }, 6199 6178 [ALC269_FIXUP_MIC2_MUTE_LED] = { 6200 6179 .type = ALC_FIXUP_FUNC, 6201 6180 .v.func = alc269_fixup_mic2_mute, ··· 6244 6215 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), 6245 6216 SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), 6246 6217 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED), 6218 + SND_PCI_QUIRK(0x103c, 0x1972, "HP Pavilion 17", ALC269_FIXUP_MIC1_MUTE_LED), 6247 6219 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), 6248 6220 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), 6249 6221 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
-4
sound/usb/midi.c
··· 2181 2181 umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; 2182 2182 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); 2183 2183 break; 2184 - case QUIRK_MIDI_MBOX2: 2185 - umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops; 2186 - err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); 2187 - break; 2188 2184 case QUIRK_MIDI_RAW_BYTES: 2189 2185 umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; 2190 2186 /*
+23 -1
sound/usb/quirks-table.h
··· 50 50 } 51 51 }, 52 52 53 + { 54 + /* Creative BT-D1 */ 55 + USB_DEVICE(0x041e, 0x0005), 56 + .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { 57 + .ifnum = 1, 58 + .type = QUIRK_AUDIO_FIXED_ENDPOINT, 59 + .data = &(const struct audioformat) { 60 + .formats = SNDRV_PCM_FMTBIT_S16_LE, 61 + .channels = 2, 62 + .iface = 1, 63 + .altsetting = 1, 64 + .altset_idx = 1, 65 + .endpoint = 0x03, 66 + .ep_attr = USB_ENDPOINT_XFER_ISOC, 67 + .attributes = 0, 68 + .rates = SNDRV_PCM_RATE_CONTINUOUS, 69 + .rate_min = 48000, 70 + .rate_max = 48000, 71 + } 72 + } 73 + }, 74 + 53 75 /* Creative/Toshiba Multimedia Center SB-0500 */ 54 76 { 55 77 USB_DEVICE(0x041e, 0x3048), ··· 3015 2993 }, 3016 2994 { 3017 2995 .ifnum = 6, 3018 - .type = QUIRK_MIDI_MBOX2, 2996 + .type = QUIRK_MIDI_MIDIMAN, 3019 2997 .data = &(const struct snd_usb_midi_endpoint_info) { 3020 2998 .out_ep = 0x02, 3021 2999 .out_cables = 0x0001,
+7 -9
sound/usb/quirks.c
··· 306 306 [QUIRK_MIDI_YAMAHA] = create_any_midi_quirk, 307 307 [QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk, 308 308 [QUIRK_MIDI_NOVATION] = create_any_midi_quirk, 309 - [QUIRK_MIDI_MBOX2] = create_any_midi_quirk, 310 309 [QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk, 311 310 [QUIRK_MIDI_EMAGIC] = create_any_midi_quirk, 312 311 [QUIRK_MIDI_CME] = create_any_midi_quirk, ··· 527 528 #define MBOX2_BOOT_LOADING 0x01 /* Hard coded into the device */ 528 529 #define MBOX2_BOOT_READY 0x02 /* Hard coded into the device */ 529 530 530 - int snd_usb_mbox2_boot_quirk(struct usb_device *dev) 531 + static int snd_usb_mbox2_boot_quirk(struct usb_device *dev) 531 532 { 532 533 struct usb_host_config *config = dev->actconfig; 533 534 int err; 534 - u8 bootresponse; 535 + u8 bootresponse[12]; 535 536 int fwsize; 536 537 int count; 537 538 ··· 545 546 snd_printd("usb-audio: Sending Digidesign Mbox 2 boot sequence...\n"); 546 547 547 548 count = 0; 548 - bootresponse = MBOX2_BOOT_LOADING; 549 - while ((bootresponse == MBOX2_BOOT_LOADING) && (count < 10)) { 549 + bootresponse[0] = MBOX2_BOOT_LOADING; 550 + while ((bootresponse[0] == MBOX2_BOOT_LOADING) && (count < 10)) { 550 551 msleep(500); /* 0.5 second delay */ 551 552 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), 552 553 /* Control magic - load onboard firmware */ 553 554 0x85, 0xc0, 0x0001, 0x0000, &bootresponse, 0x0012); 554 - if (bootresponse == MBOX2_BOOT_READY) 555 + if (bootresponse[0] == MBOX2_BOOT_READY) 555 556 break; 556 557 snd_printd("usb-audio: device not ready, resending boot sequence...\n"); 557 558 count++; 558 559 } 559 560 560 - if (bootresponse != MBOX2_BOOT_READY) { 561 - snd_printk(KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse); 561 + if (bootresponse[0] != MBOX2_BOOT_READY) { 562 + snd_printk(KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse[0]); 562 563 return -ENODEV; 563 564 } 564 565 ··· 658 659 659 660 return 0; /* keep this altsetting */ 660 661 } 661 - 662 662 663 663 static int fasttrackpro_skip_setting_quirk(struct snd_usb_audio *chip, 664 664 int iface, int altno)
-1
sound/usb/usbaudio.h
··· 76 76 QUIRK_MIDI_YAMAHA, 77 77 QUIRK_MIDI_MIDIMAN, 78 78 QUIRK_MIDI_NOVATION, 79 - QUIRK_MIDI_MBOX2, 80 79 QUIRK_MIDI_RAW_BYTES, 81 80 QUIRK_MIDI_EMAGIC, 82 81 QUIRK_MIDI_CME,