From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Westfield Subject: Re: [RFC PATCH 03/14] ASoC: qcom: move ipq806x specific bits out of lpass driver. Date: Mon, 4 May 2015 22:19:28 -0700 Message-ID: <20150505051913.GA12961@kwestfie-linux.qualcomm.com> References: <1430414148-10869-1-git-send-email-srinivas.kandagatla@linaro.org> <1430414213-10997-1-git-send-email-srinivas.kandagatla@linaro.org> <20150502235738.GB27804@kwestfie-linux.qualcomm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:48563 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166AbbEEFTa (ORCPT ); Tue, 5 May 2015 01:19:30 -0400 Content-Disposition: inline In-Reply-To: <20150502235738.GB27804@kwestfie-linux.qualcomm.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Srinivas Kandagatla Cc: Patrick Lai , Mark Brown , Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , Banajit Goswami , Kenneth Westfield , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org On Sat, May 02, 2015 at 04:57:38PM -0700, Kenneth Westfield wrote: > On Thu, Apr 30, 2015 at 06:16:53PM +0100, Srinivas Kandagatla wrote: > > This patch tries to make the lpass driver more generic by moving the > > ipq806x specific bits out of the cpu and platform driver, also allows > the > > SOC specific drivers to add the correct register offsets. > > > > This patch also renames the register definition header file into more > > generic header file. > > > diff --git a/sound/soc/qcom/lpass-ipq806x.c > b/sound/soc/qcom/lpass-ipq806x.c > > new file mode 100644 > > index 0000000..8e9a427 > > --- /dev/null > > +++ b/sound/soc/qcom/lpass-ipq806x.c > > +enum lpaif_i2s_ports { > > + LPAIF_I2S_PORT_MIN = 0, > > + > > + LPAIF_I2S_PORT_CODEC_SPK = 0, > > + LPAIF_I2S_PORT_CODEC_MIC = 1, > > + LPAIF_I2S_PORT_SEC_SPK = 2, > > + LPAIF_I2S_PORT_SEC_MIC = 3, > > + LPAIF_I2S_PORT_MI2S = 4, > > + > > + LPAIF_I2S_PORT_MAX = 4, > > + LPAIF_I2S_PORT_NUM = 5, > > +}; > > These port mappings here... > > > +enum lpaif_irq_ports { > > + LPAIF_IRQ_PORT_MIN = 0, > > + > > + LPAIF_IRQ_PORT_HOST = 0, > > + LPAIF_IRQ_PORT_ADSP = 1, > > + > > + LPAIF_IRQ_PORT_MAX = 2, > > + LPAIF_IRQ_PORT_NUM = 3, > > +}; > > ...here... > > > +enum lpaif_dma_channels { > > + LPAIF_RDMA_CHAN_MIN = 0, > > + > > + LPAIF_RDMA_CHAN_MI2S = 0, > > + LPAIF_RDMA_CHAN_PCM0 = 1, > > + LPAIF_RDMA_CHAN_PCM1 = 2, > > + > > + LPAIF_RDMA_CHAN_MAX = 4, > > + LPAIF_RDMA_CHAN_NUM = 5, > > +}; > > ...and here can be SOC-specific. Should move them to the SOC-specific > files. Expanding on this, the I2S port mappings for the APQ8016 should replace the ones defined above with the constants you refer to in dt-bindings/sound/apq8016.h: MI2S_PRIMARY MI2S_SECONDARY etc. Maybe defining a corresponding ipq806x.h in the same directory, and moving the above definitions there? -- Kenneth Westfield Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project