devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 3/9] ASoC: ipq806x: add native LPAIF driver
@ 2014-12-08 22:06 Kenneth Westfield
  0 siblings, 0 replies; 3+ messages in thread
From: Kenneth Westfield @ 2014-12-08 22:06 UTC (permalink / raw)
  To: Mark Brown
  Cc: Kenneth Westfield, ALSA Mailing List, Device Tree Mailing List,
	MSM Mailing List, Liam Girdwood, Takashi Iwai, Rob Herring,
	Greg KH, David Brown, Bryan Huntsman, Banajit Goswami,
	Patrick Lai

On Tue, November 25, 2014 1:44 pm, Mark Brown wrote:
> On Wed, Nov 19, 2014 at 10:52:43AM -0800, Kenneth Westfield wrote:
>> +static int lpaif_pcm_int_enable(uint8_t dma_ch)
>> +{
>> +	uint32_t intr_val;
>> +	uint32_t status_val;
>> +	unsigned long flags;
>> +
>> +	if (dma_ch >= LPAIF_MAX_CHANNELS) {
>> +		pr_err("%s: invalid DMA channel given: %hhu\n",
>> +				__func__, dma_ch);
> dev_err().

Now using it in most cases, except for two or three functions that would need to have a handle
passed to it solely for the purpose of using dev_*.

>> +	while (intrsrc) {
>> +		dma_ch = lpaif_dai_find_dma_channel(intrsrc);
>> +		if (dma_ch != -1) {
>> +			if (lpaif_dai[dma_ch]->callback) {
>> +
>> +				ret = lpaif_dai[dma_ch]->callback(intrsrc,
>> +					lpaif_dai[dma_ch]->private_data);
>> +			}
>> +			intrsrc &= ~LPAIF_PER_CH(dma_ch);
>> +		} else {
>> +			pr_err("%s: error getting channel\n", __func__);
>> +			break;
>> +		}
>> +	}
>> +	return ret;
>> +}
> This all looks like a very simple demux of a single register - don't we have a generic irqchip
that can handle it?  It looks like that's what you're trying to implement here, each DMA channel
could be requesting the three interrupts it has separately rather than open coding an interrupt
controller here.
> I'm not actually immediately seeing one right now but it'd be simple to add (or regmap-irq could
do it if we used a regmap, though it assumes threading and isn't a great fit).

I will look into this.  If one fits perfectly, great. If not, then I will add one.


-- 
Kenneth Westfield
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,  a Linux Foundation
Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH 0/9] ASoC: QCOM: Add support for ipq806x SOC
@ 2014-11-19 18:52 Kenneth Westfield
  2014-11-19 18:52 ` [PATCH 3/9] ASoC: ipq806x: add native LPAIF driver Kenneth Westfield
  0 siblings, 1 reply; 3+ messages in thread
From: Kenneth Westfield @ 2014-11-19 18:52 UTC (permalink / raw)
  To: ALSA Mailing List, Device Tree Mailing List, MSM Mailing List
  Cc: Kenneth Westfield, Mark Brown, Liam Girdwood, Takashi Iwai,
	Rob Herring, Greg KH, David Brown, Bryan Huntsman,
	Banajit Goswami, Patrick Lai

From: Kenneth Westfield <kwestfie@codeaurora.org>

This set of patches adds support for audio on the Qualcomm Technologies
ipq806x SOC.

The ipq806x SOC has audio-related hardware blocks in its low-power audio
subsystem (or LPASS).  One of the relevant blocks in the LPASS is its
low-power audio interface (or LPAIF).  This encapsulates the MI2S port,
which is what these drivers are configured to use.  The I2S pins are
connected to an external DAC/amp chip.  In addition, a single GPIO is
connected to the same DAC/amp, which gives the SOC enable/disable
control.

The specific drivers added are:
 - a machine driver that handles the board-specific pins
 - a native driver that handles hardware access to the LPAIF
 - a CPU DAI driver for controlling the LPAIF block
 - a PCM MI2S platform driver

Corresponding additions to the device tree for the ipq806x and its
documentation has also been added.  Also, as this is a new directory,
the MAINTAINERS file has been updated as well.

 - Ken

Kenneth Westfield (9):
  MAINTAINERS: Add QCOM audio ASoC maintainer
  ASoC: qcom: Add device tree binding docs
  ASoC: ipq806x: add native LPAIF driver
  ASoC: ipq806x: Add LPASS CPU DAI driver
  ASoC: ipq806x: Add I2S PCM platform driver
  ASoC: ipq806x: Add machine driver for IPQ806X SOC
  ASoC: qcom: Add ability to build QCOM drivers
  ASoC: Allow for building QCOM drivers
  ARM: dts: Model IPQ LPASS audio hardware

 .../bindings/sound/qcom,ipq806x-snd-card.txt       |  41 ++
 .../bindings/sound/qcom,lpass-cpu-dai.txt          |  20 +
 .../devicetree/bindings/sound/qcom,lpass-lpaif.txt |  21 +
 .../bindings/sound/qcom,lpass-pcm-mi2s.txt         |  12 +
 MAINTAINERS                                        |   7 +
 arch/arm/boot/dts/qcom-ipq8064.dtsi                |  33 ++
 sound/soc/Kconfig                                  |   1 +
 sound/soc/Makefile                                 |   1 +
 sound/soc/qcom/Kconfig                             |  43 ++
 sound/soc/qcom/Makefile                            |  11 +
 sound/soc/qcom/ipq806x.c                           | 221 ++++++++++
 sound/soc/qcom/lpass-cpu-dai.c                     | 307 +++++++++++++
 sound/soc/qcom/lpass-lpaif.c                       | 488 +++++++++++++++++++++
 sound/soc/qcom/lpass-lpaif.h                       | 181 ++++++++
 sound/soc/qcom/lpass-pcm-mi2s.c                    | 390 ++++++++++++++++
 sound/soc/qcom/lpass-pcm-mi2s.h                    |  40 ++
 16 files changed, 1817 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,ipq806x-snd-card.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-cpu-dai.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-lpaif.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-pcm-mi2s.txt
 create mode 100644 sound/soc/qcom/Kconfig
 create mode 100644 sound/soc/qcom/Makefile
 create mode 100644 sound/soc/qcom/ipq806x.c
 create mode 100644 sound/soc/qcom/lpass-cpu-dai.c
 create mode 100644 sound/soc/qcom/lpass-lpaif.c
 create mode 100644 sound/soc/qcom/lpass-lpaif.h
 create mode 100644 sound/soc/qcom/lpass-pcm-mi2s.c
 create mode 100644 sound/soc/qcom/lpass-pcm-mi2s.h

-- 
1.8.2.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-08 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-08 22:06 [PATCH 3/9] ASoC: ipq806x: add native LPAIF driver Kenneth Westfield
  -- strict thread matches above, loose matches on Subject: below --
2014-11-19 18:52 [PATCH 0/9] ASoC: QCOM: Add support for ipq806x SOC Kenneth Westfield
2014-11-19 18:52 ` [PATCH 3/9] ASoC: ipq806x: add native LPAIF driver Kenneth Westfield
2014-11-25 21:44   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).