* [PATCH 1/2] ASoC: cirrus: Enable compile test builds
@ 2013-10-19 13:13 Mark Brown
2013-10-19 13:13 ` [PATCH 2/2] ASoC: ep93xx: Open code dma channel request Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-10-19 13:13 UTC (permalink / raw)
To: Liam Girdwood, Ryan Mallon; +Cc: alsa-devel, Mark Brown
From: Mark Brown <broonie@linaro.org>
The core support for ep93xx (currently only the DMA driver) does not
depend on the architecture at all and everything else has more strict
dependencies so enable compile test builds for improved build coverage.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
sound/soc/cirrus/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/cirrus/Kconfig b/sound/soc/cirrus/Kconfig
index 2c20f01..06f938d 100644
--- a/sound/soc/cirrus/Kconfig
+++ b/sound/soc/cirrus/Kconfig
@@ -1,6 +1,6 @@
config SND_EP93XX_SOC
tristate "SoC Audio support for the Cirrus Logic EP93xx series"
- depends on ARCH_EP93XX && SND_SOC
+ depends on (ARCH_EP93XX || COMPILE_TEST) && SND_SOC
select SND_SOC_GENERIC_DMAENGINE_PCM
help
Say Y or M if you want to add support for codecs attached to
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ASoC: ep93xx: Open code dma channel request
2013-10-19 13:13 [PATCH 1/2] ASoC: cirrus: Enable compile test builds Mark Brown
@ 2013-10-19 13:13 ` Mark Brown
2013-10-19 17:19 ` Lars-Peter Clausen
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-10-19 13:13 UTC (permalink / raw)
To: Liam Girdwood, Ryan Mallon; +Cc: alsa-devel, Mark Brown
From: Mark Brown <broonie@linaro.org>
Currently the ep93xx DMA code is one of the few users relying on the fact
that the compat code uses the dma_data as the filter data for non-DT
channel requests. Since the rest of the core expects this to be a struct
snd_dmaengine_dai_data this isn't terribly helpful this will be changed to
use the already existing filter data so avoid breaking ep93xx by open
coding the current behaviour.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
sound/soc/cirrus/ep93xx-pcm.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/sound/soc/cirrus/ep93xx-pcm.c b/sound/soc/cirrus/ep93xx-pcm.c
index 0e9f56e..cfe517e 100644
--- a/sound/soc/cirrus/ep93xx-pcm.c
+++ b/sound/soc/cirrus/ep93xx-pcm.c
@@ -57,9 +57,22 @@ static bool ep93xx_pcm_dma_filter(struct dma_chan *chan, void *filter_param)
return false;
}
+static struct dma_chan *ep93xx_compat_request_channel(
+ struct snd_soc_pcm_runtime *rtd,
+ struct snd_pcm_substream *substream)
+{
+ struct snd_dmaengine_dai_dma_data *dma_data;
+
+ dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+
+ return snd_dmaengine_pcm_request_channel(ep93xx_pcm_dma_filter,
+ dma_data);
+}
+
static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = {
.pcm_hardware = &ep93xx_pcm_hardware,
.compat_filter_fn = ep93xx_pcm_dma_filter,
+ .compat_request_channel = ep93xx_compat_request_channel,
.prealloc_buffer_size = 131072,
};
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ASoC: ep93xx: Open code dma channel request
2013-10-19 13:13 ` [PATCH 2/2] ASoC: ep93xx: Open code dma channel request Mark Brown
@ 2013-10-19 17:19 ` Lars-Peter Clausen
2013-10-19 20:00 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Lars-Peter Clausen @ 2013-10-19 17:19 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Mark Brown, Liam Girdwood, Ryan Mallon
On 10/19/2013 03:13 PM, Mark Brown wrote:
[...]
> static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = {
> .pcm_hardware = &ep93xx_pcm_hardware,
> .compat_filter_fn = ep93xx_pcm_dma_filter,
The compat_filter_fn attribute should probably removed
> + .compat_request_channel = ep93xx_compat_request_channel,
> .prealloc_buffer_size = 131072,
> };
Otherwise it looks fine
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ASoC: ep93xx: Open code dma channel request
2013-10-19 17:19 ` Lars-Peter Clausen
@ 2013-10-19 20:00 ` Mark Brown
2013-10-22 12:05 ` Lars-Peter Clausen
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-10-19 20:00 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: alsa-devel, Liam Girdwood, Ryan Mallon
[-- Attachment #1.1: Type: text/plain, Size: 692 bytes --]
On Sat, Oct 19, 2013 at 07:19:41PM +0200, Lars-Peter Clausen wrote:
> On 10/19/2013 03:13 PM, Mark Brown wrote:
> [...]
> > static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = {
> > .pcm_hardware = &ep93xx_pcm_hardware,
> > .compat_filter_fn = ep93xx_pcm_dma_filter,
> The compat_filter_fn attribute should probably removed
Yeah, I was in two minds about that. Obviously the ideal thing is to
change the drivers so they can use the filter function again; from that
point of view it's kind of like what's going on with Tegra in intention
- it is notionaly using the filter function, it's just that the DAIs are
putting the data in the wrong place at the minute.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ASoC: ep93xx: Open code dma channel request
2013-10-19 20:00 ` Mark Brown
@ 2013-10-22 12:05 ` Lars-Peter Clausen
0 siblings, 0 replies; 5+ messages in thread
From: Lars-Peter Clausen @ 2013-10-22 12:05 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Liam Girdwood, Ryan Mallon
On 10/19/2013 10:00 PM, Mark Brown wrote:
> On Sat, Oct 19, 2013 at 07:19:41PM +0200, Lars-Peter Clausen wrote:
>> On 10/19/2013 03:13 PM, Mark Brown wrote:
>> [...]
>>> static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = {
>>> .pcm_hardware = &ep93xx_pcm_hardware,
>>> .compat_filter_fn = ep93xx_pcm_dma_filter,
>
>> The compat_filter_fn attribute should probably removed
>
> Yeah, I was in two minds about that. Obviously the ideal thing is to
> change the drivers so they can use the filter function again; from that
> point of view it's kind of like what's going on with Tegra in intention
> - it is notionaly using the filter function, it's just that the DAIs are
> putting the data in the wrong place at the minute.
Ok.
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-22 12:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-19 13:13 [PATCH 1/2] ASoC: cirrus: Enable compile test builds Mark Brown
2013-10-19 13:13 ` [PATCH 2/2] ASoC: ep93xx: Open code dma channel request Mark Brown
2013-10-19 17:19 ` Lars-Peter Clausen
2013-10-19 20:00 ` Mark Brown
2013-10-22 12:05 ` Lars-Peter Clausen
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).