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

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

Merge tag 'asoc-fix-v5.3-rc3' of...

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

ASoC: Fixes for v5.3

A relatively large batch of mostly unremarkable fixes here, a couple of
small core fixes for fairly obscure issues, more comment/email updates
with no code impact than usual and a bunch of small driver fixes.

The support for new sample rates in the max98373 driver is a fix for the
fact that the driver declared support for those rates but would in fact
return an error if these rates were selected.
parents 5d78e1c2 30c21734
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7871,6 +7871,7 @@ S: Maintained
F:	drivers/video/fbdev/i810/

INTEL ASoC DRIVERS
M:	Cezary Rojewski <cezary.rojewski@intel.com>
M:	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
M:	Liam Girdwood <liam.r.girdwood@linux.intel.com>
M:	Jie Yang <yang.jie@linux.intel.com>
@@ -15805,7 +15806,7 @@ S: Maintained
F:	drivers/net/ethernet/ti/netcp*

TI PCM3060 ASoC CODEC DRIVER
M:	Kirill Marinushkin <kmarinushkin@birdec.tech>
M:	Kirill Marinushkin <kmarinushkin@birdec.com>
L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
S:	Maintained
F:	Documentation/devicetree/bindings/sound/pcm3060.txt
+4 −0
Original line number Diff line number Diff line
@@ -141,6 +141,10 @@ inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv,
{
	struct device *dev = simple_priv_to_dev(priv);

	/* dai might be NULL */
	if (!dai)
		return;

	if (dai->name)
		dev_dbg(dev, "%s dai name = %s\n",
			name, dai->name);
+9 −7
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@
#ifndef __INCLUDE_UAPI_SOF_FW_H__
#define __INCLUDE_UAPI_SOF_FW_H__

#include <linux/types.h>

#define SND_SOF_FW_SIG_SIZE	4
#define SND_SOF_FW_ABI		1
#define SND_SOF_FW_SIG		"Reef"
@@ -46,8 +48,8 @@ enum snd_sof_fw_blk_type {

struct snd_sof_blk_hdr {
	enum snd_sof_fw_blk_type type;
	uint32_t size;		/* bytes minus this header */
	uint32_t offset;	/* offset from base */
	__u32 size;		/* bytes minus this header */
	__u32 offset;		/* offset from base */
} __packed;

/*
@@ -61,8 +63,8 @@ enum snd_sof_fw_mod_type {

struct snd_sof_mod_hdr {
	enum snd_sof_fw_mod_type type;
	uint32_t size;		/* bytes minus this header */
	uint32_t num_blocks;	/* number of blocks */
	__u32 size;		/* bytes minus this header */
	__u32 num_blocks;	/* number of blocks */
} __packed;

/*
@@ -70,9 +72,9 @@ struct snd_sof_mod_hdr {
 */
struct snd_sof_fw_header {
	unsigned char sig[SND_SOF_FW_SIG_SIZE]; /* "Reef" */
	uint32_t file_size;	/* size of file minus this header */
	uint32_t num_modules;	/* number of modules */
	uint32_t abi;		/* version of header format */
	__u32 file_size;	/* size of file minus this header */
	__u32 num_modules;	/* number of modules */
	__u32 abi;		/* version of header format */
} __packed;

#endif
+8 −6
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
#ifndef __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__
#define __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__

#include <linux/types.h>

/*
 * Header for all non IPC ABI data.
 *
@@ -16,12 +18,12 @@
 * Used by any bespoke component data structures or binary blobs.
 */
struct sof_abi_hdr {
	uint32_t magic;		/**< 'S', 'O', 'F', '\0' */
	uint32_t type;		/**< component specific type */
	uint32_t size;		/**< size in bytes of data excl. this struct */
	uint32_t abi;		/**< SOF ABI version */
	uint32_t reserved[4];	/**< reserved for future use */
	uint32_t data[0];	/**< Component data - opaque to core */
	__u32 magic;		/**< 'S', 'O', 'F', '\0' */
	__u32 type;		/**< component specific type */
	__u32 size;		/**< size in bytes of data excl. this struct */
	__u32 abi;		/**< SOF ABI version */
	__u32 reserved[4];	/**< reserved for future use */
	__u32 data[0];		/**< Component data - opaque to core */
}  __packed;

#endif
+9 −11
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@ struct i2s_stream_instance {
	u16 num_pages;
	u16 channels;
	u32 xfer_resolution;
	struct page *pg;
	u64 bytescount;
	dma_addr_t dma_addr;
	void __iomem *acp3x_base;
};

@@ -211,9 +211,8 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
	u16 page_idx;
	u64 addr;
	u32 low, high, val, acp_fifo_addr;
	struct page *pg = rtd->pg;
	dma_addr_t addr = rtd->dma_addr;

	/* 8 scratch registers used to map one 64 bit address */
	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
@@ -229,7 +228,6 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)

	for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
		/* Load the low address of page int ACP SRAM through SRBM */
		addr = page_to_phys(pg);
		low = lower_32_bits(addr);
		high = upper_32_bits(addr);

@@ -239,7 +237,7 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
				+ 4);
		/* Move to next physically contiguos page */
		val += 8;
		pg++;
		addr += PAGE_SIZE;
	}

	if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
@@ -341,7 +339,6 @@ static int acp3x_dma_hw_params(struct snd_pcm_substream *substream,
{
	int status;
	u64 size;
	struct page *pg;
	struct snd_pcm_runtime *runtime = substream->runtime;
	struct i2s_stream_instance *rtd = runtime->private_data;

@@ -354,9 +351,8 @@ static int acp3x_dma_hw_params(struct snd_pcm_substream *substream,
		return status;

	memset(substream->runtime->dma_area, 0, params_buffer_bytes(params));
	pg = virt_to_page(substream->dma_buffer.area);
	if (pg) {
		rtd->pg = pg;
	if (substream->dma_buffer.area) {
		rtd->dma_addr = substream->dma_buffer.addr;
		rtd->num_pages = (PAGE_ALIGN(size) >> PAGE_SHIFT);
		config_acp3x_dma(rtd, substream->stream);
		status = 0;
@@ -385,9 +381,11 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_pcm_substream *substream)

static int acp3x_dma_new(struct snd_soc_pcm_runtime *rtd)
{
	struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd,
								    DRV_NAME);
	struct device *parent = component->dev->parent;
	snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
					      rtd->pcm->card->dev,
					      MIN_BUFFER, MAX_BUFFER);
					      parent, MIN_BUFFER, MAX_BUFFER);
	return 0;
}

Loading