* [PATCH] sound: Add dependency on DMA
@ 2016-11-17 18:52 Florian Fainelli
2016-11-17 19:03 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2016-11-17 18:52 UTC (permalink / raw)
To: linux-kernel
Cc: arnd, Florian Fainelli, Jaroslav Kysela, Takashi Iwai,
moderated list:SOUND
Architectures like m32r do not have a proper DMA-API implementation,
fixes COMPILE_TEST linking failures for the sounds subsystem.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
sound/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/Kconfig b/sound/Kconfig
index 5a240e050ae6..a768704d2f47 100644
--- a/sound/Kconfig
+++ b/sound/Kconfig
@@ -60,6 +60,7 @@ if !M68K && !UML
menuconfig SND
tristate "Advanced Linux Sound Architecture"
+ depends on HAS_DMA
help
Say 'Y' or 'M' to enable ALSA (Advanced Linux Sound Architecture),
the new base sound system.
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] sound: Add dependency on DMA
2016-11-17 18:52 [PATCH] sound: Add dependency on DMA Florian Fainelli
@ 2016-11-17 19:03 ` Takashi Iwai
2016-11-17 19:14 ` Florian Fainelli
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2016-11-17 19:03 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-kernel, moderated list:SOUND, arnd, Jaroslav Kysela
On Thu, 17 Nov 2016 19:52:37 +0100,
Florian Fainelli wrote:
>
> Architectures like m32r do not have a proper DMA-API implementation,
> fixes COMPILE_TEST linking failures for the sounds subsystem.
What error did you get exactly?
There are already CONFIG_HAS_DMA dependency in a few places, so I
wonder what's missing.
thanks,
Takashi
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> sound/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/Kconfig b/sound/Kconfig
> index 5a240e050ae6..a768704d2f47 100644
> --- a/sound/Kconfig
> +++ b/sound/Kconfig
> @@ -60,6 +60,7 @@ if !M68K && !UML
>
> menuconfig SND
> tristate "Advanced Linux Sound Architecture"
> + depends on HAS_DMA
> help
> Say 'Y' or 'M' to enable ALSA (Advanced Linux Sound Architecture),
> the new base sound system.
> --
> 2.9.3
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sound: Add dependency on DMA
2016-11-17 19:03 ` Takashi Iwai
@ 2016-11-17 19:14 ` Florian Fainelli
2016-11-17 19:42 ` Florian Fainelli
0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2016-11-17 19:14 UTC (permalink / raw)
To: Takashi Iwai; +Cc: linux-kernel, moderated list:SOUND, arnd, Jaroslav Kysela
On 11/17/2016 11:03 AM, Takashi Iwai wrote:
> On Thu, 17 Nov 2016 19:52:37 +0100,
> Florian Fainelli wrote:
>>
>> Architectures like m32r do not have a proper DMA-API implementation,
>> fixes COMPILE_TEST linking failures for the sounds subsystem.
>
> What error did you get exactly?
> There are already CONFIG_HAS_DMA dependency in a few places, so I
> wonder what's missing.
They looked like these:
sound/built-in.o: In function `snd_pcm_lib_default_mmap':
(.text+0xbb14): undefined reference to `bad_dma_ops'
sound/built-in.o: In function `snd_pcm_lib_default_mmap':
(.text+0xbb1c): undefined reference to `bad_dma_ops'
sound/built-in.o: In function `snd_pcm_lib_default_mmap':
(.text+0xbb34): undefined reference to `dma_common_mmap'
sound/built-in.o: In function `snd_pcm_lib_default_mmap':
(.text+0xbb34): relocation truncated to fit: R_M32R_26_PCREL_RELA
against undefined symbol `dma_common_mmap'
Makefile:961: recipe for target 'vmlinux' failed
I could probably add an ifdef CONFIG_HAS_DMA just surrounding these
snd_pcm_lib if you think this is more appropriate?
--
Florian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sound: Add dependency on DMA
2016-11-17 19:14 ` Florian Fainelli
@ 2016-11-17 19:42 ` Florian Fainelli
2016-11-18 8:15 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2016-11-17 19:42 UTC (permalink / raw)
To: Takashi Iwai; +Cc: linux-kernel, moderated list:SOUND, arnd, Jaroslav Kysela
On 11/17/2016 11:14 AM, Florian Fainelli wrote:
> On 11/17/2016 11:03 AM, Takashi Iwai wrote:
>> On Thu, 17 Nov 2016 19:52:37 +0100,
>> Florian Fainelli wrote:
>>>
>>> Architectures like m32r do not have a proper DMA-API implementation,
>>> fixes COMPILE_TEST linking failures for the sounds subsystem.
>>
>> What error did you get exactly?
>> There are already CONFIG_HAS_DMA dependency in a few places, so I
>> wonder what's missing.
>
> They looked like these:
>
> sound/built-in.o: In function `snd_pcm_lib_default_mmap':
> (.text+0xbb14): undefined reference to `bad_dma_ops'
> sound/built-in.o: In function `snd_pcm_lib_default_mmap':
> (.text+0xbb1c): undefined reference to `bad_dma_ops'
> sound/built-in.o: In function `snd_pcm_lib_default_mmap':
> (.text+0xbb34): undefined reference to `dma_common_mmap'
> sound/built-in.o: In function `snd_pcm_lib_default_mmap':
> (.text+0xbb34): relocation truncated to fit: R_M32R_26_PCREL_RELA
> against undefined symbol `dma_common_mmap'
> Makefile:961: recipe for target 'vmlinux' failed
>
> I could probably add an ifdef CONFIG_HAS_DMA just surrounding these
> snd_pcm_lib if you think this is more appropriate?
I can't reproduce this build failure reliably anyway now, it was due to
switching between x86/m32r configurations, the only offender was the
Broadcom Cygnus driver, and this has been fixed as well.
Sorry for the noise!
--
Florian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sound: Add dependency on DMA
2016-11-17 19:42 ` Florian Fainelli
@ 2016-11-18 8:15 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2016-11-18 8:15 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-kernel, moderated list:SOUND, arnd, Jaroslav Kysela
On Thu, 17 Nov 2016 20:42:38 +0100,
Florian Fainelli wrote:
>
> On 11/17/2016 11:14 AM, Florian Fainelli wrote:
> > On 11/17/2016 11:03 AM, Takashi Iwai wrote:
> >> On Thu, 17 Nov 2016 19:52:37 +0100,
> >> Florian Fainelli wrote:
> >>>
> >>> Architectures like m32r do not have a proper DMA-API implementation,
> >>> fixes COMPILE_TEST linking failures for the sounds subsystem.
> >>
> >> What error did you get exactly?
> >> There are already CONFIG_HAS_DMA dependency in a few places, so I
> >> wonder what's missing.
> >
> > They looked like these:
> >
> > sound/built-in.o: In function `snd_pcm_lib_default_mmap':
> > (.text+0xbb14): undefined reference to `bad_dma_ops'
> > sound/built-in.o: In function `snd_pcm_lib_default_mmap':
> > (.text+0xbb1c): undefined reference to `bad_dma_ops'
> > sound/built-in.o: In function `snd_pcm_lib_default_mmap':
> > (.text+0xbb34): undefined reference to `dma_common_mmap'
> > sound/built-in.o: In function `snd_pcm_lib_default_mmap':
> > (.text+0xbb34): relocation truncated to fit: R_M32R_26_PCREL_RELA
> > against undefined symbol `dma_common_mmap'
> > Makefile:961: recipe for target 'vmlinux' failed
> >
> > I could probably add an ifdef CONFIG_HAS_DMA just surrounding these
> > snd_pcm_lib if you think this is more appropriate?
>
> I can't reproduce this build failure reliably anyway now, it was due to
> switching between x86/m32r configurations, the only offender was the
> Broadcom Cygnus driver, and this has been fixed as well.
OK, good to hear.
Meanwhile, we can put a patch like below just to be sure, too. But
you can't check whether it works now ;)
thanks,
Takashi
---
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 9d33c1e85c79..8d7a61078b9f 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3403,6 +3403,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
area->vm_end - area->vm_start, area->vm_page_prot);
}
#endif /* CONFIG_GENERIC_ALLOCATOR */
+#ifdef CONFIG_HAS_DMA
#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */
if (!substream->ops->page &&
substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV)
@@ -3412,6 +3413,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
substream->runtime->dma_addr,
area->vm_end - area->vm_start);
#endif /* CONFIG_X86 */
+#endif /* CONFIG_HAS_DMA */
/* mmap with fault handler */
area->vm_ops = &snd_pcm_vm_ops_data_fault;
return 0;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] sound: Add dependency on DMA
@ 2016-11-17 18:50 Florian Fainelli
0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2016-11-17 18:50 UTC (permalink / raw)
To: linux-kernel; +Cc: alsa-devel, tiwaki, perex, arnd, Florian Fainelli
Architectures like m32r do not have a proper DMA-API implementation,
fixes COMPILE_TEST linking failures for the sounds subsystem.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
sound/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/Kconfig b/sound/Kconfig
index 5a240e050ae6..a768704d2f47 100644
--- a/sound/Kconfig
+++ b/sound/Kconfig
@@ -60,6 +60,7 @@ if !M68K && !UML
menuconfig SND
tristate "Advanced Linux Sound Architecture"
+ depends on HAS_DMA
help
Say 'Y' or 'M' to enable ALSA (Advanced Linux Sound Architecture),
the new base sound system.
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-11-18 8:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-17 18:52 [PATCH] sound: Add dependency on DMA Florian Fainelli
2016-11-17 19:03 ` Takashi Iwai
2016-11-17 19:14 ` Florian Fainelli
2016-11-17 19:42 ` Florian Fainelli
2016-11-18 8:15 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2016-11-17 18:50 Florian Fainelli
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).