From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org
Subject: Re: [PATCH 18/31] ASoC: tegra: allocate AHUB FIFO during probe() not startup()
Date: Fri, 29 Nov 2013 15:40:27 +0100 [thread overview]
Message-ID: <20131129144025.GA9712@ulmo.nvidia.com> (raw)
In-Reply-To: <1384548866-13141-19-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2115 bytes --]
On Fri, Nov 15, 2013 at 01:54:13PM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> Teh Tegra30 I2S driver currently allocates DMA FIFOs from the AHUB only
s/Teh/The/
> when an audio stream starts playback. This is theoretically nice for
> resource sharing, but makes no practical difference for any configuration
> the drivers currently support. However, this deferral prevents conversion
> to the standard DMA DT bindings, since conversion requires knowledge of
> the specific DMA channel to be allocated, which in turn depends on which
> specific FIFO was allocated.
>
> For this reason, move the FIFO allocate into probe() to allow later
s/allocate/allocation/?
[...]
> + i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> + i2s->playback_dma_data.maxburst = 4;
> + ret = tegra30_ahub_allocate_tx_fifo(&i2s->playback_fifo_cif,
> + &i2s->playback_dma_data.addr,
> + &i2s->playback_dma_data.slave_id);
> + if (ret) {
> + dev_err(&pdev->dev, "Could not alloc TX FIFO: %d\n", ret);
> + goto err_suspend;
> + }
> + ret = tegra30_ahub_set_rx_cif_source(i2s->playback_i2s_cif,
> + i2s->playback_fifo_cif);
> + if (ret) {
> + dev_err(&pdev->dev, "Could not route TX FIFO: %d\n", ret);
> + goto err_free_tx_fifo;
> + }
> +
> + i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> + i2s->capture_dma_data.maxburst = 4;
> + ret = tegra30_ahub_allocate_rx_fifo(&i2s->capture_fifo_cif,
> + &i2s->capture_dma_data.addr,
> + &i2s->capture_dma_data.slave_id);
> + if (ret) {
> + dev_err(&pdev->dev, "Could not alloc RX FIFO: %d\n", ret);
> + goto err_unroute_tx_fifo;
> + }
> + ret = tegra30_ahub_set_rx_cif_source(i2s->capture_fifo_cif,
> + i2s->capture_i2s_cif);
> + if (ret) {
> + dev_err(&pdev->dev, "Could not route TX FIFO: %d\n", ret);
> + goto err_free_rx_fifo;
> + }
> +
It could be useful to have these in a separate function so as not to
make the .probe() any larger. It's already pretty big as it is.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-11-29 14:40 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 20:53 [PATCH 00/31] ARM: tegra: use common reset and DMA bindings Stephen Warren
[not found] ` <1384548866-13141-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-15 20:54 ` [PATCH 14/31] ASoC: dmaengine: support deferred probe for DMA channels Stephen Warren
[not found] ` <1384548866-13141-15-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-16 9:29 ` Mark Brown
2013-11-16 10:49 ` [alsa-devel] " Lars-Peter Clausen
[not found] ` <52874D9E.1010708-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-11-18 17:59 ` Stephen Warren
2013-11-15 20:54 ` [PATCH 15/31] ASoC: dmaengine: add custom DMA config to snd_dmaengine_pcm_config Stephen Warren
[not found] ` <1384548866-13141-16-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-16 9:44 ` Mark Brown
2013-11-18 18:45 ` Stephen Warren
2013-11-19 9:35 ` Mark Brown
2013-11-16 10:43 ` [alsa-devel] " Lars-Peter Clausen
2013-11-15 20:54 ` [PATCH 16/31] ASoC: tegra: use reset framework Stephen Warren
2013-11-16 9:55 ` Mark Brown
2013-11-18 17:21 ` Stephen Warren
[not found] ` <528A4C8C.3030200-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-18 18:37 ` Mark Brown
[not found] ` <20131118183716.GR2674-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-25 21:56 ` Stephen Warren
[not found] ` <5293C787.1030005-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-26 13:14 ` Mark Brown
[not found] ` <20131126131410.GK14725-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-26 16:31 ` Stephen Warren
2013-11-26 18:37 ` Mark Brown
[not found] ` <20131126183739.GR14725-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-26 18:45 ` Stephen Warren
2013-11-15 20:54 ` [PATCH 17/31] ASoC: tegra: call pm_runtime APIs around register accesses Stephen Warren
[not found] ` <1384548866-13141-18-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-16 10:02 ` Mark Brown
[not found] ` <20131116100205.GG15393-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-18 17:25 ` Stephen Warren
[not found] ` <528A4D9A.10809-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-18 18:39 ` Mark Brown
[not found] ` <20131118183947.GS2674-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-18 22:38 ` Stephen Warren
[not found] ` <528A96EC.4040409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-19 9:53 ` Mark Brown
2013-11-15 20:54 ` [PATCH 18/31] ASoC: tegra: allocate AHUB FIFO during probe() not startup() Stephen Warren
[not found] ` <1384548866-13141-19-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-16 10:04 ` Mark Brown
2013-11-29 14:40 ` Thierry Reding [this message]
[not found] ` <20131129144025.GA9712-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-12-03 19:55 ` Stephen Warren
[not found] ` <529E374B.8090903-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-12-04 9:00 ` Thierry Reding
2013-11-15 20:54 ` [PATCH 19/31] ASoC: tegra: convert to standard DMA DT bindings Stephen Warren
[not found] ` <1384548866-13141-20-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-16 10:05 ` Mark Brown
2013-11-18 8:24 ` [PATCH 00/31] ARM: tegra: use common reset and DMA bindings Terje Bergström
2013-11-20 15:37 ` Arnd Bergmann
2013-11-20 16:45 ` Stephen Warren
2013-11-20 17:03 ` Arnd Bergmann
2013-11-20 17:23 ` Stephen Warren
2013-11-20 19:17 ` [Ac100] " Martino Brandolini
2013-12-12 0:11 ` Stephen Warren
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=20131129144025.GA9712@ulmo.nvidia.com \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
/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 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).