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

Commit 9a51cf28 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "A collection of small fixes that have been found recently.  Most of
  the commits are regression fixes in HD-audio and some other random
  drivers."

* tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: snd-usb: fix clock source validity index
  ALSA: hda - Fix mute-LED GPIO initialization for IDT codecs
  ALSA: hda - Add descriptions for missing IDT 92HD83x models
  ALSA: hda - Fix polarity of mute LED on HP Mini 210
  ALSA: es1688 - freeup resources on init failure
  ALSA: hda - Workaround for silent output on VAIO Z with ALC889
  ALSA: hda - Fix WARNING from HDMI/DP parser
  ALSA: hda - Detach from converter at closing in patch_hdmi.c
  ALSA: hda - Fix mute-LED GPIO setup for HP Mini 210
  ALSA: mpu401: Fix missing initialization of irq field
  ALSA: hda - Fix invalid D3 of headphone DAC on VT202x codecs
parents a0e881b7 aff252a8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ ALC882/883/885/888/889
  acer-aspire-8930g	Acer Aspire 8330G/6935G
  acer-aspire		Acer Aspire others
  inv-dmic	Inverted internal mic workaround
  no-primary-hp		VAIO Z workaround (for fixed speaker DAC)

ALC861/660
==========
@@ -273,6 +274,10 @@ STAC92HD83*
  dell-s14	Dell laptop
  dell-vostro-3500	Dell Vostro 3500 laptop
  hp-dv7-4000	HP dv-7 4000
  hp_cNB11_intquad HP CNB models with 4 speakers
  hp-zephyr	HP Zephyr
  hp-led	HP with broken BIOS for mute LED
  hp-inv-led	HP with broken BIOS for inverted mute LED
  auto		BIOS setup (default)

STAC9872
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#define ES1688_HW_AUTO		0x0000
#define ES1688_HW_688		0x0001
#define ES1688_HW_1688		0x0002
#define ES1688_HW_UNDEF	0x0003

struct snd_es1688 {
	unsigned long port;		/* port of ESS chip */
+1 −0
Original line number Diff line number Diff line
@@ -554,6 +554,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device,
	spin_lock_init(&mpu->output_lock);
	spin_lock_init(&mpu->timer_lock);
	mpu->hardware = hardware;
	mpu->irq = -1;
	if (! (info_flags & MPU401_INFO_INTEGRATED)) {
		int res_size = hardware == MPU401_HW_PC98II ? 4 : 2;
		mpu->res = request_region(port, res_size, "MPU401 UART");
+23 −11
Original line number Diff line number Diff line
@@ -612,10 +612,10 @@ static int snd_es1688_capture_close(struct snd_pcm_substream *substream)

static int snd_es1688_free(struct snd_es1688 *chip)
{
	if (chip->res_port) {
	if (chip->hardware != ES1688_HW_UNDEF)
		snd_es1688_init(chip, 0);
	if (chip->res_port)
		release_and_free_resource(chip->res_port);
	}
	if (chip->irq >= 0)
		free_irq(chip->irq, (void *) chip);
	if (chip->dma8 >= 0) {
@@ -657,19 +657,27 @@ int snd_es1688_create(struct snd_card *card,
		return -ENOMEM;
	chip->irq = -1;
	chip->dma8 = -1;
	chip->hardware = ES1688_HW_UNDEF;
	
	if ((chip->res_port = request_region(port + 4, 12, "ES1688")) == NULL) {
	chip->res_port = request_region(port + 4, 12, "ES1688");
	if (chip->res_port == NULL) {
		snd_printk(KERN_ERR "es1688: can't grab port 0x%lx\n", port + 4);
		return -EBUSY;
		err = -EBUSY;
		goto exit;
	}
	if (request_irq(irq, snd_es1688_interrupt, 0, "ES1688", (void *) chip)) {

	err = request_irq(irq, snd_es1688_interrupt, 0, "ES1688", (void *) chip);
	if (err < 0) {
		snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq);
		return -EBUSY;
		goto exit;
	}

	chip->irq = irq;
	if (request_dma(dma8, "ES1688")) {
	err = request_dma(dma8, "ES1688");

	if (err < 0) {
		snd_printk(KERN_ERR "es1688: can't grab DMA8 %d\n", dma8);
		return -EBUSY;
		goto exit;
	}
	chip->dma8 = dma8;

@@ -685,14 +693,18 @@ int snd_es1688_create(struct snd_card *card,

	err = snd_es1688_probe(chip);
	if (err < 0)
		return err;
		goto exit;

	err = snd_es1688_init(chip, 1);
	if (err < 0)
		return err;
		goto exit;

	/* Register device */
	return snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
exit:
	if (err)
		snd_es1688_free(chip);
	return err;
}

static struct snd_pcm_ops snd_es1688_playback_ops = {
+7 −7
Original line number Diff line number Diff line
@@ -877,6 +877,8 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
	struct hdmi_eld *eld;
	struct hdmi_spec_per_cvt *per_cvt = NULL;

	hinfo->nid = 0; /* clear the leftover value */

	/* Validate hinfo */
	pin_idx = hinfo_to_pin_index(spec, hinfo);
	if (snd_BUG_ON(pin_idx < 0))
@@ -1161,7 +1163,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
	return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format);
}

static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
			  struct hda_codec *codec,
			  struct snd_pcm_substream *substream)
{
@@ -1171,8 +1173,6 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
	struct hdmi_spec_per_pin *per_pin;
	int pinctl;

	snd_hda_codec_cleanup_stream(codec, hinfo->nid);

	if (hinfo->nid) {
		cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid);
		if (snd_BUG_ON(cvt_idx < 0))
@@ -1195,14 +1195,13 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
				    pinctl & ~PIN_OUT);
		snd_hda_spdif_ctls_unassign(codec, pin_idx);
	}

	return 0;
}

static const struct hda_pcm_ops generic_ops = {
	.open = hdmi_pcm_open,
	.close = hdmi_pcm_close,
	.prepare = generic_hdmi_playback_pcm_prepare,
	.cleanup = generic_hdmi_playback_pcm_cleanup,
};

static int generic_hdmi_build_pcms(struct hda_codec *codec)
@@ -1221,6 +1220,7 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
		pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
		pstr->substreams = 1;
		pstr->ops = generic_ops;
		pstr->nid = 1; /* FIXME: just for avoiding a debug WARNING */
		/* other pstr fields are set in open */
	}

Loading