Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1a74571 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: do not set DEVNAME for OSS devices
  ALSA: hda - Add sanity check in PCM open callback
  ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
  ALSA: hda - Avoid invalid formats and rates with shared SPDIF
  ALSA: hda - Improve ASUS eeePC 1000 mixer
  ALSA: hda - Add GPIO1 control at muting with HP laptops
  ALSA: usx2y - reparent sound device
  ALSA: snd_usb_caiaq: reparent sound device
  sound: virtuoso: fix Xonar D1/DX silence after resume
  ASoC: Only disable pxa2xx-i2s clocks if we enabled them
  ALSA: hda - Add quirk for HP 6930p
  ALSA: hda - Add missing static to patch_ca0110()
  ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
  ASoC: remove BROKEN from Efika and pcm030 fabric drivers
  ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig
parents 29f31773 7ce1695c
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -3470,10 +3470,16 @@ int snd_hda_multi_out_analog_open(struct hda_codec *codec,
		}
		mutex_lock(&codec->spdif_mutex);
		if (mout->share_spdif) {
			if ((runtime->hw.rates & mout->spdif_rates) &&
			    (runtime->hw.formats & mout->spdif_formats)) {
				runtime->hw.rates &= mout->spdif_rates;
				runtime->hw.formats &= mout->spdif_formats;
				if (mout->spdif_maxbps < hinfo->maxbps)
					hinfo->maxbps = mout->spdif_maxbps;
			} else {
				mout->share_spdif = 0;
				/* FIXME: need notify? */
			}
		}
		mutex_unlock(&codec->spdif_mutex);
	}
+7 −0
Original line number Diff line number Diff line
@@ -1454,6 +1454,7 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
		mutex_unlock(&chip->open_mutex);
		return err;
	}
	snd_pcm_limit_hw_rates(runtime);
	spin_lock_irqsave(&chip->reg_lock, flags);
	azx_dev->substream = substream;
	azx_dev->running = 0;
@@ -1463,6 +1464,12 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
	snd_pcm_set_sync(substream);
	mutex_unlock(&chip->open_mutex);

	if (snd_BUG_ON(!runtime->hw.channels_min || !runtime->hw.channels_max))
		return -EINVAL;
	if (snd_BUG_ON(!runtime->hw.formats))
		return -EINVAL;
	if (snd_BUG_ON(!runtime->hw.rates))
		return -EINVAL;
	return 0;
}

+27 −1
Original line number Diff line number Diff line
@@ -3746,9 +3746,30 @@ static struct snd_kcontrol_new ad1884a_laptop_mixers[] = {
	{ } /* end */
};

static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol,
				        struct snd_ctl_elem_value *ucontrol)
{
	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
	int ret = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol);
	int mute = (!ucontrol->value.integer.value[0] &&
		    !ucontrol->value.integer.value[1]);
	/* toggle GPIO1 according to the mute state */
	snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
			    mute ? 0x02 : 0x0);
	return ret;
}

static struct snd_kcontrol_new ad1884a_mobile_mixers[] = {
	HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT),
	HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT),
	/*HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT),*/
	{
		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name = "Master Playback Switch",
		.info = snd_hda_mixer_amp_switch_info,
		.get = snd_hda_mixer_amp_switch_get,
		.put = ad1884a_mobile_master_sw_put,
		.private_value = HDA_COMPOSE_AMP_VAL(0x21, 3, 0, HDA_OUTPUT),
	},
	HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT),
	HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT),
	HDA_CODEC_VOLUME("Mic Capture Volume", 0x14, 0x0, HDA_INPUT),
@@ -3869,6 +3890,10 @@ static struct hda_verb ad1884a_mobile_verbs[] = {
	/* unsolicited event for pin-sense */
	{0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT},
	{0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT},
	/* allow to touch GPIO1 (for mute control) */
	{0x01, AC_VERB_SET_GPIO_MASK, 0x02},
	{0x01, AC_VERB_SET_GPIO_DIRECTION, 0x02},
	{0x01, AC_VERB_SET_GPIO_DATA, 0x02}, /* first muted */
	{ } /* end */
};

@@ -3978,6 +4003,7 @@ static struct snd_pci_quirk ad1884a_cfg_tbl[] = {
	SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP),
	SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
	SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE),
	SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP),
	SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP),
	SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3600, "HP laptop", AD1884A_LAPTOP),
	SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD),
+1 −1
Original line number Diff line number Diff line
@@ -510,7 +510,7 @@ static int ca0110_parse_auto_config(struct hda_codec *codec)
}


int patch_ca0110(struct hda_codec *codec)
static int patch_ca0110(struct hda_codec *codec)
{
	struct ca0110_spec *spec;
	int err;
+5 −19
Original line number Diff line number Diff line
@@ -12876,20 +12876,11 @@ static struct snd_kcontrol_new alc269_lifebook_mixer[] = {
	{ }
};
/* bind volumes of both NID 0x0c and 0x0d */
static struct hda_bind_ctls alc269_epc_bind_vol = {
	.ops = &snd_hda_bind_vol,
	.values = {
		HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT),
		HDA_COMPOSE_AMP_VAL(0x03, 3, 0, HDA_OUTPUT),
		0
	},
};
static struct snd_kcontrol_new alc269_eeepc_mixer[] = {
	HDA_CODEC_MUTE("iSpeaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
	HDA_BIND_VOL("LineOut Playback Volume", &alc269_epc_bind_vol),
	HDA_CODEC_MUTE("LineOut Playback Switch", 0x15, 0x0, HDA_OUTPUT),
	HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
	HDA_CODEC_MUTE("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
	HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
	HDA_CODEC_MUTE("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT),
	{ } /* end */
};
@@ -12902,12 +12893,7 @@ static struct snd_kcontrol_new alc269_epc_capture_mixer[] = {
};
/* FSC amilo */
static struct snd_kcontrol_new alc269_fujitsu_mixer[] = {
	HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
	HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
	HDA_BIND_VOL("PCM Playback Volume", &alc269_epc_bind_vol),
	{ } /* end */
};
#define alc269_fujitsu_mixer	alc269_eeepc_mixer
static struct hda_verb alc269_quanta_fl1_verbs[] = {
	{0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
Loading