From patchwork Tue May 12 04:06:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Westfield X-Patchwork-Id: 6385411 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9C8B4BEEE1 for ; Tue, 12 May 2015 04:06:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 826BF203DA for ; Tue, 12 May 2015 04:06:27 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 97A012038D for ; Tue, 12 May 2015 04:06:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 21C89265361; Tue, 12 May 2015 06:06:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 02D29265335; Tue, 12 May 2015 06:06:15 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D8A14265062; Tue, 12 May 2015 06:06:13 +0200 (CEST) Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by alsa0.perex.cz (Postfix) with ESMTP id 60E62265062 for ; Tue, 12 May 2015 06:06:06 +0200 (CEST) Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 63EC313FA79; Tue, 12 May 2015 04:06:04 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 34EA013FA83; Tue, 12 May 2015 04:06:04 +0000 (UTC) Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: kwestfie@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3446413FA79; Tue, 12 May 2015 04:06:03 +0000 (UTC) Date: Mon, 11 May 2015 21:06:02 -0700 From: Kenneth Westfield To: Srinivas Kandagatla Message-ID: <20150512040600.GA24087@kwestfie-linux.qualcomm.com> Mail-Followup-To: Srinivas Kandagatla , Patrick Lai , Mark Brown , Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , Banajit Goswami , 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 References: <1430414148-10869-1-git-send-email-srinivas.kandagatla@linaro.org> <20150502235704.GA27804@kwestfie-linux.qualcomm.com> <20150506054758.GD5639@kwestfie-linux.qualcomm.com> <5549BA98.9080501@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5549BA98.9080501@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Banajit Goswami , Pawel Moll , Ian Campbell , Takashi Iwai , linux-kernel@vger.kernel.org, Patrick Lai , Liam Girdwood , Rob Herring , Mark Brown , Kumar Gala , linux-arm-msm@vger.kernel.org Subject: Re: [alsa-devel] [RFC PATCH 00/14] ASoC: qcom: add support to apq8016 audio X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, May 05, 2015 at 11:54:16PM -0700, Srinivas Kandagatla wrote: > Hi Kenneth, > > On 06/05/15 06:47, Kenneth Westfield wrote: > >>> > >>>I will test the patches and let you know by Wednesday. Also, I posted > >>>some comments, but Patrick should be posting his comments separately > >>>later next week. > >Srinivas, > > > >After applying the patches, audio playback is no longer functional on > >the storm board. Give me some time to debug this and I will get back > >to you. > I found atleast one issue with rdma audif bits in ipq806x lpass > > could you try change, this will be fixed properly in next version. > > -----------------------><--------------------------------------------- > diff --git a/sound/soc/qcom/lpass-ipq806x.c > b/sound/soc/qcom/lpass-ipq806x.c > index 11a7053..2b00355 100644 > --- a/sound/soc/qcom/lpass-ipq806x.c > +++ b/sound/soc/qcom/lpass-ipq806x.c > @@ -69,6 +69,7 @@ struct lpass_variant ipq806x_data = { > .rdma_reg_base = 0x6000, > .rdma_reg_stride = 0x1000, > .rdma_channels = 4, > + .rdmactl_audif_start = 4, > .dai_driver = &lpass_cpu_dai_driver, > .num_dai = 1, > > -----------------------><--------------------------------------------- Srinivas, I was able to get audio working on the Storm board. There were several issues. First, the I2S control port was saved in the DAI driver id field (which was 4), but the DAI id field was used by the macro (which was 0). The patch below fixed it: -----------------------><--------------------------------------------- -----------------------><--------------------------------------------- Please incorporate these fixes into your next patch series. diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 17ad20d..58ae8af 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -146,7 +146,7 @@ static int lpass_cpu_daiops_hw_params(struct snd_pcm_substream *substream, } ret = regmap_write(drvdata->lpaif_map, - LPAIF_I2SCTL_REG(drvdata->variant, dai->id), + LPAIF_I2SCTL_REG(drvdata->variant, dai->driver->id), regval); if (ret) { dev_err(dai->dev, "%s() error writing to i2sctl reg: %d\n", @@ -171,7 +171,7 @@ static int lpass_cpu_daiops_hw_free(struct snd_pcm_substream *substream, int ret; ret = regmap_write(drvdata->lpaif_map, - LPAIF_I2SCTL_REG(drvdata->variant, dai->id), 0); + LPAIF_I2SCTL_REG(drvdata->variant, dai->driver->id), 0); if (ret) dev_err(dai->dev, "%s() error writing to i2sctl reg: %d\n", __func__, ret); @@ -186,7 +186,7 @@ static int lpass_cpu_daiops_prepare(struct snd_pcm_substream *substream, int ret; ret = regmap_update_bits(drvdata->lpaif_map, - LPAIF_I2SCTL_REG(drvdata->variant, dai->id), + LPAIF_I2SCTL_REG(drvdata->variant, dai->driver->id), LPAIF_I2SCTL_SPKEN_MASK, LPAIF_I2SCTL_SPKEN_ENABLE); if (ret) dev_err(dai->dev, "%s() error writing to i2sctl reg: %d\n", @@ -206,7 +206,7 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream, case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ret = regmap_update_bits(drvdata->lpaif_map, - LPAIF_I2SCTL_REG(drvdata->variant, dai->id), + LPAIF_I2SCTL_REG(drvdata->variant, dai->driver->id), LPAIF_I2SCTL_SPKEN_MASK, LPAIF_I2SCTL_SPKEN_ENABLE); if (ret) @@ -217,7 +217,7 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream, case SNDRV_PCM_TRIGGER_SUSPEND: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ret = regmap_update_bits(drvdata->lpaif_map, - LPAIF_I2SCTL_REG(drvdata->variant, dai->id), + LPAIF_I2SCTL_REG(drvdata->variant, dai->driver->id), LPAIF_I2SCTL_SPKEN_MASK, LPAIF_I2SCTL_SPKEN_DISABLE); if (ret) @@ -247,7 +247,7 @@ int lpass_cpu_dai_probe(struct snd_soc_dai *dai) /* ensure audio hardware is disabled */ ret = regmap_write(drvdata->lpaif_map, - LPAIF_I2SCTL_REG(drvdata->variant, dai->id), 0); + LPAIF_I2SCTL_REG(drvdata->variant, dai->driver->id), 0); if (ret) dev_err(dai->dev, "%s() error writing to i2sctl reg: %d\n", __func__, ret); -----------------------><--------------------------------------------- In addition to your patch above, I also needed to correct the rdma_port assignment by removing the i2s port reference: -----------------------><--------------------------------------------- diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index c5907d5..580cae1 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -91,7 +91,7 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream, unsigned int channels = params_channels(params); unsigned int regval; int bitwidth; - int ret, rdma_port = pcm_data->i2s_port + v->rdmactl_audif_start; + int ret, rdma_port = v->rdmactl_audif_start; bitwidth = snd_pcm_format_width(format); if (bitwidth < 0) {