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

Merge remote-tracking branches 'asoc/topic/max98095', 'asoc/topic/omap',...

Merge remote-tracking branches 'asoc/topic/max98095', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rcar' into asoc-next
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -4,12 +4,21 @@ This node models the Qualcomm Technologies Low-Power Audio SubSystem (LPASS).

Required properties:

- compatible		: "qcom,lpass-cpu"
- compatible		: "qcom,lpass-cpu" or "qcom,apq8016-lpass-cpu"
- clocks		: Must contain an entry for each entry in clock-names.
- clock-names		: A list which must include the following entries:
				* "ahbix-clk"
				* "mi2s-osr-clk"
				* "mi2s-bit-clk"
			: required clocks for "qcom,lpass-cpu-apq8016"
				* "ahbix-clk"
				* "mi2s-bit-clk0"
				* "mi2s-bit-clk1"
				* "mi2s-bit-clk2"
				* "mi2s-bit-clk3"
				* "pcnoc-mport-clk"
				* "pcnoc-sway-clk"

- interrupts		: Must contain an entry for each entry in
			  interrupt-names.
- interrupt-names	: A list which must include the following entries:
@@ -22,6 +31,8 @@ Required properties:
- reg-names		: A list which must include the following entries:
				* "lpass-lpaif"



Optional properties:

- qcom,adsp		: Phandle for the audio DSP node
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ DAI subnode properties:

Example:

rcar_sound: rcar_sound@ec500000 {
rcar_sound: sound@ec500000 {
	#sound-dai-cells = <1>;
	compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
	reg =	<0 0xec500000 0 0x1000>, /* SCU */
+21 −16
Original line number Diff line number Diff line
@@ -465,6 +465,7 @@ static dma_cookie_t rcar_dmac_tx_submit(struct dma_async_tx_descriptor *tx)
static int rcar_dmac_desc_alloc(struct rcar_dmac_chan *chan, gfp_t gfp)
{
	struct rcar_dmac_desc_page *page;
	unsigned long flags;
	LIST_HEAD(list);
	unsigned int i;

@@ -482,10 +483,10 @@ static int rcar_dmac_desc_alloc(struct rcar_dmac_chan *chan, gfp_t gfp)
		list_add_tail(&desc->node, &list);
	}

	spin_lock_irq(&chan->lock);
	spin_lock_irqsave(&chan->lock, flags);
	list_splice_tail(&list, &chan->desc.free);
	list_add_tail(&page->node, &chan->desc.pages);
	spin_unlock_irq(&chan->lock);
	spin_unlock_irqrestore(&chan->lock, flags);

	return 0;
}
@@ -516,6 +517,7 @@ static void rcar_dmac_desc_put(struct rcar_dmac_chan *chan,
static void rcar_dmac_desc_recycle_acked(struct rcar_dmac_chan *chan)
{
	struct rcar_dmac_desc *desc, *_desc;
	unsigned long flags;
	LIST_HEAD(list);

	/*
@@ -524,9 +526,9 @@ static void rcar_dmac_desc_recycle_acked(struct rcar_dmac_chan *chan)
	 * list_for_each_entry_safe, isn't safe if we release the channel lock
	 * around the rcar_dmac_desc_put() call.
	 */
	spin_lock_irq(&chan->lock);
	spin_lock_irqsave(&chan->lock, flags);
	list_splice_init(&chan->desc.wait, &list);
	spin_unlock_irq(&chan->lock);
	spin_unlock_irqrestore(&chan->lock, flags);

	list_for_each_entry_safe(desc, _desc, &list, node) {
		if (async_tx_test_ack(&desc->async_tx)) {
@@ -539,9 +541,9 @@ static void rcar_dmac_desc_recycle_acked(struct rcar_dmac_chan *chan)
		return;

	/* Put the remaining descriptors back in the wait list. */
	spin_lock_irq(&chan->lock);
	spin_lock_irqsave(&chan->lock, flags);
	list_splice(&list, &chan->desc.wait);
	spin_unlock_irq(&chan->lock);
	spin_unlock_irqrestore(&chan->lock, flags);
}

/*
@@ -556,12 +558,13 @@ static void rcar_dmac_desc_recycle_acked(struct rcar_dmac_chan *chan)
static struct rcar_dmac_desc *rcar_dmac_desc_get(struct rcar_dmac_chan *chan)
{
	struct rcar_dmac_desc *desc;
	unsigned long flags;
	int ret;

	/* Recycle acked descriptors before attempting allocation. */
	rcar_dmac_desc_recycle_acked(chan);

	spin_lock_irq(&chan->lock);
	spin_lock_irqsave(&chan->lock, flags);

	while (list_empty(&chan->desc.free)) {
		/*
@@ -570,17 +573,17 @@ static struct rcar_dmac_desc *rcar_dmac_desc_get(struct rcar_dmac_chan *chan)
		 * allocated descriptors. If the allocation fails return an
		 * error.
		 */
		spin_unlock_irq(&chan->lock);
		spin_unlock_irqrestore(&chan->lock, flags);
		ret = rcar_dmac_desc_alloc(chan, GFP_NOWAIT);
		if (ret < 0)
			return NULL;
		spin_lock_irq(&chan->lock);
		spin_lock_irqsave(&chan->lock, flags);
	}

	desc = list_first_entry(&chan->desc.free, struct rcar_dmac_desc, node);
	list_del(&desc->node);

	spin_unlock_irq(&chan->lock);
	spin_unlock_irqrestore(&chan->lock, flags);

	return desc;
}
@@ -593,6 +596,7 @@ static struct rcar_dmac_desc *rcar_dmac_desc_get(struct rcar_dmac_chan *chan)
static int rcar_dmac_xfer_chunk_alloc(struct rcar_dmac_chan *chan, gfp_t gfp)
{
	struct rcar_dmac_desc_page *page;
	unsigned long flags;
	LIST_HEAD(list);
	unsigned int i;

@@ -606,10 +610,10 @@ static int rcar_dmac_xfer_chunk_alloc(struct rcar_dmac_chan *chan, gfp_t gfp)
		list_add_tail(&chunk->node, &list);
	}

	spin_lock_irq(&chan->lock);
	spin_lock_irqsave(&chan->lock, flags);
	list_splice_tail(&list, &chan->desc.chunks_free);
	list_add_tail(&page->node, &chan->desc.pages);
	spin_unlock_irq(&chan->lock);
	spin_unlock_irqrestore(&chan->lock, flags);

	return 0;
}
@@ -627,9 +631,10 @@ static struct rcar_dmac_xfer_chunk *
rcar_dmac_xfer_chunk_get(struct rcar_dmac_chan *chan)
{
	struct rcar_dmac_xfer_chunk *chunk;
	unsigned long flags;
	int ret;

	spin_lock_irq(&chan->lock);
	spin_lock_irqsave(&chan->lock, flags);

	while (list_empty(&chan->desc.chunks_free)) {
		/*
@@ -638,18 +643,18 @@ rcar_dmac_xfer_chunk_get(struct rcar_dmac_chan *chan)
		 * allocated descriptors. If the allocation fails return an
		 * error.
		 */
		spin_unlock_irq(&chan->lock);
		spin_unlock_irqrestore(&chan->lock, flags);
		ret = rcar_dmac_xfer_chunk_alloc(chan, GFP_NOWAIT);
		if (ret < 0)
			return NULL;
		spin_lock_irq(&chan->lock);
		spin_lock_irqsave(&chan->lock, flags);
	}

	chunk = list_first_entry(&chan->desc.chunks_free,
				 struct rcar_dmac_xfer_chunk, node);
	list_del(&chunk->node);

	spin_unlock_irq(&chan->lock);
	spin_unlock_irqrestore(&chan->lock, flags);

	return chunk;
}
+9 −0
Original line number Diff line number Diff line
#ifndef __DT_APQ8016_LPASS_H
#define __DT_APQ8016_LPASS_H

#define MI2S_PRIMARY	0
#define MI2S_SECONDARY	1
#define MI2S_TERTIARY	2
#define MI2S_QUATERNARY	3

#endif /* __DT_APQ8016_LPASS_H */
+2 −2
Original line number Diff line number Diff line
@@ -2301,8 +2301,8 @@ static int max98095_probe(struct snd_soc_codec *codec)
		/* register an audio interrupt */
		ret = request_threaded_irq(client->irq, NULL,
			max98095_report_jack,
			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
			"max98095", codec);
			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
			IRQF_ONESHOT, "max98095", codec);
		if (ret) {
			dev_err(codec->dev, "Failed to request IRQ: %d\n", ret);
			goto err_access;
Loading