* [PATCH] dmasound_pmac depends on pmac specific config options
@ 2005-10-22 19:46 Olaf Hering
2005-10-22 19:55 ` [PATCH] snd_powermac " Olaf Hering
2005-10-22 21:01 ` [PATCH] dmasound_pmac " Brad Boyer
0 siblings, 2 replies; 6+ messages in thread
From: Olaf Hering @ 2005-10-22 19:46 UTC (permalink / raw)
To: Andrew Morton, Benjamin Herrenschmidt; +Cc: linuxppc-dev
dmasound_pmac should depend on pmac specific .config options.
Since PMAC is always defined, but PMAC wont boot without either
CUDA or PMU, one of these options indicates that the kernel is
for a PowerMac.
CONFIG_PM can be selected unconditionally.
sound/oss/dmasound/dmasound_awacs.c:262: warning: `struct pmu_sleep_notifier' declared inside parameter list
sound/oss/dmasound/dmasound_awacs.c:262: warning: its scope is only this definition or declaration, which is probably not what you want
sound/oss/dmasound/dmasound_awacs.c:263: error: variable `awacs_sleep_notifier' has initializer but incomplete type
sound/oss/dmasound/dmasound_awacs.c:264: warning: excess elements in struct initializer
sound/oss/dmasound/dmasound_awacs.c:264: warning: (near initialization for `awacs_sleep_notifier')
sound/oss/dmasound/dmasound_awacs.c:264: error: `SLEEP_LEVEL_SOUND' undeclared here (not in a function)
sound/oss/dmasound/dmasound_awacs.c:264: warning: excess elements in struct initializer
sound/oss/dmasound/dmasound_awacs.c:264: warning: (near initialization for `awacs_sleep_notifier')
sound/oss/dmasound/dmasound_awacs.c: In function `PMacIrqCleanup':
sound/oss/dmasound/dmasound_awacs.c:679: warning: implicit declaration of function `pmu_unregister_sleep_notifier'
sound/oss/dmasound/dmasound_awacs.c: At top level:
sound/oss/dmasound/dmasound_awacs.c:1424: error: conflicting types for `awacs_sleep_notify'
sound/oss/dmasound/dmasound_awacs.c:262: error: previous declaration of `awacs_sleep_notify'
sound/oss/dmasound/dmasound_awacs.c: In function `awacs_sleep_notify':
sound/oss/dmasound/dmasound_awacs.c:1428: error: `PBOOK_SLEEP_NOW' undeclared (first use in this function)
sound/oss/dmasound/dmasound_awacs.c:1428: error: (Each undeclared identifier is reported only once
sound/oss/dmasound/dmasound_awacs.c:1428: error: for each function it appears in.)
sound/oss/dmasound/dmasound_awacs.c:1481: error: `PBOOK_WAKE' undeclared (first use in this function)
sound/oss/dmasound/dmasound_awacs.c:1552: error: `PBOOK_SLEEP_OK' undeclared (first use in this function)
sound/oss/dmasound/dmasound_awacs.c: In function `dmasound_awacs_init':
sound/oss/dmasound/dmasound_awacs.c:3057: warning: implicit declaration of function `pmu_register_sleep_notifier'
sound/oss/dmasound/dmasound_awacs.c: At top level:
sound/oss/dmasound/dmasound_awacs.c:263: error: storage size of `awacs_sleep_notifier' isn't known
Signed-off-by: Olaf Hering <olh@suse.de>
sound/oss/dmasound/Kconfig | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.14-rc5/sound/oss/dmasound/Kconfig
===================================================================
--- linux-2.6.14-rc5.orig/sound/oss/dmasound/Kconfig
+++ linux-2.6.14-rc5/sound/oss/dmasound/Kconfig
@@ -14,7 +14,7 @@ config DMASOUND_ATARI
config DMASOUND_PMAC
tristate "PowerMac DMA sound support"
- depends on PPC32 && PPC_PMAC && SOUND && I2C
+ depends on PPC32 && PPC_PMAC && SOUND && I2C && (ADB_CUDA || ADB_PMU)
select DMASOUND
help
If you want to use the internal audio of your PowerMac in Linux,
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] snd_powermac depends on pmac specific config options
2005-10-22 19:46 [PATCH] dmasound_pmac depends on pmac specific config options Olaf Hering
@ 2005-10-22 19:55 ` Olaf Hering
2005-10-22 21:01 ` [PATCH] dmasound_pmac " Brad Boyer
1 sibling, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2005-10-22 19:55 UTC (permalink / raw)
To: Andrew Morton, Benjamin Herrenschmidt; +Cc: linuxppc-dev
snd_powermac should depend on pmac specific .config options.
Since PMAC is always defined, but PMAC wont boot without either
CUDA or PMU, one of these options indicates that the kernel is
for a PowerMac.
CONFIG_PM can be selected unconditionally.
sound/ppc/pmac.c:1380: warning: `struct pmu_sleep_notifier' declared inside parameter list
sound/ppc/pmac.c:1380: warning: its scope is only this definition or declaration, which is probably not what you want
sound/ppc/pmac.c: In function `snd_pmac_sleep_notify':
sound/ppc/pmac.c:1388: error: `PBOOK_SLEEP_NOW' undeclared (first use in this function)
sound/ppc/pmac.c:1388: error: (Each undeclared identifier is reported only once
sound/ppc/pmac.c:1388: error: for each function it appears in.)
sound/ppc/pmac.c:1391: error: `PBOOK_WAKE' undeclared (first use in this function)
sound/ppc/pmac.c:1395: error: `PBOOK_SLEEP_OK' undeclared (first use in this function)
sound/ppc/pmac.c: At top level:
sound/ppc/pmac.c:1398: error: variable `snd_pmac_sleep_notifier' has initializer but incomplete type
sound/ppc/pmac.c:1399: warning: excess elements in struct initializer
sound/ppc/pmac.c:1399: warning: (near initialization for `snd_pmac_sleep_notifier')
sound/ppc/pmac.c:1399: error: `SLEEP_LEVEL_SOUND' undeclared here (not in a function)
sound/ppc/pmac.c:1399: warning: excess elements in struct initializer
sound/ppc/pmac.c:1399: warning: (near initialization for `snd_pmac_sleep_notifier')
sound/ppc/pmac.c: In function `snd_pmac_register_sleep_notifier':
sound/ppc/pmac.c:1407: warning: implicit declaration of function `pmu_register_sleep_notifier'
sound/ppc/pmac.c: In function `snd_pmac_unregister_sleep_notifier':
sound/ppc/pmac.c:1415: warning: implicit declaration of function `pmu_unregister_sleep_notifier'
sound/ppc/pmac.c: At top level:
sound/ppc/pmac.c:1398: error: storage size of `snd_pmac_sleep_notifier' isn't known
make[3]: *** [sound/ppc/pmac.o] Error 1
Signed-off-by: Olaf Hering <olh@suse.de>
sound/ppc/Kconfig | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.14-rc5/sound/ppc/Kconfig
===================================================================
--- linux-2.6.14-rc5.orig/sound/ppc/Kconfig
+++ linux-2.6.14-rc5/sound/ppc/Kconfig
@@ -11,7 +11,7 @@ comment "ALSA PowerMac requires INPUT"
config SND_POWERMAC
tristate "PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)"
- depends on SND && I2C && INPUT && PPC_PMAC
+ depends on SND && I2C && INPUT && PPC_PMAC && (ADB_CUDA || ADB_PMU)
select SND_PCM
select SND_GENERIC_DRIVER
help
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dmasound_pmac depends on pmac specific config options
2005-10-22 19:46 [PATCH] dmasound_pmac depends on pmac specific config options Olaf Hering
2005-10-22 19:55 ` [PATCH] snd_powermac " Olaf Hering
@ 2005-10-22 21:01 ` Brad Boyer
2005-10-22 21:19 ` Olaf Hering
2005-10-22 23:00 ` Benjamin Herrenschmidt
1 sibling, 2 replies; 6+ messages in thread
From: Brad Boyer @ 2005-10-22 21:01 UTC (permalink / raw)
To: Olaf Hering; +Cc: Andrew Morton, linuxppc-dev
On Sat, Oct 22, 2005 at 09:46:26PM +0200, Olaf Hering wrote:
>
> dmasound_pmac should depend on pmac specific .config options.
> Since PMAC is always defined, but PMAC wont boot without either
> CUDA or PMU, one of these options indicates that the kernel is
> for a PowerMac.
> CONFIG_PM can be selected unconditionally.
I disagree. I think a much better solution would be to change the
code to be conditionalized internally on PMU support, rather than
having #ifdef CONFIG_PM since the functions being called inside
that protection are actually out of the PMU code, not the generic
power management system. By doing this, you could for example
have a kernel compiled for a 1st gen PCI PowerMac without any
extra drivers. In this case, you have CUDA and AWACS, but there
is no PMU support and no need for sleep notifiers.
Similar comments on the other patch.
Brad Boyer
flar@allandria.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dmasound_pmac depends on pmac specific config options
2005-10-22 21:01 ` [PATCH] dmasound_pmac " Brad Boyer
@ 2005-10-22 21:19 ` Olaf Hering
2005-10-22 23:03 ` Brad Boyer
2005-10-22 23:00 ` Benjamin Herrenschmidt
1 sibling, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2005-10-22 21:19 UTC (permalink / raw)
To: Brad Boyer; +Cc: Andrew Morton, linuxppc-dev
On Sat, Oct 22, Brad Boyer wrote:
> I disagree. I think a much better solution would be to change the
> code to be conditionalized internally on PMU support, rather than
> having #ifdef CONFIG_PM since the functions being called inside
> that protection are actually out of the PMU code, not the generic
> power management system. By doing this, you could for example
> have a kernel compiled for a 1st gen PCI PowerMac without any
> extra drivers. In this case, you have CUDA and AWACS, but there
> is no PMU support and no need for sleep notifiers.
May patch would allow that, you need either CUDA or PMU support.
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dmasound_pmac depends on pmac specific config options
2005-10-22 21:01 ` [PATCH] dmasound_pmac " Brad Boyer
2005-10-22 21:19 ` Olaf Hering
@ 2005-10-22 23:00 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2005-10-22 23:00 UTC (permalink / raw)
To: Brad Boyer; +Cc: Andrew Morton, linuxppc-dev, Olaf Hering
On Sat, 2005-10-22 at 14:01 -0700, Brad Boyer wrote:
> On Sat, Oct 22, 2005 at 09:46:26PM +0200, Olaf Hering wrote:
> >
> > dmasound_pmac should depend on pmac specific .config options.
> > Since PMAC is always defined, but PMAC wont boot without either
> > CUDA or PMU, one of these options indicates that the kernel is
> > for a PowerMac.
> > CONFIG_PM can be selected unconditionally.
>
> I disagree. I think a much better solution would be to change the
> code to be conditionalized internally on PMU support, rather than
> having #ifdef CONFIG_PM since the functions being called inside
> that protection are actually out of the PMU code, not the generic
> power management system. By doing this, you could for example
> have a kernel compiled for a 1st gen PCI PowerMac without any
> extra drivers. In this case, you have CUDA and AWACS, but there
> is no PMU support and no need for sleep notifiers.
The fix is a longer term issue. dmasound should stop using PMU specific
PM notifiers and those should finally be deprecated. Taht would require
converting dmasound to be a proper macio device, which is a pain, and
while we are at it, finally rewriting dmasound (and/or snd-powermac)
properly which is on my todolist since nobody appears to be up to it.
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dmasound_pmac depends on pmac specific config options
2005-10-22 21:19 ` Olaf Hering
@ 2005-10-22 23:03 ` Brad Boyer
0 siblings, 0 replies; 6+ messages in thread
From: Brad Boyer @ 2005-10-22 23:03 UTC (permalink / raw)
To: Olaf Hering; +Cc: Andrew Morton, linuxppc-dev
On Sat, Oct 22, 2005 at 11:19:06PM +0200, Olaf Hering wrote:
> On Sat, Oct 22, Brad Boyer wrote:
>
> > I disagree. I think a much better solution would be to change the
> > code to be conditionalized internally on PMU support, rather than
> > having #ifdef CONFIG_PM since the functions being called inside
> > that protection are actually out of the PMU code, not the generic
> > power management system. By doing this, you could for example
> > have a kernel compiled for a 1st gen PCI PowerMac without any
> > extra drivers. In this case, you have CUDA and AWACS, but there
> > is no PMU support and no need for sleep notifiers.
>
> May patch would allow that, you need either CUDA or PMU support.
The problem is not that you need CUDA or PMU support. The real
problem is that if you have CONFIG_PM set and do not have
CONFIG_ADB_PMU set, the pmac sound drivers don't compile because
they have calls into the pmu code protected by #ifdef CONFIG_PM,
which isn't enough to ensure that those symbols actually exist.
That code gets into the kernel only if you have CONFIG_PM and
CONFIG_ADB_PMU both set. Your patch will still fail in the
following case:
CONFIG_PM set
CONFIG_CUDA set
CONFIG_ADB_PMU not set
If you enable either of the pmac sound drivers with this setup,
it will fail to compile with exactly the same error.
Brad Boyer
flar@allandria.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-10-22 23:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-22 19:46 [PATCH] dmasound_pmac depends on pmac specific config options Olaf Hering
2005-10-22 19:55 ` [PATCH] snd_powermac " Olaf Hering
2005-10-22 21:01 ` [PATCH] dmasound_pmac " Brad Boyer
2005-10-22 21:19 ` Olaf Hering
2005-10-22 23:03 ` Brad Boyer
2005-10-22 23:00 ` Benjamin Herrenschmidt
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).