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

Merge branch 'for-linus' into for-next

+98 -41
+1
sound/core/oss/mixer_oss.c
··· 76 76 snd_card_unref(card); 77 77 return -EFAULT; 78 78 } 79 + snd_card_unref(card); 79 80 return 0; 80 81 } 81 82
+1
sound/core/oss/pcm_oss.c
··· 2454 2454 mutex_unlock(&pcm->open_mutex); 2455 2455 if (err < 0) 2456 2456 goto __error; 2457 + snd_card_unref(pcm->card); 2457 2458 return err; 2458 2459 2459 2460 __error:
+4 -2
sound/core/pcm_native.c
··· 2124 2124 pcm = snd_lookup_minor_data(iminor(inode), 2125 2125 SNDRV_DEVICE_TYPE_PCM_PLAYBACK); 2126 2126 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK); 2127 - snd_card_unref(pcm->card); 2127 + if (pcm) 2128 + snd_card_unref(pcm->card); 2128 2129 return err; 2129 2130 } 2130 2131 ··· 2138 2137 pcm = snd_lookup_minor_data(iminor(inode), 2139 2138 SNDRV_DEVICE_TYPE_PCM_CAPTURE); 2140 2139 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE); 2141 - snd_card_unref(pcm->card); 2140 + if (pcm) 2141 + snd_card_unref(pcm->card); 2142 2142 return err; 2143 2143 } 2144 2144
+1 -1
sound/core/sound.c
··· 114 114 mreg = snd_minors[minor]; 115 115 if (mreg && mreg->type == type) { 116 116 private_data = mreg->private_data; 117 - if (mreg->card_ptr) 117 + if (private_data && mreg->card_ptr) 118 118 atomic_inc(&mreg->card_ptr->refcount); 119 119 } else 120 120 private_data = NULL;
+1 -1
sound/core/sound_oss.c
··· 54 54 mreg = snd_oss_minors[minor]; 55 55 if (mreg && mreg->type == type) { 56 56 private_data = mreg->private_data; 57 - if (mreg->card_ptr) 57 + if (private_data && mreg->card_ptr) 58 58 atomic_inc(&mreg->card_ptr->refcount); 59 59 } else 60 60 private_data = NULL;
+1 -1
sound/i2c/other/ak4113.c
··· 426 426 }, 427 427 { 428 428 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 429 - .name = "IEC958 Preample Capture Default", 429 + .name = "IEC958 Preamble Capture Default", 430 430 .access = SNDRV_CTL_ELEM_ACCESS_READ | 431 431 SNDRV_CTL_ELEM_ACCESS_VOLATILE, 432 432 .info = snd_ak4113_spdif_pinfo,
+1 -1
sound/i2c/other/ak4114.c
··· 401 401 }, 402 402 { 403 403 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 404 - .name = "IEC958 Preample Capture Default", 404 + .name = "IEC958 Preamble Capture Default", 405 405 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 406 406 .info = snd_ak4114_spdif_pinfo, 407 407 .get = snd_ak4114_spdif_pget,
+1 -1
sound/i2c/other/ak4117.c
··· 380 380 }, 381 381 { 382 382 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 383 - .name = "IEC958 Preample Capture Default", 383 + .name = "IEC958 Preamble Capture Default", 384 384 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 385 385 .info = snd_ak4117_spdif_pinfo, 386 386 .get = snd_ak4117_spdif_pget,
+2
sound/pci/es1968.c
··· 2655 2655 { TYPE_MAESTRO2E, 0x1179 }, 2656 2656 { TYPE_MAESTRO2E, 0x14c0 }, /* HP omnibook 4150 */ 2657 2657 { TYPE_MAESTRO2E, 0x1558 }, 2658 + { TYPE_MAESTRO2E, 0x125d }, /* a PCI card, e.g. Terratec DMX */ 2659 + { TYPE_MAESTRO2, 0x125d }, /* a PCI card, e.g. SF64-PCE2 */ 2658 2660 }; 2659 2661 2660 2662 static struct ess_device_list mpu_blacklist[] __devinitdata = {
+2
sound/pci/hda/hda_intel.c
··· 3683 3683 /* Teradici */ 3684 3684 { PCI_DEVICE(0x6549, 0x1200), 3685 3685 .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, 3686 + { PCI_DEVICE(0x6549, 0x2200), 3687 + .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, 3686 3688 /* Creative X-Fi (CA0110-IBG) */ 3687 3689 /* CTHDA chips */ 3688 3690 { PCI_DEVICE(0x1102, 0x0010),
+1
sound/pci/hda/patch_analog.c
··· 545 545 if (spec->multiout.dig_out_nid) { 546 546 info++; 547 547 codec->num_pcms++; 548 + codec->spdif_status_reset = 1; 548 549 info->name = "AD198x Digital"; 549 550 info->pcm_type = HDA_PCM_TYPE_SPDIF; 550 551 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback;
+12 -9
sound/pci/hda/patch_cirrus.c
··· 101 101 #define CS420X_VENDOR_NID 0x11 102 102 #define CS_DIG_OUT1_PIN_NID 0x10 103 103 #define CS_DIG_OUT2_PIN_NID 0x15 104 - #define CS_DMIC1_PIN_NID 0x12 105 - #define CS_DMIC2_PIN_NID 0x0e 104 + #define CS_DMIC1_PIN_NID 0x0e 105 + #define CS_DMIC2_PIN_NID 0x12 106 106 107 107 /* coef indices */ 108 108 #define IDX_SPDIF_STAT 0x0000 ··· 1080 1080 cs_automic(codec, NULL); 1081 1081 1082 1082 coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ 1083 + cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); 1084 + 1085 + coef = cs_vendor_coef_get(codec, IDX_BEEP_CFG); 1083 1086 if (is_active_pin(codec, CS_DMIC2_PIN_NID)) 1084 - coef |= 0x0500; /* DMIC2 2 chan on, GPIO1 off */ 1087 + coef |= 1 << 4; /* DMIC2 2 chan on, GPIO1 off */ 1085 1088 if (is_active_pin(codec, CS_DMIC1_PIN_NID)) 1086 - coef |= 0x1800; /* DMIC1 2 chan on, GPIO0 off 1089 + coef |= 1 << 3; /* DMIC1 2 chan on, GPIO0 off 1087 1090 * No effect if SPDIF_OUT2 is 1088 1091 * selected in IDX_SPDIF_CTL. 1089 1092 */ 1090 - cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); 1093 + 1094 + cs_vendor_coef_set(codec, IDX_BEEP_CFG, coef); 1091 1095 } else { 1092 1096 if (spec->mic_detect) 1093 1097 cs_automic(codec, NULL); ··· 1112 1108 | 0x0400 /* Disable Coefficient Auto increment */ 1113 1109 )}, 1114 1110 /* Beep */ 1115 - {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG}, 1111 + {0x11, AC_VERB_SET_COEF_INDEX, IDX_BEEP_CFG}, 1116 1112 {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ 1117 1113 1118 1114 {} /* terminator */ ··· 1733 1729 1734 1730 } 1735 1731 1736 - static struct snd_kcontrol_new cs421x_capture_source = { 1737 - 1732 + static const struct snd_kcontrol_new cs421x_capture_source = { 1738 1733 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1739 1734 .name = "Capture Source", 1740 1735 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, ··· 1950 1947 } 1951 1948 #endif 1952 1949 1953 - static struct hda_codec_ops cs421x_patch_ops = { 1950 + static const struct hda_codec_ops cs421x_patch_ops = { 1954 1951 .build_controls = cs421x_build_controls, 1955 1952 .build_pcms = cs_build_pcms, 1956 1953 .init = cs421x_init,
+13 -13
sound/pci/hda/patch_realtek.c
··· 5841 5841 return alc_parse_auto_config(codec, alc269_ignore, ssids); 5842 5842 } 5843 5843 5844 - static void alc269_toggle_power_output(struct hda_codec *codec, int power_up) 5844 + static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) 5845 5845 { 5846 5846 int val = alc_read_coef_idx(codec, 0x04); 5847 5847 if (power_up) ··· 5858 5858 if (spec->codec_variant != ALC269_TYPE_ALC269VB) 5859 5859 return; 5860 5860 5861 - if ((alc_get_coef0(codec) & 0x00ff) == 0x017) 5862 - alc269_toggle_power_output(codec, 0); 5863 - if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { 5864 - alc269_toggle_power_output(codec, 0); 5861 + if (spec->codec_variant == ALC269_TYPE_ALC269VB) 5862 + alc269vb_toggle_power_output(codec, 0); 5863 + if (spec->codec_variant == ALC269_TYPE_ALC269VB && 5864 + (alc_get_coef0(codec) & 0x00ff) == 0x018) { 5865 5865 msleep(150); 5866 5866 } 5867 5867 } ··· 5871 5871 { 5872 5872 struct alc_spec *spec = codec->spec; 5873 5873 5874 - if (spec->codec_variant == ALC269_TYPE_ALC269VB || 5874 + if (spec->codec_variant == ALC269_TYPE_ALC269VB) 5875 + alc269vb_toggle_power_output(codec, 0); 5876 + if (spec->codec_variant == ALC269_TYPE_ALC269VB && 5875 5877 (alc_get_coef0(codec) & 0x00ff) == 0x018) { 5876 - alc269_toggle_power_output(codec, 0); 5877 5878 msleep(150); 5878 5879 } 5879 5880 5880 5881 codec->patch_ops.init(codec); 5881 5882 5882 - if (spec->codec_variant == ALC269_TYPE_ALC269VB || 5883 + if (spec->codec_variant == ALC269_TYPE_ALC269VB) 5884 + alc269vb_toggle_power_output(codec, 1); 5885 + if (spec->codec_variant == ALC269_TYPE_ALC269VB && 5883 5886 (alc_get_coef0(codec) & 0x00ff) == 0x017) { 5884 - alc269_toggle_power_output(codec, 1); 5885 5887 msleep(200); 5886 5888 } 5887 - 5888 - if (spec->codec_variant == ALC269_TYPE_ALC269VB || 5889 - (alc_get_coef0(codec) & 0x00ff) == 0x018) 5890 - alc269_toggle_power_output(codec, 1); 5891 5889 5892 5890 snd_hda_codec_resume_amp(codec); 5893 5891 snd_hda_codec_resume_cache(codec); ··· 7078 7080 .patch = patch_alc662 }, 7079 7081 { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, 7080 7082 { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, 7083 + { .id = 0x10ec0668, .name = "ALC668", .patch = patch_alc662 }, 7081 7084 { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, 7082 7085 { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, 7083 7086 { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, ··· 7096 7097 { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc882 }, 7097 7098 { .id = 0x10ec0892, .name = "ALC892", .patch = patch_alc662 }, 7098 7099 { .id = 0x10ec0899, .name = "ALC898", .patch = patch_alc882 }, 7100 + { .id = 0x10ec0900, .name = "ALC1150", .patch = patch_alc882 }, 7099 7101 {} /* terminator */ 7100 7102 }; 7101 7103
+29 -7
sound/pci/hda/patch_via.c
··· 1809 1809 { 1810 1810 struct via_spec *spec = codec->spec; 1811 1811 const struct auto_pin_cfg *cfg = &spec->autocfg; 1812 - int i, dac_num; 1812 + int i; 1813 1813 hda_nid_t nid; 1814 1814 1815 + spec->multiout.num_dacs = 0; 1815 1816 spec->multiout.dac_nids = spec->private_dac_nids; 1816 - dac_num = 0; 1817 1817 for (i = 0; i < cfg->line_outs; i++) { 1818 1818 hda_nid_t dac = 0; 1819 1819 nid = cfg->line_out_pins[i]; ··· 1824 1824 if (!i && parse_output_path(codec, nid, dac, 1, 1825 1825 &spec->out_mix_path)) 1826 1826 dac = spec->out_mix_path.path[0]; 1827 - if (dac) { 1828 - spec->private_dac_nids[i] = dac; 1829 - dac_num++; 1830 - } 1827 + if (dac) 1828 + spec->private_dac_nids[spec->multiout.num_dacs++] = dac; 1831 1829 } 1832 1830 if (!spec->out_path[0].depth && spec->out_mix_path.depth) { 1833 1831 spec->out_path[0] = spec->out_mix_path; 1834 1832 spec->out_mix_path.depth = 0; 1835 1833 } 1836 - spec->multiout.num_dacs = dac_num; 1837 1834 return 0; 1838 1835 } 1839 1836 ··· 3625 3628 */ 3626 3629 enum { 3627 3630 VIA_FIXUP_INTMIC_BOOST, 3631 + VIA_FIXUP_ASUS_G75, 3628 3632 }; 3629 3633 3630 3634 static void via_fixup_intmic_boost(struct hda_codec *codec, ··· 3640 3642 .type = HDA_FIXUP_FUNC, 3641 3643 .v.func = via_fixup_intmic_boost, 3642 3644 }, 3645 + [VIA_FIXUP_ASUS_G75] = { 3646 + .type = HDA_FIXUP_PINS, 3647 + .v.pins = (const struct hda_pintbl[]) { 3648 + /* set 0x24 and 0x33 as speakers */ 3649 + { 0x24, 0x991301f0 }, 3650 + { 0x33, 0x991301f1 }, /* subwoofer */ 3651 + { } 3652 + } 3653 + }, 3643 3654 }; 3644 3655 3645 3656 static const struct snd_pci_quirk vt2002p_fixups[] = { 3657 + SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75), 3646 3658 SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST), 3647 3659 {} 3648 3660 }; 3661 + 3662 + /* NIDs 0x24 and 0x33 on VT1802 have connections to non-existing NID 0x3e 3663 + * Replace this with mixer NID 0x1c 3664 + */ 3665 + static void fix_vt1802_connections(struct hda_codec *codec) 3666 + { 3667 + static hda_nid_t conn_24[] = { 0x14, 0x1c }; 3668 + static hda_nid_t conn_33[] = { 0x1c }; 3669 + 3670 + snd_hda_override_conn_list(codec, 0x24, ARRAY_SIZE(conn_24), conn_24); 3671 + snd_hda_override_conn_list(codec, 0x33, ARRAY_SIZE(conn_33), conn_33); 3672 + } 3649 3673 3650 3674 /* patch for vt2002P */ 3651 3675 static int patch_vt2002P(struct hda_codec *codec) ··· 3683 3663 spec->aa_mix_nid = 0x21; 3684 3664 override_mic_boost(codec, 0x2b, 0, 3, 40); 3685 3665 override_mic_boost(codec, 0x29, 0, 3, 40); 3666 + if (spec->codec_type == VT1802) 3667 + fix_vt1802_connections(codec); 3686 3668 add_secret_dac_path(codec); 3687 3669 3688 3670 snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups);
+6 -1
sound/pci/ice1712/ice1724.c
··· 2866 2866 ice->set_spdif_clock(ice, 0); 2867 2867 } else { 2868 2868 /* internal on-card clock */ 2869 - snd_vt1724_set_pro_rate(ice, ice->pro_rate_default, 1); 2869 + int rate; 2870 + if (ice->cur_rate) 2871 + rate = ice->cur_rate; 2872 + else 2873 + rate = ice->pro_rate_default; 2874 + snd_vt1724_set_pro_rate(ice, rate, 1); 2870 2875 } 2871 2876 2872 2877 update_spdif_bits(ice, ice->pm_saved_spdif_ctrl);
+3 -2
sound/pci/rme9652/hdspm.c
··· 3979 3979 case 8: /* SYNC IN */ 3980 3980 val = hdspm_sync_in_sync_check(hdspm); break; 3981 3981 default: 3982 - val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1); 3982 + val = hdspm_s1_sync_check(hdspm, 3983 + kcontrol->private_value-1); 3983 3984 } 3984 3985 break; 3985 3986 ··· 4900 4899 insel = "Coaxial"; 4901 4900 break; 4902 4901 default: 4903 - insel = "Unkown"; 4902 + insel = "Unknown"; 4904 4903 } 4905 4904 4906 4905 snd_iprintf(buffer,
+1 -1
sound/soc/codecs/cs42l52.c
··· 763 763 if ((freq >= CS42L52_MIN_CLK) && (freq <= CS42L52_MAX_CLK)) { 764 764 cs42l52->sysclk = freq; 765 765 } else { 766 - dev_err(codec->dev, "Invalid freq paramter\n"); 766 + dev_err(codec->dev, "Invalid freq parameter\n"); 767 767 return -EINVAL; 768 768 } 769 769 return 0;
+1 -1
sound/soc/codecs/wm8994.c
··· 3722 3722 } while (count--); 3723 3723 3724 3724 if (count == 0) 3725 - dev_warn(codec->dev, "No impedence range reported for jack\n"); 3725 + dev_warn(codec->dev, "No impedance range reported for jack\n"); 3726 3726 3727 3727 #ifndef CONFIG_SND_SOC_WM8994_MODULE 3728 3728 trace_snd_soc_jack_irq(dev_name(codec->dev));
+13
sound/usb/endpoint.c
··· 35 35 36 36 #define EP_FLAG_ACTIVATED 0 37 37 #define EP_FLAG_RUNNING 1 38 + #define EP_FLAG_STOPPING 2 38 39 39 40 /* 40 41 * snd_usb_endpoint is a model that abstracts everything related to an ··· 503 502 if (alive) 504 503 snd_printk(KERN_ERR "timeout: still %d active urbs on EP #%x\n", 505 504 alive, ep->ep_num); 505 + clear_bit(EP_FLAG_STOPPING, &ep->flags); 506 506 507 507 return 0; 508 + } 509 + 510 + /* sync the pending stop operation; 511 + * this function itself doesn't trigger the stop operation 512 + */ 513 + void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep) 514 + { 515 + if (ep && test_bit(EP_FLAG_STOPPING, &ep->flags)) 516 + wait_clear_urbs(ep); 508 517 } 509 518 510 519 /* ··· 929 918 930 919 if (wait) 931 920 wait_clear_urbs(ep); 921 + else 922 + set_bit(EP_FLAG_STOPPING, &ep->flags); 932 923 } 933 924 } 934 925
+1
sound/usb/endpoint.h
··· 19 19 int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep); 20 20 void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, 21 21 int force, int can_sleep, int wait); 22 + void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep); 22 23 int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep); 23 24 int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep); 24 25 void snd_usb_endpoint_free(struct list_head *head);
+3
sound/usb/pcm.c
··· 565 565 goto unlock; 566 566 } 567 567 568 + snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint); 569 + snd_usb_endpoint_sync_pending_stop(subs->data_endpoint); 570 + 568 571 ret = set_format(subs, subs->cur_audiofmt); 569 572 if (ret < 0) 570 573 goto unlock;