diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-07-06 22:55:05 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-06 22:55:05 -0400 |
commit | 2b5c0c72ea404d6b554a8284031dd78748314b9e (patch) | |
tree | 468b7f3d8db0abe6a09ee221dce1de5de2bb8d12 /sound/pci | |
parent | 2dbc8a23cc2e677422f6dea991aca4e3d31ab65f (diff) | |
parent | dc53fffc105f68cb08ca872acd51550e89aa2e67 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh/for-2.6.31
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 7 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 28 | ||||
-rw-r--r-- | sound/pci/hda/patch_ca0110.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 24 | ||||
-rw-r--r-- | sound/pci/oxygen/virtuoso.c | 2 |
6 files changed, 52 insertions, 25 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 462e2cedaa6a..26d255de6beb 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -3470,10 +3470,16 @@ int snd_hda_multi_out_analog_open(struct hda_codec *codec, | |||
3470 | } | 3470 | } |
3471 | mutex_lock(&codec->spdif_mutex); | 3471 | mutex_lock(&codec->spdif_mutex); |
3472 | if (mout->share_spdif) { | 3472 | if (mout->share_spdif) { |
3473 | runtime->hw.rates &= mout->spdif_rates; | 3473 | if ((runtime->hw.rates & mout->spdif_rates) && |
3474 | runtime->hw.formats &= mout->spdif_formats; | 3474 | (runtime->hw.formats & mout->spdif_formats)) { |
3475 | if (mout->spdif_maxbps < hinfo->maxbps) | 3475 | runtime->hw.rates &= mout->spdif_rates; |
3476 | hinfo->maxbps = mout->spdif_maxbps; | 3476 | runtime->hw.formats &= mout->spdif_formats; |
3477 | if (mout->spdif_maxbps < hinfo->maxbps) | ||
3478 | hinfo->maxbps = mout->spdif_maxbps; | ||
3479 | } else { | ||
3480 | mout->share_spdif = 0; | ||
3481 | /* FIXME: need notify? */ | ||
3482 | } | ||
3477 | } | 3483 | } |
3478 | mutex_unlock(&codec->spdif_mutex); | 3484 | mutex_unlock(&codec->spdif_mutex); |
3479 | } | 3485 | } |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 4e9ea7080270..1877d95d4aa6 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1454,6 +1454,7 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1454 | mutex_unlock(&chip->open_mutex); | 1454 | mutex_unlock(&chip->open_mutex); |
1455 | return err; | 1455 | return err; |
1456 | } | 1456 | } |
1457 | snd_pcm_limit_hw_rates(runtime); | ||
1457 | spin_lock_irqsave(&chip->reg_lock, flags); | 1458 | spin_lock_irqsave(&chip->reg_lock, flags); |
1458 | azx_dev->substream = substream; | 1459 | azx_dev->substream = substream; |
1459 | azx_dev->running = 0; | 1460 | azx_dev->running = 0; |
@@ -1463,6 +1464,12 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1463 | snd_pcm_set_sync(substream); | 1464 | snd_pcm_set_sync(substream); |
1464 | mutex_unlock(&chip->open_mutex); | 1465 | mutex_unlock(&chip->open_mutex); |
1465 | 1466 | ||
1467 | if (snd_BUG_ON(!runtime->hw.channels_min || !runtime->hw.channels_max)) | ||
1468 | return -EINVAL; | ||
1469 | if (snd_BUG_ON(!runtime->hw.formats)) | ||
1470 | return -EINVAL; | ||
1471 | if (snd_BUG_ON(!runtime->hw.rates)) | ||
1472 | return -EINVAL; | ||
1466 | return 0; | 1473 | return 0; |
1467 | } | 1474 | } |
1468 | 1475 | ||
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 1988582d1ab8..be7d25fa7f35 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -3746,9 +3746,30 @@ static struct snd_kcontrol_new ad1884a_laptop_mixers[] = { | |||
3746 | { } /* end */ | 3746 | { } /* end */ |
3747 | }; | 3747 | }; |
3748 | 3748 | ||
3749 | static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol, | ||
3750 | struct snd_ctl_elem_value *ucontrol) | ||
3751 | { | ||
3752 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
3753 | int ret = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); | ||
3754 | int mute = (!ucontrol->value.integer.value[0] && | ||
3755 | !ucontrol->value.integer.value[1]); | ||
3756 | /* toggle GPIO1 according to the mute state */ | ||
3757 | snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, | ||
3758 | mute ? 0x02 : 0x0); | ||
3759 | return ret; | ||
3760 | } | ||
3761 | |||
3749 | static struct snd_kcontrol_new ad1884a_mobile_mixers[] = { | 3762 | static struct snd_kcontrol_new ad1884a_mobile_mixers[] = { |
3750 | HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), | 3763 | HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), |
3751 | HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), | 3764 | /*HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT),*/ |
3765 | { | ||
3766 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
3767 | .name = "Master Playback Switch", | ||
3768 | .info = snd_hda_mixer_amp_switch_info, | ||
3769 | .get = snd_hda_mixer_amp_switch_get, | ||
3770 | .put = ad1884a_mobile_master_sw_put, | ||
3771 | .private_value = HDA_COMPOSE_AMP_VAL(0x21, 3, 0, HDA_OUTPUT), | ||
3772 | }, | ||
3752 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), | 3773 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), |
3753 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), | 3774 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), |
3754 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x14, 0x0, HDA_INPUT), | 3775 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x14, 0x0, HDA_INPUT), |
@@ -3869,6 +3890,10 @@ static struct hda_verb ad1884a_mobile_verbs[] = { | |||
3869 | /* unsolicited event for pin-sense */ | 3890 | /* unsolicited event for pin-sense */ |
3870 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT}, | 3891 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT}, |
3871 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT}, | 3892 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT}, |
3893 | /* allow to touch GPIO1 (for mute control) */ | ||
3894 | {0x01, AC_VERB_SET_GPIO_MASK, 0x02}, | ||
3895 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x02}, | ||
3896 | {0x01, AC_VERB_SET_GPIO_DATA, 0x02}, /* first muted */ | ||
3872 | { } /* end */ | 3897 | { } /* end */ |
3873 | }; | 3898 | }; |
3874 | 3899 | ||
@@ -3978,6 +4003,7 @@ static struct snd_pci_quirk ad1884a_cfg_tbl[] = { | |||
3978 | SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), | 4003 | SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), |
3979 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), | 4004 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), |
3980 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), | 4005 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), |
4006 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), | ||
3981 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP), | 4007 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP), |
3982 | SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3600, "HP laptop", AD1884A_LAPTOP), | 4008 | SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3600, "HP laptop", AD1884A_LAPTOP), |
3983 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), | 4009 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), |
diff --git a/sound/pci/hda/patch_ca0110.c b/sound/pci/hda/patch_ca0110.c index 392d108c3558..019ca7cb56d7 100644 --- a/sound/pci/hda/patch_ca0110.c +++ b/sound/pci/hda/patch_ca0110.c | |||
@@ -510,7 +510,7 @@ static int ca0110_parse_auto_config(struct hda_codec *codec) | |||
510 | } | 510 | } |
511 | 511 | ||
512 | 512 | ||
513 | int patch_ca0110(struct hda_codec *codec) | 513 | static int patch_ca0110(struct hda_codec *codec) |
514 | { | 514 | { |
515 | struct ca0110_spec *spec; | 515 | struct ca0110_spec *spec; |
516 | int err; | 516 | int err; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3a8e58c483df..e661b21354be 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -12876,20 +12876,11 @@ static struct snd_kcontrol_new alc269_lifebook_mixer[] = { | |||
12876 | { } | 12876 | { } |
12877 | }; | 12877 | }; |
12878 | 12878 | ||
12879 | /* bind volumes of both NID 0x0c and 0x0d */ | ||
12880 | static struct hda_bind_ctls alc269_epc_bind_vol = { | ||
12881 | .ops = &snd_hda_bind_vol, | ||
12882 | .values = { | ||
12883 | HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), | ||
12884 | HDA_COMPOSE_AMP_VAL(0x03, 3, 0, HDA_OUTPUT), | ||
12885 | 0 | ||
12886 | }, | ||
12887 | }; | ||
12888 | |||
12889 | static struct snd_kcontrol_new alc269_eeepc_mixer[] = { | 12879 | static struct snd_kcontrol_new alc269_eeepc_mixer[] = { |
12890 | HDA_CODEC_MUTE("iSpeaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 12880 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
12891 | HDA_BIND_VOL("LineOut Playback Volume", &alc269_epc_bind_vol), | 12881 | HDA_CODEC_MUTE("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), |
12892 | HDA_CODEC_MUTE("LineOut Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 12882 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
12883 | HDA_CODEC_MUTE("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), | ||
12893 | { } /* end */ | 12884 | { } /* end */ |
12894 | }; | 12885 | }; |
12895 | 12886 | ||
@@ -12902,12 +12893,7 @@ static struct snd_kcontrol_new alc269_epc_capture_mixer[] = { | |||
12902 | }; | 12893 | }; |
12903 | 12894 | ||
12904 | /* FSC amilo */ | 12895 | /* FSC amilo */ |
12905 | static struct snd_kcontrol_new alc269_fujitsu_mixer[] = { | 12896 | #define alc269_fujitsu_mixer alc269_eeepc_mixer |
12906 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
12907 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
12908 | HDA_BIND_VOL("PCM Playback Volume", &alc269_epc_bind_vol), | ||
12909 | { } /* end */ | ||
12910 | }; | ||
12911 | 12897 | ||
12912 | static struct hda_verb alc269_quanta_fl1_verbs[] = { | 12898 | static struct hda_verb alc269_quanta_fl1_verbs[] = { |
12913 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | 12899 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, |
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index bf971f7cfdc6..6ebcb6bdd712 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
@@ -635,6 +635,8 @@ static void xonar_d2_resume(struct oxygen *chip) | |||
635 | 635 | ||
636 | static void xonar_d1_resume(struct oxygen *chip) | 636 | static void xonar_d1_resume(struct oxygen *chip) |
637 | { | 637 | { |
638 | oxygen_set_bits8(chip, OXYGEN_FUNCTION, OXYGEN_FUNCTION_RESET_CODEC); | ||
639 | msleep(1); | ||
638 | cs43xx_init(chip); | 640 | cs43xx_init(chip); |
639 | xonar_enable_output(chip); | 641 | xonar_enable_output(chip); |
640 | } | 642 | } |