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

Commit d86a2fe4 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/psc', 'asoc/fix/pxa',...

Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/psc', 'asoc/fix/pxa', 'asoc/fix/spear', 'asoc/fix/sti' and 'asoc/fix/wm0010' into asoc-linus
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -9,6 +9,14 @@ menuconfig SND_ARM
	  Drivers that are implemented on ASoC can be found in
	  "ALSA for SoC audio support" section.

config SND_PXA2XX_LIB
	tristate
	select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97
	select SND_DMAENGINE_PCM

config SND_PXA2XX_LIB_AC97
	bool

if SND_ARM

config SND_ARMAACI
@@ -21,13 +29,6 @@ config SND_PXA2XX_PCM
	tristate
	select SND_PCM

config SND_PXA2XX_LIB
	tristate
	select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97

config SND_PXA2XX_LIB_AC97
	bool

config SND_PXA2XX_AC97
	tristate "AC97 driver for the Intel PXA2xx chip"
	depends on ARCH_PXA
+0 −1
Original line number Diff line number Diff line
@@ -296,7 +296,6 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
{
	struct resource *iores, *dmares;
	unsigned long sel;
	int ret;
	struct au1xpsc_audio_data *wd;

	wd = devm_kzalloc(&pdev->dev, sizeof(struct au1xpsc_audio_data),
+9 −14
Original line number Diff line number Diff line
@@ -577,7 +577,6 @@ static int wm0010_boot(struct snd_soc_codec *codec)
	struct wm0010_priv *wm0010 = snd_soc_codec_get_drvdata(codec);
	unsigned long flags;
	int ret;
	const struct firmware *fw;
	struct spi_message m;
	struct spi_transfer t;
	struct dfw_pllrec pll_rec;
@@ -623,14 +622,6 @@ static int wm0010_boot(struct snd_soc_codec *codec)
	wm0010->state = WM0010_OUT_OF_RESET;
	spin_unlock_irqrestore(&wm0010->irq_lock, flags);

	/* First the bootloader */
	ret = request_firmware(&fw, "wm0010_stage2.bin", codec->dev);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to request stage2 loader: %d\n",
			ret);
		goto abort;
	}

	if (!wait_for_completion_timeout(&wm0010->boot_completion,
					 msecs_to_jiffies(20)))
		dev_err(codec->dev, "Failed to get interrupt from DSP\n");
@@ -673,7 +664,7 @@ static int wm0010_boot(struct snd_soc_codec *codec)

		img_swap = kzalloc(len, GFP_KERNEL | GFP_DMA);
		if (!img_swap)
			goto abort;
			goto abort_out;

		/* We need to re-order for 0010 */
		byte_swap_64((u64 *)&pll_rec, img_swap, len);
@@ -688,16 +679,16 @@ static int wm0010_boot(struct snd_soc_codec *codec)
		spi_message_add_tail(&t, &m);

		ret = spi_sync(spi, &m);
		if (ret != 0) {
		if (ret) {
			dev_err(codec->dev, "First PLL write failed: %d\n", ret);
			goto abort;
			goto abort_swap;
		}

		/* Use a second send of the message to get the return status */
		ret = spi_sync(spi, &m);
		if (ret != 0) {
		if (ret) {
			dev_err(codec->dev, "Second PLL write failed: %d\n", ret);
			goto abort;
			goto abort_swap;
		}

		p = (u32 *)out;
@@ -730,6 +721,10 @@ static int wm0010_boot(struct snd_soc_codec *codec)

	return 0;

abort_swap:
	kfree(img_swap);
abort_out:
	kfree(out);
abort:
	/* Put the chip back into reset */
	wm0010_halt(codec);
+17 −0
Original line number Diff line number Diff line
@@ -549,6 +549,23 @@ static int mtk_afe_dais_startup(struct snd_pcm_substream *substream,
	memif->substream = substream;

	snd_soc_set_runtime_hwparams(substream, &mtk_afe_hardware);

	/*
	 * Capture cannot use ping-pong buffer since hw_ptr at IRQ may be
	 * smaller than period_size due to AFE's internal buffer.
	 * This easily leads to overrun when avail_min is period_size.
	 * One more period can hold the possible unread buffer.
	 */
	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
		ret = snd_pcm_hw_constraint_minmax(runtime,
						   SNDRV_PCM_HW_PARAM_PERIODS,
						   3,
						   mtk_afe_hardware.periods_max);
		if (ret < 0) {
			dev_err(afe->dev, "hw_constraint_minmax failed\n");
			return ret;
		}
	}
	ret = snd_pcm_hw_constraint_integer(runtime,
					    SNDRV_PCM_HW_PARAM_PERIODS);
	if (ret < 0)
+0 −2
Original line number Diff line number Diff line
config SND_PXA2XX_SOC
	tristate "SoC Audio for the Intel PXA2xx chip"
	depends on ARCH_PXA
	select SND_ARM
	select SND_PXA2XX_LIB
	help
	  Say Y or M if you want to add support for codecs attached to
@@ -25,7 +24,6 @@ config SND_PXA2XX_AC97
config SND_PXA2XX_SOC_AC97
	tristate
	select AC97_BUS
	select SND_ARM
	select SND_PXA2XX_LIB_AC97
	select SND_SOC_AC97_BUS

Loading