Commit fb2e5fc8 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge tag 'asoc-fix-v6.3' of...

Merge tag 'asoc-fix-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.3

Almost all of this is driver specific fixes and new IDs that have come
in during the merge window.  A good chunk of them are simple ones from
me which came about due to a bunch of Mediatek Chromebooks being enabled
in KernelCI, there's more where that came from.

We do have one small feature added to the PCM core by Claudiu Beznea in
order to allow the sequencing required to resolve a noise issue with the
Microchip PDMC driver.
parents 26ed1d29 b56ec299
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ properties:
      - enum:
          - apple,t6000-mca
          - apple,t8103-mca
          - apple,t8112-mca
      - const: apple,mca

  reg:
+6 −0
Original line number Diff line number Diff line
@@ -67,6 +67,12 @@ properties:
    maxItems: 4
    uniqueItems: true

  microchip,startup-delay-us:
    description: |
      Specifies the delay in microseconds that needs to be applied after
      enabling the PDMC microphones to avoid unwanted noise due to microphones
      not being ready.

required:
  - compatible
  - reg
+2 −0
Original line number Diff line number Diff line
@@ -190,6 +190,8 @@ struct snd_soc_component_driver {
	bool use_dai_pcm_id;	/* use DAI link PCM ID as PCM device number */
	int be_pcm_base;	/* base device ID for all BE PCMs */

	unsigned int start_dma_last;

#ifdef CONFIG_DEBUG_FS
	const char *debugfs_prefix;
#endif
+14 −0
Original line number Diff line number Diff line
@@ -255,6 +255,20 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
			DMI_MATCH(DMI_PRODUCT_NAME, "15NBC1011"),
		}
	},
	{
		.driver_data = &acp6x_card,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
			DMI_MATCH(DMI_PRODUCT_NAME, "OMEN by HP Gaming Laptop 16z-n000"),
		}
	},
	{
		.driver_data = &acp6x_card,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
			DMI_MATCH(DMI_BOARD_NAME, "8A43"),
		}
	},
	{}
};

+23 −8
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@
#define SERDES_CONF_UNK3	BIT(14)
#define SERDES_CONF_NO_DATA_FEEDBACK	BIT(15)
#define SERDES_CONF_SYNC_SEL	GENMASK(18, 16)
#define SERDES_CONF_SOME_RST	BIT(19)
#define REG_TX_SERDES_BITSTART	0x08
#define REG_RX_SERDES_BITSTART	0x0c
#define REG_TX_SERDES_SLOTMASK	0x0c
@@ -203,15 +202,24 @@ static void mca_fe_early_trigger(struct snd_pcm_substream *substream, int cmd,
	case SNDRV_PCM_TRIGGER_START:
	case SNDRV_PCM_TRIGGER_RESUME:
	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
		mca_modify(cl, serdes_conf, SERDES_CONF_SYNC_SEL,
			   FIELD_PREP(SERDES_CONF_SYNC_SEL, 0));
		mca_modify(cl, serdes_conf, SERDES_CONF_SYNC_SEL,
			   FIELD_PREP(SERDES_CONF_SYNC_SEL, 7));
		mca_modify(cl, serdes_unit + REG_SERDES_STATUS,
			   SERDES_STATUS_EN | SERDES_STATUS_RST,
			   SERDES_STATUS_RST);
		mca_modify(cl, serdes_conf, SERDES_CONF_SOME_RST,
			   SERDES_CONF_SOME_RST);
		readl_relaxed(cl->base + serdes_conf);
		mca_modify(cl, serdes_conf, SERDES_STATUS_RST, 0);
		WARN_ON(readl_relaxed(cl->base + REG_SERDES_STATUS) &
		/*
		 * Experiments suggest that it takes at most ~1 us
		 * for the bit to clear, so wait 2 us for good measure.
		 */
		udelay(2);
		WARN_ON(readl_relaxed(cl->base + serdes_unit + REG_SERDES_STATUS) &
			SERDES_STATUS_RST);
		mca_modify(cl, serdes_conf, SERDES_CONF_SYNC_SEL,
			   FIELD_PREP(SERDES_CONF_SYNC_SEL, 0));
		mca_modify(cl, serdes_conf, SERDES_CONF_SYNC_SEL,
			   FIELD_PREP(SERDES_CONF_SYNC_SEL, cl->no + 1));
		break;
	default:
		break;
@@ -942,10 +950,17 @@ static int mca_pcm_new(struct snd_soc_component *component,
		chan = mca_request_dma_channel(cl, i);

		if (IS_ERR_OR_NULL(chan)) {
			mca_pcm_free(component, rtd->pcm);

			if (chan && PTR_ERR(chan) == -EPROBE_DEFER)
				return PTR_ERR(chan);

			dev_err(component->dev, "unable to obtain DMA channel (stream %d cluster %d): %pe\n",
				i, cl->no, chan);
			mca_pcm_free(component, rtd->pcm);

			if (!chan)
				return -EINVAL;
			return PTR_ERR(chan);
		}

		cl->dma_chans[i] = chan;
Loading