From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Nuno Sá" <nuno.sa@analog.com>
Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org,
linux-sound@vger.kernel.org, linux-spi@vger.kernel.org,
"Vinod Koul" <vkoul@kernel.org>, "Frank Li" <Frank.Li@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Eugeniy Paltsev" <Eugeniy.Paltsev@synopsys.com>,
"Amélie Delaunay" <amelie.delaunay@foss.st.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Mark Brown" <broonie@kernel.org>, "Frank Li" <Frank.Li@nxp.com>
Subject: Re: [PATCH v4 08/10] ALSA: pcm_dmaengine: Use dma_slave_caps bus width helpers
Date: Mon, 14 Sep 2026 11:12:09 +0300 [thread overview]
Message-ID: <aqesWfdIsiR31sql@ashevche-desk.local> (raw)
In-Reply-To: <20260911-dmaengine-support-wider-dma-masks-v4-8-72b8fd4cc78e@analog.com>
On Fri, Sep 11, 2026 at 06:25:43PM +0100, Nuno Sá wrote:
> Use the dma_slave_caps bus width helpers instead of reading the legacy
> src_addr_widths and dst_addr_widths masks directly.
>
> Keep the existing default assumption of 1, 2 and 4 byte widths when the
> DMA channel does not report slave capabilities.
...
> int snd_dmaengine_pcm_refine_runtime_hwparams(
> struct snd_pcm_hardware *hw,
> struct dma_chan *chan)
> {
> + enum dma_slave_buswidth default_widths[] = {
> + DMA_SLAVE_BUSWIDTH_1_BYTE,
> + DMA_SLAVE_BUSWIDTH_2_BYTES,
> + DMA_SLAVE_BUSWIDTH_4_BYTES,
> + };
> struct dma_slave_caps dma_caps;
> - u32 addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
> - BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
> - BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
> + dma_buswidth_mask_t bus_widths = {};
Do you really need the zeroing?
> snd_pcm_format_t i;
> int ret = 0;
> if (!hw || !chan || !dma_data)
> return -EINVAL;
>
> + ret = dma_bus_width_set_many(bus_widths, default_widths,
> + ARRAY_SIZE(default_widths));
> + if (ret)
> + return ret;
I assume that if ret == 0, bus_widths should be set accordingly.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-14 8:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 17:25 [PATCH v4 00/10] dmaengine: Support bus widths of 32 bytes and above Nuno Sá
2026-09-11 17:25 ` [PATCH v4 01/10] dmaengine: Move enum dma_slave_buswidth to a new header Nuno Sá
2026-09-12 7:57 ` Andy Shevchenko
2026-09-14 14:18 ` Frank Li
2026-09-14 15:40 ` Nuno Sá
2026-09-11 17:25 ` [PATCH v4 02/10] dmaengine: Support bus widths of 32 bytes and above Nuno Sá
2026-09-14 8:05 ` Andy Shevchenko
2026-09-11 17:25 ` [PATCH v4 03/10] dmaengine: dma-axi-dmac: Use bus width capability helpers Nuno Sá
2026-09-11 17:25 ` [PATCH v4 04/10] dmaengine: dw-axi-dmac: " Nuno Sá
2026-09-11 17:25 ` [PATCH v4 05/10] dmaengine: qcom: gpi: " Nuno Sá
2026-09-11 17:25 ` [PATCH v4 06/10] dmaengine: stm32-dma3: " Nuno Sá
2026-09-11 17:25 ` [PATCH v4 07/10] iio: buffer-dmaengine: Use dma_slave_caps bus width accessors Nuno Sá
2026-09-14 8:06 ` Andy Shevchenko
2026-09-11 17:25 ` [PATCH v4 08/10] ALSA: pcm_dmaengine: Use dma_slave_caps bus width helpers Nuno Sá
2026-09-14 8:12 ` Andy Shevchenko [this message]
2026-09-14 15:39 ` Nuno Sá
2026-09-11 17:25 ` [PATCH v4 09/10] spi: dw: " Nuno Sá
2026-09-11 17:25 ` [PATCH v4 10/10] dmaengine: Drop legacy bus width fields from dma_slave_caps Nuno Sá
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=aqesWfdIsiR31sql@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=andy@kernel.org \
--cc=broonie@kernel.org \
--cc=dlechner@baylibre.com \
--cc=dmaengine@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=nuno.sa@analog.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.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
all inboxes | Powered by JetHome®