Commit b4af6821 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "Just a few small fixes. The only change to the core code is for a
  minor race in ALSA OSS sequencer, and the rest are all device-specific
  fixes (regression fixes and a usual quirk)"

* tag 'sound-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Add quirk flag for HEM devices to enable native DSD playback
  ALSA: usb-audio: Fix broken resume due to UAC3 power state
  ALSA: seq: oss: Fix racy open/close of MIDI devices
  ASoC: tegra: Fix Master Volume Control
  ALSA: hda/realtek: Add a quirk for Compaq N14JP6
  firmware: cs_dsp: Log correct region name in bin error messages
parents b73056e9 227d2c31
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2124,6 +2124,7 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware
				   file, blocks, le32_to_cpu(blk->len),
				   type, le32_to_cpu(blk->id));

			region_name = cs_dsp_mem_region_name(type);
			mem = cs_dsp_find_region(dsp, type);
			if (!mem) {
				cs_dsp_err(dsp, "No base for region %x\n", type);
@@ -2147,8 +2148,8 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware
				reg = dsp->ops->region_to_reg(mem, reg);
				reg += offset;
			} else {
				cs_dsp_err(dsp, "No %x for algorithm %x\n",
					   type, le32_to_cpu(blk->id));
				cs_dsp_err(dsp, "No %s for algorithm %x\n",
					   region_name, le32_to_cpu(blk->id));
			}
			break;

+22 −13
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ struct seq_oss_midi {
	struct snd_midi_event *coder;	/* MIDI event coder */
	struct seq_oss_devinfo *devinfo;	/* assigned OSSseq device */
	snd_use_lock_t use_lock;
	struct mutex open_mutex;
};


@@ -172,6 +173,7 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo)
	mdev->flags = pinfo->capability;
	mdev->opened = 0;
	snd_use_lock_init(&mdev->use_lock);
	mutex_init(&mdev->open_mutex);

	/* copy and truncate the name of synth device */
	strscpy(mdev->name, pinfo->name, sizeof(mdev->name));
@@ -322,15 +324,17 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode)
	int perm;
	struct seq_oss_midi *mdev;
	struct snd_seq_port_subscribe subs;
	int err;

	mdev = get_mididev(dp, dev);
	if (!mdev)
		return -ENODEV;

	mutex_lock(&mdev->open_mutex);
	/* already used? */
	if (mdev->opened && mdev->devinfo != dp) {
		snd_use_lock_free(&mdev->use_lock);
		return -EBUSY;
		err = -EBUSY;
		goto unlock;
	}

	perm = 0;
@@ -340,14 +344,14 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode)
		perm |= PERM_READ;
	perm &= mdev->flags;
	if (perm == 0) {
		snd_use_lock_free(&mdev->use_lock);
		return -ENXIO;
		err = -ENXIO;
		goto unlock;
	}

	/* already opened? */
	if ((mdev->opened & perm) == perm) {
		snd_use_lock_free(&mdev->use_lock);
		return 0;
		err = 0;
		goto unlock;
	}

	perm &= ~mdev->opened;
@@ -372,13 +376,17 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode)
	}

	if (! mdev->opened) {
		snd_use_lock_free(&mdev->use_lock);
		return -ENXIO;
		err = -ENXIO;
		goto unlock;
	}

	mdev->devinfo = dp;
	err = 0;

 unlock:
	mutex_unlock(&mdev->open_mutex);
	snd_use_lock_free(&mdev->use_lock);
	return 0;
	return err;
}

/*
@@ -393,10 +401,9 @@ snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev)
	mdev = get_mididev(dp, dev);
	if (!mdev)
		return -ENODEV;
	if (! mdev->opened || mdev->devinfo != dp) {
		snd_use_lock_free(&mdev->use_lock);
		return 0;
	}
	mutex_lock(&mdev->open_mutex);
	if (!mdev->opened || mdev->devinfo != dp)
		goto unlock;

	memset(&subs, 0, sizeof(subs));
	if (mdev->opened & PERM_WRITE) {
@@ -415,6 +422,8 @@ snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev)
	mdev->opened = 0;
	mdev->devinfo = NULL;

 unlock:
	mutex_unlock(&mdev->open_mutex);
	snd_use_lock_free(&mdev->use_lock);
	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -11740,6 +11740,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
	SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
	SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26),
	SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
	SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB),

#if 0
	/* Below is a quirk table taken from the old code.
+3 −0
Original line number Diff line number Diff line
@@ -117,6 +117,9 @@ int tegra_pcm_open(struct snd_soc_component *component,
		return ret;
	}

	/* Set wait time to 500ms by default */
	substream->wait_time = 500;

	return 0;
}
EXPORT_SYMBOL_GPL(tegra_pcm_open);
+4 −0
Original line number Diff line number Diff line
@@ -650,6 +650,10 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream)
		goto unlock;
	}

	ret = snd_usb_pcm_change_state(subs, UAC3_PD_STATE_D0);
	if (ret < 0)
		goto unlock;

 again:
	if (subs->sync_endpoint) {
		ret = snd_usb_endpoint_prepare(chip, subs->sync_endpoint);
Loading