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

Pull sound fixes from Takashi Iwai:
"This is a round of HD-audio fixes: there are a long-standing
regression fix and a few more device/codec-specific quirks.

In addition, a couple of FireWire regression fixes, a USB-audio quirk
for Roland UA-22 and a sanity check in API for user-defined control
elements"

* tag 'sound-4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Don't access stereo amps for mono channel widgets
ALSA: hda - Add workaround for MacBook Air 5,2 built-in mic
ALSA: hda - Set single_adc_amp flag for CS420x codecs
ALSA: snd-usb: add quirks for Roland UA-22
ALSA: control: Add sanity checks for user ctl id name string
ALSA: hda - Fix built-in mic on Compaq Presario CQ60
ALSA: firewire-lib: leave unit reference counting completely
Revert "ALSA: dice: fix wrong offsets for Dice interface"
ALSA: hda - Fix regression of HD-audio controller fallback modes

+82 -22
+4
sound/core/control.c
··· 1170 1170 1171 1171 if (info->count < 1) 1172 1172 return -EINVAL; 1173 + if (!*info->id.name) 1174 + return -EINVAL; 1175 + if (strnlen(info->id.name, sizeof(info->id.name)) >= sizeof(info->id.name)) 1176 + return -EINVAL; 1173 1177 access = info->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : 1174 1178 (info->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE| 1175 1179 SNDRV_CTL_ELEM_ACCESS_INACTIVE|
+9 -9
sound/firewire/dice/dice-interface.h
··· 299 299 #define RX_ISOCHRONOUS 0x008 300 300 301 301 /* 302 + * Index of first quadlet to be interpreted; read/write. If > 0, that many 303 + * quadlets at the beginning of each data block will be ignored, and all the 304 + * audio and MIDI quadlets will follow. 305 + */ 306 + #define RX_SEQ_START 0x00c 307 + 308 + /* 302 309 * The number of audio channels; read-only. There will be one quadlet per 303 310 * channel. 304 311 */ 305 - #define RX_NUMBER_AUDIO 0x00c 312 + #define RX_NUMBER_AUDIO 0x010 306 313 307 314 /* 308 315 * The number of MIDI ports, 0-8; read-only. If > 0, there will be one 309 316 * additional quadlet in each data block, following the audio quadlets. 310 317 */ 311 - #define RX_NUMBER_MIDI 0x010 312 - 313 - /* 314 - * Index of first quadlet to be interpreted; read/write. If > 0, that many 315 - * quadlets at the beginning of each data block will be ignored, and all the 316 - * audio and MIDI quadlets will follow. 317 - */ 318 - #define RX_SEQ_START 0x014 318 + #define RX_NUMBER_MIDI 0x014 319 319 320 320 /* 321 321 * Names of all audio channels; read-only. Quadlets are byte-swapped. Names
+2 -2
sound/firewire/dice/dice-proc.c
··· 99 99 } tx; 100 100 struct { 101 101 u32 iso; 102 + u32 seq_start; 102 103 u32 number_audio; 103 104 u32 number_midi; 104 - u32 seq_start; 105 105 char names[RX_NAMES_SIZE]; 106 106 u32 ac3_caps; 107 107 u32 ac3_enable; ··· 204 204 break; 205 205 snd_iprintf(buffer, "rx %u:\n", stream); 206 206 snd_iprintf(buffer, " iso channel: %d\n", (int)buf.rx.iso); 207 + snd_iprintf(buffer, " sequence start: %u\n", buf.rx.seq_start); 207 208 snd_iprintf(buffer, " audio channels: %u\n", 208 209 buf.rx.number_audio); 209 210 snd_iprintf(buffer, " midi ports: %u\n", buf.rx.number_midi); 210 - snd_iprintf(buffer, " sequence start: %u\n", buf.rx.seq_start); 211 211 if (quadlets >= 68) { 212 212 dice_proc_fixup_string(buf.rx.names, RX_NAMES_SIZE); 213 213 snd_iprintf(buffer, " names: %s\n", buf.rx.names);
+1 -2
sound/firewire/iso-resources.c
··· 26 26 int fw_iso_resources_init(struct fw_iso_resources *r, struct fw_unit *unit) 27 27 { 28 28 r->channels_mask = ~0uLL; 29 - r->unit = fw_unit_get(unit); 29 + r->unit = unit; 30 30 mutex_init(&r->mutex); 31 31 r->allocated = false; 32 32 ··· 42 42 { 43 43 WARN_ON(r->allocated); 44 44 mutex_destroy(&r->mutex); 45 - fw_unit_put(r->unit); 46 45 } 47 46 EXPORT_SYMBOL(fw_iso_resources_destroy); 48 47
+1 -1
sound/pci/hda/hda_controller.c
··· 1164 1164 } 1165 1165 } 1166 1166 1167 - if (!bus->no_response_fallback) 1167 + if (bus->no_response_fallback) 1168 1168 return -1; 1169 1169 1170 1170 if (!chip->polling_mode && chip->poll_count < 2) {
+22 -8
sound/pci/hda/hda_generic.c
··· 692 692 { 693 693 unsigned int caps = query_amp_caps(codec, nid, dir); 694 694 int val = get_amp_val_to_activate(codec, nid, dir, caps, false); 695 - snd_hda_codec_amp_init_stereo(codec, nid, dir, idx, 0xff, val); 695 + 696 + if (get_wcaps(codec, nid) & AC_WCAP_STEREO) 697 + snd_hda_codec_amp_init_stereo(codec, nid, dir, idx, 0xff, val); 698 + else 699 + snd_hda_codec_amp_init(codec, nid, 0, dir, idx, 0xff, val); 700 + } 701 + 702 + /* update the amp, doing in stereo or mono depending on NID */ 703 + static int update_amp(struct hda_codec *codec, hda_nid_t nid, int dir, int idx, 704 + unsigned int mask, unsigned int val) 705 + { 706 + if (get_wcaps(codec, nid) & AC_WCAP_STEREO) 707 + return snd_hda_codec_amp_stereo(codec, nid, dir, idx, 708 + mask, val); 709 + else 710 + return snd_hda_codec_amp_update(codec, nid, 0, dir, idx, 711 + mask, val); 696 712 } 697 713 698 714 /* calculate amp value mask we can modify; ··· 748 732 return; 749 733 750 734 val &= mask; 751 - snd_hda_codec_amp_stereo(codec, nid, dir, idx, mask, val); 735 + update_amp(codec, nid, dir, idx, mask, val); 752 736 } 753 737 754 738 static void activate_amp_out(struct hda_codec *codec, struct nid_path *path, ··· 4440 4424 has_amp = nid_has_mute(codec, mix, HDA_INPUT); 4441 4425 for (i = 0; i < nums; i++) { 4442 4426 if (has_amp) 4443 - snd_hda_codec_amp_stereo(codec, mix, 4444 - HDA_INPUT, i, 4445 - 0xff, HDA_AMP_MUTE); 4427 + update_amp(codec, mix, HDA_INPUT, i, 4428 + 0xff, HDA_AMP_MUTE); 4446 4429 else if (nid_has_volume(codec, conn[i], HDA_OUTPUT)) 4447 - snd_hda_codec_amp_stereo(codec, conn[i], 4448 - HDA_OUTPUT, 0, 4449 - 0xff, HDA_AMP_MUTE); 4430 + update_amp(codec, conn[i], HDA_OUTPUT, 0, 4431 + 0xff, HDA_AMP_MUTE); 4450 4432 } 4451 4433 } 4452 4434
+2
sound/pci/hda/patch_cirrus.c
··· 393 393 SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81), 394 394 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), 395 395 SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101), 396 + SND_PCI_QUIRK(0x106b, 0x5600, "MacBookAir 5,2", CS420X_MBP81), 396 397 SND_PCI_QUIRK(0x106b, 0x5b00, "MacBookAir 4,2", CS420X_MBA42), 397 398 SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), 398 399 {} /* terminator */ ··· 585 584 return -ENOMEM; 586 585 587 586 spec->gen.automute_hook = cs_automute; 587 + codec->single_adc_amp = 1; 588 588 589 589 snd_hda_pick_fixup(codec, cs420x_models, cs420x_fixup_tbl, 590 590 cs420x_fixups);
+11
sound/pci/hda/patch_conexant.c
··· 223 223 CXT_PINCFG_LENOVO_TP410, 224 224 CXT_PINCFG_LEMOTE_A1004, 225 225 CXT_PINCFG_LEMOTE_A1205, 226 + CXT_PINCFG_COMPAQ_CQ60, 226 227 CXT_FIXUP_STEREO_DMIC, 227 228 CXT_FIXUP_INC_MIC_BOOST, 228 229 CXT_FIXUP_HEADPHONE_MIC_PIN, ··· 661 660 .type = HDA_FIXUP_PINS, 662 661 .v.pins = cxt_pincfg_lemote, 663 662 }, 663 + [CXT_PINCFG_COMPAQ_CQ60] = { 664 + .type = HDA_FIXUP_PINS, 665 + .v.pins = (const struct hda_pintbl[]) { 666 + /* 0x17 was falsely set up as a mic, it should 0x1d */ 667 + { 0x17, 0x400001f0 }, 668 + { 0x1d, 0x97a70120 }, 669 + { } 670 + } 671 + }, 664 672 [CXT_FIXUP_STEREO_DMIC] = { 665 673 .type = HDA_FIXUP_FUNC, 666 674 .v.func = cxt_fixup_stereo_dmic, ··· 779 769 }; 780 770 781 771 static const struct snd_pci_quirk cxt5051_fixups[] = { 772 + SND_PCI_QUIRK(0x103c, 0x360b, "Compaq CQ60", CXT_PINCFG_COMPAQ_CQ60), 782 773 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), 783 774 {} 784 775 };
+30
sound/usb/quirks-table.h
··· 1773 1773 } 1774 1774 } 1775 1775 }, 1776 + { 1777 + USB_DEVICE(0x0582, 0x0159), 1778 + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1779 + /* .vendor_name = "Roland", */ 1780 + /* .product_name = "UA-22", */ 1781 + .ifnum = QUIRK_ANY_INTERFACE, 1782 + .type = QUIRK_COMPOSITE, 1783 + .data = (const struct snd_usb_audio_quirk[]) { 1784 + { 1785 + .ifnum = 0, 1786 + .type = QUIRK_AUDIO_STANDARD_INTERFACE 1787 + }, 1788 + { 1789 + .ifnum = 1, 1790 + .type = QUIRK_AUDIO_STANDARD_INTERFACE 1791 + }, 1792 + { 1793 + .ifnum = 2, 1794 + .type = QUIRK_MIDI_FIXED_ENDPOINT, 1795 + .data = & (const struct snd_usb_midi_endpoint_info) { 1796 + .out_cables = 0x0001, 1797 + .in_cables = 0x0001 1798 + } 1799 + }, 1800 + { 1801 + .ifnum = -1 1802 + } 1803 + } 1804 + } 1805 + }, 1776 1806 /* this catches most recent vendor-specific Roland devices */ 1777 1807 { 1778 1808 .match_flags = USB_DEVICE_ID_MATCH_VENDOR |