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

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: sound/aoa/fabrics/layout.c: remove unneeded kfree
ALSA: hda - Fix error check from snd_hda_get_conn_index() in patch_cirrus.c
ALSA: hda - Don't spew too many ELD errors
ALSA: usb-audio - Fix missing mixer dB information
ALSA: hda - Add "PCM" volume to vmaster slave list
ALSA: hda - Fix duplicated capture-volume creation for ALC268 models
ALSA: ac97: Add HP Compaq dc5100 SFF(PT003AW) to Headphone Jack Sense whitelist
ALSA: snd_usb_caiaq: track submitted output urbs

+76 -39
+1 -1
sound/aoa/fabrics/layout.c
··· 1073 1073 sdev->pcmid = -1; 1074 1074 list_del(&ldev->list); 1075 1075 layouts_list_items--; 1076 + kfree(ldev); 1076 1077 outnodev: 1077 1078 of_node_put(sound); 1078 1079 layout_device = NULL; 1079 - kfree(ldev); 1080 1080 return -ENODEV; 1081 1081 } 1082 1082
+1
sound/pci/ac97/ac97_patch.c
··· 1909 1909 0x103c0944, /* HP nc6220 */ 1910 1910 0x103c0934, /* HP nc8220 */ 1911 1911 0x103c006d, /* HP nx9105 */ 1912 + 0x103c300d, /* HP Compaq dc5100 SFF(PT003AW) */ 1912 1913 0x17340088, /* FSC Scenic-W */ 1913 1914 0 /* end */ 1914 1915 };
+18 -18
sound/pci/hda/alc268_quirks.c
··· 476 476 477 477 static const struct alc_config_preset alc268_presets[] = { 478 478 [ALC267_QUANTA_IL1] = { 479 - .mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer, 480 - alc268_capture_nosrc_mixer }, 479 + .mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer }, 480 + .cap_mixer = alc268_capture_nosrc_mixer, 481 481 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, 482 482 alc267_quanta_il1_verbs }, 483 483 .num_dacs = ARRAY_SIZE(alc268_dac_nids), ··· 492 492 .init_hook = alc_inithook, 493 493 }, 494 494 [ALC268_3ST] = { 495 - .mixers = { alc268_base_mixer, alc268_capture_alt_mixer, 496 - alc268_beep_mixer }, 495 + .mixers = { alc268_base_mixer, alc268_beep_mixer }, 496 + .cap_mixer = alc268_capture_alt_mixer, 497 497 .init_verbs = { alc268_base_init_verbs }, 498 498 .num_dacs = ARRAY_SIZE(alc268_dac_nids), 499 499 .dac_nids = alc268_dac_nids, ··· 507 507 .input_mux = &alc268_capture_source, 508 508 }, 509 509 [ALC268_TOSHIBA] = { 510 - .mixers = { alc268_toshiba_mixer, alc268_capture_alt_mixer, 511 - alc268_beep_mixer }, 510 + .mixers = { alc268_toshiba_mixer, alc268_beep_mixer }, 511 + .cap_mixer = alc268_capture_alt_mixer, 512 512 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, 513 513 alc268_toshiba_verbs }, 514 514 .num_dacs = ARRAY_SIZE(alc268_dac_nids), ··· 525 525 .init_hook = alc_inithook, 526 526 }, 527 527 [ALC268_ACER] = { 528 - .mixers = { alc268_acer_mixer, alc268_capture_alt_mixer, 529 - alc268_beep_mixer }, 528 + .mixers = { alc268_acer_mixer, alc268_beep_mixer }, 529 + .cap_mixer = alc268_capture_alt_mixer, 530 530 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, 531 531 alc268_acer_verbs }, 532 532 .num_dacs = ARRAY_SIZE(alc268_dac_nids), ··· 543 543 .init_hook = alc_inithook, 544 544 }, 545 545 [ALC268_ACER_DMIC] = { 546 - .mixers = { alc268_acer_dmic_mixer, alc268_capture_alt_mixer, 547 - alc268_beep_mixer }, 546 + .mixers = { alc268_acer_dmic_mixer, alc268_beep_mixer }, 547 + .cap_mixer = alc268_capture_alt_mixer, 548 548 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, 549 549 alc268_acer_verbs }, 550 550 .num_dacs = ARRAY_SIZE(alc268_dac_nids), ··· 561 561 .init_hook = alc_inithook, 562 562 }, 563 563 [ALC268_ACER_ASPIRE_ONE] = { 564 - .mixers = { alc268_acer_aspire_one_mixer, 565 - alc268_beep_mixer, 566 - alc268_capture_nosrc_mixer }, 564 + .mixers = { alc268_acer_aspire_one_mixer, alc268_beep_mixer}, 565 + .cap_mixer = alc268_capture_nosrc_mixer, 567 566 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, 568 567 alc268_acer_aspire_one_verbs }, 569 568 .num_dacs = ARRAY_SIZE(alc268_dac_nids), ··· 578 579 .init_hook = alc_inithook, 579 580 }, 580 581 [ALC268_DELL] = { 581 - .mixers = { alc268_dell_mixer, alc268_beep_mixer, 582 - alc268_capture_nosrc_mixer }, 582 + .mixers = { alc268_dell_mixer, alc268_beep_mixer}, 583 + .cap_mixer = alc268_capture_nosrc_mixer, 583 584 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, 584 585 alc268_dell_verbs }, 585 586 .num_dacs = ARRAY_SIZE(alc268_dac_nids), ··· 595 596 .init_hook = alc_inithook, 596 597 }, 597 598 [ALC268_ZEPTO] = { 598 - .mixers = { alc268_base_mixer, alc268_capture_alt_mixer, 599 - alc268_beep_mixer }, 599 + .mixers = { alc268_base_mixer, alc268_beep_mixer }, 600 + .cap_mixer = alc268_capture_alt_mixer, 600 601 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, 601 602 alc268_toshiba_verbs }, 602 603 .num_dacs = ARRAY_SIZE(alc268_dac_nids), ··· 615 616 }, 616 617 #ifdef CONFIG_SND_DEBUG 617 618 [ALC268_TEST] = { 618 - .mixers = { alc268_test_mixer, alc268_capture_mixer }, 619 + .mixers = { alc268_test_mixer }, 620 + .cap_mixer = alc268_capture_mixer, 619 621 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, 620 622 alc268_volume_init_verbs, 621 623 alc268_beep_init_verbs },
+19 -12
sound/pci/hda/hda_eld.c
··· 144 144 SNDRV_PCM_RATE_192000, /* 7: 192000Hz */ 145 145 }; 146 146 147 - static unsigned char hdmi_get_eld_byte(struct hda_codec *codec, hda_nid_t nid, 147 + static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid, 148 148 int byte_index) 149 149 { 150 150 unsigned int val; 151 151 152 152 val = snd_hda_codec_read(codec, nid, 0, 153 153 AC_VERB_GET_HDMI_ELDD, byte_index); 154 - 155 154 #ifdef BE_PARANOID 156 155 printk(KERN_INFO "HDMI: ELD data byte %d: 0x%x\n", byte_index, val); 157 156 #endif 158 - 159 - if ((val & AC_ELDD_ELD_VALID) == 0) { 160 - snd_printd(KERN_INFO "HDMI: invalid ELD data byte %d\n", 161 - byte_index); 162 - val = 0; 163 - } 164 - 165 - return val & AC_ELDD_ELD_DATA; 157 + return val; 166 158 } 167 159 168 160 #define GRAB_BITS(buf, byte, lowbit, bits) \ ··· 336 344 if (!buf) 337 345 return -ENOMEM; 338 346 339 - for (i = 0; i < size; i++) 340 - buf[i] = hdmi_get_eld_byte(codec, nid, i); 347 + for (i = 0; i < size; i++) { 348 + unsigned int val = hdmi_get_eld_data(codec, nid, i); 349 + if (!(val & AC_ELDD_ELD_VALID)) { 350 + if (!i) { 351 + snd_printd(KERN_INFO 352 + "HDMI: invalid ELD data\n"); 353 + ret = -EINVAL; 354 + goto error; 355 + } 356 + snd_printd(KERN_INFO 357 + "HDMI: invalid ELD data byte %d\n", i); 358 + val = 0; 359 + } else 360 + val &= AC_ELDD_ELD_DATA; 361 + buf[i] = val; 362 + } 341 363 342 364 ret = hdmi_update_eld(eld, buf, size); 343 365 366 + error: 344 367 kfree(buf); 345 368 return ret; 346 369 }
+5 -3
sound/pci/hda/patch_cirrus.c
··· 375 375 static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin, 376 376 unsigned int *idxp) 377 377 { 378 - int i; 378 + int i, idx; 379 379 hda_nid_t nid; 380 380 381 381 nid = codec->start_nid; ··· 384 384 type = get_wcaps_type(get_wcaps(codec, nid)); 385 385 if (type != AC_WID_AUD_IN) 386 386 continue; 387 - *idxp = snd_hda_get_conn_index(codec, nid, pin, false); 388 - if (*idxp >= 0) 387 + idx = snd_hda_get_conn_index(codec, nid, pin, false); 388 + if (idx >= 0) { 389 + *idxp = idx; 389 390 return nid; 391 + } 390 392 } 391 393 return 0; 392 394 }
+2
sound/pci/hda/patch_realtek.c
··· 1784 1784 "Speaker Playback Volume", 1785 1785 "Mono Playback Volume", 1786 1786 "Line-Out Playback Volume", 1787 + "PCM Playback Volume", 1787 1788 NULL, 1788 1789 }; 1789 1790 ··· 1799 1798 "Mono Playback Switch", 1800 1799 "IEC958 Playback Switch", 1801 1800 "Line-Out Playback Switch", 1801 + "PCM Playback Switch", 1802 1802 NULL, 1803 1803 }; 1804 1804
+27 -4
sound/usb/caiaq/audio.c
··· 139 139 140 140 for (i = 0; i < N_URBS; i++) { 141 141 usb_kill_urb(dev->data_urbs_in[i]); 142 - usb_kill_urb(dev->data_urbs_out[i]); 142 + 143 + if (test_bit(i, &dev->outurb_active_mask)) 144 + usb_kill_urb(dev->data_urbs_out[i]); 143 145 } 146 + 147 + dev->outurb_active_mask = 0; 144 148 } 145 149 146 150 static int snd_usb_caiaq_substream_open(struct snd_pcm_substream *substream) ··· 616 612 { 617 613 struct snd_usb_caiaq_cb_info *info = urb->context; 618 614 struct snd_usb_caiaqdev *dev; 619 - struct urb *out; 620 - int frame, len, send_it = 0, outframe = 0; 615 + struct urb *out = NULL; 616 + int i, frame, len, send_it = 0, outframe = 0; 621 617 size_t offset = 0; 622 618 623 619 if (urb->status || !info) ··· 628 624 if (!dev->streaming) 629 625 return; 630 626 631 - out = dev->data_urbs_out[info->index]; 627 + /* find an unused output urb that is unused */ 628 + for (i = 0; i < N_URBS; i++) 629 + if (test_and_set_bit(i, &dev->outurb_active_mask) == 0) { 630 + out = dev->data_urbs_out[i]; 631 + break; 632 + } 633 + 634 + if (!out) { 635 + log("Unable to find an output urb to use\n"); 636 + goto requeue; 637 + } 632 638 633 639 /* read the recently received packet and send back one which has 634 640 * the same layout */ ··· 669 655 out->number_of_packets = outframe; 670 656 out->transfer_flags = URB_ISO_ASAP; 671 657 usb_submit_urb(out, GFP_ATOMIC); 658 + } else { 659 + struct snd_usb_caiaq_cb_info *oinfo = out->context; 660 + clear_bit(oinfo->index, &dev->outurb_active_mask); 672 661 } 673 662 663 + requeue: 674 664 /* re-submit inbound urb */ 675 665 for (frame = 0; frame < FRAMES_PER_URB; frame++) { 676 666 urb->iso_frame_desc[frame].offset = BYTES_PER_FRAME * frame; ··· 696 678 dev->output_running = 1; 697 679 wake_up(&dev->prepare_wait_queue); 698 680 } 681 + 682 + clear_bit(info->index, &dev->outurb_active_mask); 699 683 } 700 684 701 685 static struct urb **alloc_urbs(struct snd_usb_caiaqdev *dev, int dir, int *ret) ··· 848 828 849 829 if (!dev->data_cb_info) 850 830 return -ENOMEM; 831 + 832 + dev->outurb_active_mask = 0; 833 + BUILD_BUG_ON(N_URBS > (sizeof(dev->outurb_active_mask) * 8)); 851 834 852 835 for (i = 0; i < N_URBS; i++) { 853 836 dev->data_cb_info[i].dev = dev;
+1
sound/usb/caiaq/device.h
··· 96 96 int input_panic, output_panic, warned; 97 97 char *audio_in_buf, *audio_out_buf; 98 98 unsigned int samplerates, bpp; 99 + unsigned long outurb_active_mask; 99 100 100 101 struct snd_pcm_substream *sub_playback[MAX_STREAMS]; 101 102 struct snd_pcm_substream *sub_capture[MAX_STREAMS];
+2 -1
sound/usb/mixer.c
··· 152 152 if (p && p->dB) { 153 153 cval->dBmin = p->dB->min; 154 154 cval->dBmax = p->dB->max; 155 + cval->initialized = 1; 155 156 } 156 157 } 157 158 ··· 1093 1092 " Switch" : " Volume"); 1094 1093 if (control == UAC_FU_VOLUME) { 1095 1094 check_mapped_dB(map, cval); 1096 - if (cval->dBmin < cval->dBmax) { 1095 + if (cval->dBmin < cval->dBmax || !cval->initialized) { 1097 1096 kctl->tlv.c = mixer_vol_tlv; 1098 1097 kctl->vd[0].access |= 1099 1098 SNDRV_CTL_ELEM_ACCESS_TLV_READ |