From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Jyri Sarha <jsarha@ti.com>,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-omap@vger.kernel.org
Cc: broonie@kernel.org, liam.r.girdwood@linux.intel.com,
bcousson@baylibre.com, misael.lopez@ti.com
Subject: Re: [PATCH] ASoC: davinci-mcasp: Choose PCM driver based on configured DMA controller
Date: Tue, 2 Jun 2015 14:55:10 +0300 [thread overview]
Message-ID: <556D999E.8000306@ti.com> (raw)
In-Reply-To: <556D8F7F.7090803@ti.com>
On 06/02/2015 02:11 PM, Jyri Sarha wrote:
>>> - switch (mcasp->version) {
>>> + ret = -EINVAL;
>>
>> Why? What was the problem with setting the ret in the default case?
>>
>
> I would need to have that I three places now for the #else cases, when
> devicetree tries to configure pcm driver that has not been compiled.
I see now, thanks for pointing out ;)
>>> + switch (davinci_mcasp_get_dma_type(mcasp)) {
>>> + case MCASP_EDMA:
>>> #if IS_BUILTIN(CONFIG_SND_EDMA_SOC) || \
>>> (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \
>>> IS_MODULE(CONFIG_SND_EDMA_SOC))
>>> - case MCASP_VERSION_1:
>>> - case MCASP_VERSION_2:
>>> - case MCASP_VERSION_3:
>>> ret = edma_pcm_platform_register(&pdev->dev);
>>> - break;
>>> +#else
>>> + dev_err(&pdev->dev, "Missing SND_EDMA_SOC\n");
>>> #endif
>>> + break;
>>> + case MCASP_SDMA:
>>> #if IS_BUILTIN(CONFIG_SND_OMAP_SOC) || \
>>> (IS_MODULE(CONFIG_SND_DAVINCI_SOC_MCASP) && \
>>> IS_MODULE(CONFIG_SND_OMAP_SOC))
>>> - case MCASP_VERSION_4:
>>> ret = omap_pcm_platform_register(&pdev->dev);
>>> - break;
>>> +#else
>>> + dev_err(&pdev->dev, "Missing SND_SDMA_SOC\n");
>>> #endif
>>> + break;
>>> default:
>>> - dev_err(&pdev->dev, "Invalid McASP version: %d\n",
>>> - mcasp->version);
>>> - ret = -EINVAL;
>>> + dev_err(&pdev->dev, "No DMA controller found\n");
>>> break;
>>> }
--
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-06-02 11:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 8:58 [PATCH] ASoC: davinci-mcasp: Choose PCM driver based on configured DMA controller Jyri Sarha
2015-06-02 10:31 ` Peter Ujfalusi
2015-06-02 10:40 ` Jyri Sarha
2015-06-02 10:53 ` Peter Ujfalusi
2015-06-02 10:46 ` Mark Brown
2015-06-02 11:11 ` Jyri Sarha
2015-06-02 11:55 ` Peter Ujfalusi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=556D999E.8000306@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=bcousson@baylibre.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jsarha@ti.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-omap@vger.kernel.org \
--cc=misael.lopez@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.