Commit 2848551b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "A collection of small patches, mostly for old and new regressions and
  device-specific fixes.

   - Regression fixes regarding ALSA core SG-buffer helpers

   - Regression fix for Realtek HD-audio mutex deadlock

   - Regression fix for USB-audio PM resume error

   - More coverage of ASoC core control API notification fixes

   - Old regression fixes for HD-audio probe mask

   - Fixes for ASoC Realtek codec work handling

   - Other device-specific quirks / fixes"

* tag 'sound-5.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits)
  ASoC: intel: skylake: Set max DMA segment size
  ASoC: SOF: hda: Set max DMA segment size
  ALSA: hda: Set max DMA segment size
  ALSA: hda/realtek: Fix deadlock by COEF mutex
  ALSA: usb-audio: Don't abort resume upon errors
  ALSA: hda: Fix missing codec probe on Shenker Dock 15
  ALSA: hda: Fix regression on forced probe mask option
  ALSA: hda/realtek: Add quirk for Legion Y9000X 2019
  ALSA: usb-audio: revert to IMPLICIT_FB_FIXED_DEV for M-Audio FastTrack Ultra
  ASoC: wm_adsp: Correct control read size when parsing compressed buffer
  ASoC: qcom: Actually clear DMA interrupt register for HDMI
  ALSA: memalloc: invalidate SG pages before sync
  ALSA: memalloc: Fix dma_need_sync() checks
  MAINTAINERS: update cros_ec_codec maintainers
  ASoC: rt5682: do not block workqueue if card is unbound
  ASoC: rt5668: do not block workqueue if card is unbound
  ASoC: rt5682s: do not block workqueue if card is unbound
  ASoC: tas2770: Insert post reset delay
  ASoC: Revert "ASoC: mediatek: Check for error clk pointer"
  ASoC: amd: acp: Set gpio_spkr_en to None for max speaker amplifer in machine driver
  ...
parents 45a98a71 c22a8086
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ title: Audio codec controlled by ChromeOS EC

maintainers:
  - Cheng-Yi Chiang <cychiang@chromium.org>
  - Tzung-Bi Shih <tzungbi@google.com>

description: |
  Google's ChromeOS EC codec is a digital mic codec provided by the
+1 −0
Original line number Diff line number Diff line
@@ -4547,6 +4547,7 @@ F: drivers/platform/chrome/
CHROMEOS EC CODEC DRIVER
M:	Cheng-Yi Chiang <cychiang@chromium.org>
M:	Tzung-Bi Shih <tzungbi@google.com>
R:	Guenter Roeck <groeck@chromium.org>
S:	Maintained
F:	Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
+4 −11
Original line number Diff line number Diff line
@@ -411,17 +411,12 @@ static int scpsys_power_off(struct generic_pm_domain *genpd)
	return ret;
}

static int init_clks(struct platform_device *pdev, struct clk **clk)
static void init_clks(struct platform_device *pdev, struct clk **clk)
{
	int i;

	for (i = CLK_NONE + 1; i < CLK_MAX; i++) {
	for (i = CLK_NONE + 1; i < CLK_MAX; i++)
		clk[i] = devm_clk_get(&pdev->dev, clk_names[i]);
		if (IS_ERR(clk[i]))
			return PTR_ERR(clk[i]);
	}

	return 0;
}

static struct scp *init_scp(struct platform_device *pdev,
@@ -431,7 +426,7 @@ static struct scp *init_scp(struct platform_device *pdev,
{
	struct genpd_onecell_data *pd_data;
	struct resource *res;
	int i, j, ret;
	int i, j;
	struct scp *scp;
	struct clk *clk[CLK_MAX];

@@ -486,9 +481,7 @@ static struct scp *init_scp(struct platform_device *pdev,

	pd_data->num_domains = num;

	ret = init_clks(pdev, clk);
	if (ret)
		return ERR_PTR(ret);
	init_clks(pdev, clk);

	for (i = 0; i < num; i++) {
		struct scp_domain *scpd = &scp->domains[i];
+10 −5
Original line number Diff line number Diff line
@@ -511,7 +511,8 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size)
				      DEFAULT_GFP, 0);
	if (!sgt)
		return NULL;
	dmab->dev.need_sync = dma_need_sync(dmab->dev.dev, dmab->dev.dir);
	dmab->dev.need_sync = dma_need_sync(dmab->dev.dev,
					    sg_dma_address(sgt->sgl));
	p = dma_vmap_noncontiguous(dmab->dev.dev, size, sgt);
	if (p)
		dmab->private_data = sgt;
@@ -540,9 +541,9 @@ static void snd_dma_noncontig_sync(struct snd_dma_buffer *dmab,
	if (mode == SNDRV_DMA_SYNC_CPU) {
		if (dmab->dev.dir == DMA_TO_DEVICE)
			return;
		invalidate_kernel_vmap_range(dmab->area, dmab->bytes);
		dma_sync_sgtable_for_cpu(dmab->dev.dev, dmab->private_data,
					 dmab->dev.dir);
		invalidate_kernel_vmap_range(dmab->area, dmab->bytes);
	} else {
		if (dmab->dev.dir == DMA_FROM_DEVICE)
			return;
@@ -671,9 +672,13 @@ static const struct snd_malloc_ops snd_dma_sg_wc_ops = {
 */
static void *snd_dma_noncoherent_alloc(struct snd_dma_buffer *dmab, size_t size)
{
	dmab->dev.need_sync = dma_need_sync(dmab->dev.dev, dmab->dev.dir);
	return dma_alloc_noncoherent(dmab->dev.dev, size, &dmab->addr,
	void *p;

	p = dma_alloc_noncoherent(dmab->dev.dev, size, &dmab->addr,
				  dmab->dev.dir, DEFAULT_GFP);
	if (p)
		dmab->dev.need_sync = dma_need_sync(dmab->dev.dev, dmab->addr);
	return p;
}

static void snd_dma_noncoherent_free(struct snd_dma_buffer *dmab)
+4 −2
Original line number Diff line number Diff line
@@ -1615,6 +1615,7 @@ static const struct snd_pci_quirk probe_mask_list[] = {
	/* forced codec slots */
	SND_PCI_QUIRK(0x1043, 0x1262, "ASUS W5Fm", 0x103),
	SND_PCI_QUIRK(0x1046, 0x1262, "ASUS W5F", 0x103),
	SND_PCI_QUIRK(0x1558, 0x0351, "Schenker Dock 15", 0x105),
	/* WinFast VP200 H (Teradici) user reported broken communication */
	SND_PCI_QUIRK(0x3a21, 0x040d, "WinFast VP200 H", 0x101),
	{}
@@ -1798,8 +1799,6 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,

	assign_position_fix(chip, check_position_fix(chip, position_fix[dev]));

	check_probe_mask(chip, dev);

	if (single_cmd < 0) /* allow fallback to single_cmd at errors */
		chip->fallback_to_single_cmd = 1;
	else /* explicitly set to single_cmd or not */
@@ -1825,6 +1824,8 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
		chip->bus.core.needs_damn_long_delay = 1;
	}

	check_probe_mask(chip, dev);

	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
	if (err < 0) {
		dev_err(card->dev, "Error creating device [card]!\n");
@@ -1940,6 +1941,7 @@ static int azx_first_init(struct azx *chip)
		dma_bits = 32;
	if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(dma_bits)))
		dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(32));
	dma_set_max_seg_size(&pci->dev, UINT_MAX);

	/* read number of streams from GCAP register instead of using
	 * hardcoded value
Loading