alsa-kernel: fm801: move CONFIG_VIDEO_DEV dependency to CONFIG_SND_FM801_TEA575X_BOOL
At Fri, 18 Aug 2006 09:24:25 +0200 (CEST),
Quoted 6 lines · Clemens Ladisch
changeset: 4451:4d657e2f7e7c42933fad6c884535cc30e751a782 tag: tip user: cladisch date: Fri Aug 18 09:04:41 2006 +0200 files: pci/Kconfig
Quoted 6 lines
description:
fm801: moveCONFIG_VIDEO_DEVdependency toCONFIG_SND_FM801_TEA575X_BOOLMove the
CONFIG_VIDEO_DEVdependency fromCONFIG_SND_FM801_TEA575XtoCONFIG_SND_FM801_TEA575X_BOOLso that the two symbol always have consistent values even when compiled externally.
Is it a really correct fix?
It looks like that this forces CONFIG_VIDEO_DEV=y even though it's not necessarily so.
The problem in alsa-driver's build is that SND_FM801_TEA575X_BOOL is evaluated after SND_FM801 and SND_FM801_TEA575X because the former is an option. In acinclude.m4, the whole checks of options are done after cards.
Maybe a better way would be to change acinclude.m4 like:
CARDS="xxx yyy ..."
OPTIONS="aaa bbb ..."
ac_snd_config_exists () {
# check whether $1 is in cards or options
}
# then check each card/option in the order appearing in
# Kconfig
if ac_snd_config_exists ad1816a; then
....
fi
if ac_snd_config_exists ad1816a; then
....
fiTakashi
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 5 lines · Takashi Iwai
Quoted 4 lines · Clemens Ladisch
files: pci/Kconfig
description:
fm801: moveCONFIG_VIDEO_DEVdependency toCONFIG_SND_FM801_TEA575X_BOOL
Quoted 7 lines
Quoted 3 lines
Move the
CONFIG_VIDEO_DEVdependency fromCONFIG_SND_FM801_TEA575XtoCONFIG_SND_FM801_TEA575X_BOOLso that the two symbol always have consistent values even when compiled externally.Is it a really correct fix?
It looks like that this forcesCONFIG_VIDEO_DEV=yeven though it's not necessarily so.
Uh, yes.
I guess a better fix would be to change the code to not look at CONFIG_SND_FM801_TEA575X_BOOL at all.
Quoted 7 lines
The problem in alsa-driver's build is that
SND_FM801_TEA575X_BOOLis evaluated afterSND_FM801andSND_FM801_TEA575Xbecause the former is an option. In acinclude.m4, the whole checks of options are done after cards.Maybe a better way would be to change acinclude.m4 like:
Quoted 15 lines
CARDS="xxx yyy ..."
OPTIONS="aaa bbb ..."
ac_snd_config_exists () {
# check whether $1 is in cards or options
}
# then check each card/option in the order appearing in
# Kconfig
if ac_snd_config_exists ad1816a; then
....
fi
if ac_snd_config_exists ad1816a; then
....
fiI'm not sure it would be a good idea to rewrite all this just before the .12 release.
I'll revert this one and do the change I proposed above over the weekend unless anybody objects.
Regards,
Clemens
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
At Fri, 18 Aug 2006 10:56:22 +0200,
Quoted 11 lines · Clemens Ladisch
Quoted 9 lines · Takashi Iwai
Quoted 7 lines · Clemens Ladisch
files: pci/Kconfig
description:
fm801: moveCONFIG_VIDEO_DEVdependency toCONFIG_SND_FM801_TEA575X_BOOLMove the
CONFIG_VIDEO_DEVdependency fromCONFIG_SND_FM801_TEA575XtoCONFIG_SND_FM801_TEA575X_BOOLso that the two symbol always have consistent values even when compiled externally.
Quoted 8 lines
Quoted 3 lines
Is it a really correct fix?
It looks like that this forcesCONFIG_VIDEO_DEV=yeven though it's not necessarily so.Uh, yes.
I guess a better fix would be to change the code to not look at
CONFIG_SND_FM801_TEA575X_BOOLat all.
Well, CONFIG_SND_FM801_TEA575X_BOOL was introduced exactly for the purpose to fix the messy dependency in Kconfig, so it is apparently correct (e.g. CONFIG_VIDEO_DEV has to be y if FM801 is y).
Quoted 23 lines
Quoted 7 lines
The problem in alsa-driver's build is that
SND_FM801_TEA575X_BOOLis evaluated afterSND_FM801andSND_FM801_TEA575Xbecause the former is an option. In acinclude.m4, the whole checks of options are done after cards.Maybe a better way would be to change acinclude.m4 like:
Quoted 15 lines
CARDS="xxx yyy ..." OPTIONS="aaa bbb ..." ac_snd_config_exists () { # check whether $1 is in cards or options } # then check each card/option in the order appearing in # Kconfig if ac_snd_config_exists ad1816a; then .... fi if ac_snd_config_exists ad1816a; then .... fi
Quoted 2 lines
I'm not sure it would be a good idea to rewrite all this just before the .12 release.
Yep, that's why I didn't touch it yet ;)
Quoted 2 lines
I'll revert this one and do the change I proposed above over the weekend unless anybody objects.
I think we can keep it as it is.
This is a bug, of course, but can be avoided by specifying configure options.
Or, just make a temporary patch for fm801.c to add additional ifdef check around
#ifdef CONFIG_SND_FM801_TEA575X_BOOL
#include <sound/tea575x-tuner.h>
#define TEA575X_RADIO 1
#endif
until we fix configure stuff.
Takashi
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 15 lines · Takashi Iwai
Quoted 14 lines · Clemens Ladisch
Quoted 12 lines · Takashi Iwai
Quoted 7 lines · Clemens Ladisch
files: pci/Kconfig
description:
fm801: moveCONFIG_VIDEO_DEVdependency toCONFIG_SND_FM801_TEA575X_BOOLMove the
CONFIG_VIDEO_DEVdependency fromCONFIG_SND_FM801_TEA575XtoCONFIG_SND_FM801_TEA575X_BOOLso that the two symbol always have consistent values even when compiled externally.Is it a really correct fix?
It looks like that this forcesCONFIG_VIDEO_DEV=yeven though it's not necessarily so.
Quoted 8 lines
Quoted 4 lines
Uh, yes.
I guess a better fix would be to change the code to not look at
CONFIG_SND_FM801_TEA575X_BOOLat all.Well,
CONFIG_SND_FM801_TEA575X_BOOLwas introduced exactly for the purpose to fix the messy dependency inKconfig, so it is apparently correct (e.g.CONFIG_VIDEO_DEVhas to be y if FM801 is y).
But when compiling externally when CONFIG_VIDEO_DEV isn't set, CONFIG_SND_FM801_TEA575X will not be set although CONFIG_SND_FM801_TEA575X_BOOL is set. This will result in undefined references in snd-fm801 because it thinks that it can use the tuner functions.
Quoted 6 lines
Quoted 2 lines
I'll revert this one and do the change I proposed above over the weekend unless anybody objects.
I think we can keep it as it is.
This is a bug, of course, but can be avoided by specifying configure options.
That is, I should list all card drivers/options except this one? ;-)
Quoted 9 lines
Or, just make a temporary patch for
fm801.cto add additional ifdef check around#ifdef
CONFIG_SND_FM801_TEA575X_BOOL
#include <sound/tea575x-tuner.h>
#defineTEA575X_RADIO1
#endifuntil we fix configure stuff.
Okay, I'll do this.
Regards,
Clemens
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
At Fri, 18 Aug 2006 11:25:06 +0200,
Quoted 26 lines · Clemens Ladisch
Quoted 15 lines · Takashi Iwai
Quoted 14 lines · Clemens Ladisch
Quoted 12 lines · Takashi Iwai
Quoted 7 lines · Clemens Ladisch
files: pci/Kconfig
description:
fm801: moveCONFIG_VIDEO_DEVdependency toCONFIG_SND_FM801_TEA575X_BOOLMove the
CONFIG_VIDEO_DEVdependency fromCONFIG_SND_FM801_TEA575XtoCONFIG_SND_FM801_TEA575X_BOOLso that the two symbol always have consistent values even when compiled externally.Is it a really correct fix?
It looks like that this forcesCONFIG_VIDEO_DEV=yeven though it's not necessarily so.Quoted 8 lines
Quoted 4 lines
Uh, yes.
I guess a better fix would be to change the code to not look at
CONFIG_SND_FM801_TEA575X_BOOLat all.Well,
CONFIG_SND_FM801_TEA575X_BOOLwas introduced exactly for the purpose to fix the messy dependency inKconfig, so it is apparently correct (e.g.CONFIG_VIDEO_DEVhas to be y if FM801 is y).
Quoted 5 lines
But when compiling externally when
CONFIG_VIDEO_DEVisn't set,CONFIG_SND_FM801_TEA575Xwill not be set althoughCONFIG_SND_FM801_TEA575X_BOOLis set. This will result in undefined references in snd-fm801 because it thinks that it can use the tuner functions.
Hm... right, it's confusing.
It seems that CONFIG_SND_FM801_TEA575X is also never set to m because it evaluates CONFIG_SND_FM801_TEA575X_BOOL. Oh my. We have to fix this really.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
I'll revert this one and do the change I proposed above over the weekend unless anybody objects.
I think we can keep it as it is.
This is a bug, of course, but can be avoided by specifying configure options.That is, I should list all card
drivers/optionsexcept this one? ;-)
I suppose you have less than 100 soundcards on a same machine? :)
Takashi
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 3 lines · Takashi Iwai
It seems that
CONFIG_SND_FM801_TEA575Xis also never set to m because it evaluatesCONFIG_SND_FM801_TEA575X_BOOL. Oh my. We have to fix this really.
The behaviour should be correct in the kernel tree, and outside, y or m shouldn't matter ...
Quoted 8 lines
Quoted 5 lines · Clemens Ladisch
Quoted 2 lines · Takashi Iwai
This is a bug, of course, but can be avoided by specifying configure options.
That is, I should list all card
drivers/optionsexcept this one? ;-)I suppose you have less than 100 soundcards on a same machine? :)
$ cat /proc/asound/cards
0 [V8237 ]: VIA8237 - VIA 8237
VIA 8237 with ALC850 at 0x1000, irq 201
1 [UART ]: MPU-401 UART - MPU-401 UART
MPU-401 UART at 0x300, irq 10
2 [YMF754 ]: YMF754 - Yamaha DS-1E (YMF754)
Yamaha DS-1E (YMF754) at 0xfba00000, irq 209
3 [UA1A ]: USB-Audio - EDIROL UA-1A
Roland EDIROL UA-1A at usb-0000:00:10.4-4.3, full speed
4 [SC8820 ]: USB-Audio - SC-8820
Roland SC-8820 at usb-0000:00:10.3-1, full speed
5 [Bt878 ]: Bt87x - Brooktree Bt878
Brooktree Bt878 at 0xeff00000, irq 169
6 [VirMIDI ]: VirMIDI - VirMIDI
Virtual MIDI Card 1
7 [NX ]: USB-Audio - SB Audigy 2 NX
Creative Technology Ltd SB Audigy 2 NX at usb-0000:00:10.4-3, high speed
8 [UM2 ]: USB-Audio - UM-2
EDIROL UM-2 at usb-0000:00:10.0-2, full speed
9 [Loopback ]: Loopback - Loopback
Loopback 1
10 [Live ]: EMU10K1 - SBLive! Value [CT4670]
SBLive! Value [CT4670] (rev.5, serial:0x201102) at 0x9400, irq 217
11 [UART16550A ]: Serial - Serial MIDI (UART16550A)
Serial MIDI (UART16550A) at 0x3f8, irq 4 speed 38400 div 3 outs 1 ins 1 adaptor Soundcanvas droponfull 0Yeah, that's less than 100. :-)
But I'd rather find compilation errors in all drivers.
Regards,
Clemens
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
At Fri, 18 Aug 2006 16:35:50 +0200,
Quoted 8 lines · Clemens Ladisch
Quoted 3 lines · Takashi Iwai
It seems that
CONFIG_SND_FM801_TEA575Xis also never set to m because it evaluatesCONFIG_SND_FM801_TEA575X_BOOL. Oh my. We have to fix this really.The behaviour should be correct in the kernel tree, and outside, y or m shouldn't matter ...
I meant CONFIG_SND_FM801_TEA575X in the external alsa-driver tree is never set to y or m. It's always n. This is because CONFIG_SND_FM801_TEA575X is evaluated before *_TEA575X_BOOL.
Quoted 35 lines
Quoted 8 lines
Quoted 5 lines · Clemens Ladisch
Quoted 2 lines · Takashi Iwai
This is a bug, of course, but can be avoided by specifying configure options.
That is, I should list all card
drivers/optionsexcept this one? ;-)I suppose you have less than 100 soundcards on a same machine? :)
$ cat /proc/asound/cards 0 [V8237 ]: VIA8237 - VIA 8237 VIA 8237 with ALC850 at 0x1000, irq 201 1 [UART ]: MPU-401 UART - MPU-401 UART MPU-401 UART at 0x300, irq 10 2 [YMF754 ]: YMF754 - Yamaha DS-1E (YMF754) Yamaha DS-1E (YMF754) at 0xfba00000, irq 209 3 [UA1A ]: USB-Audio - EDIROL UA-1A Roland EDIROL UA-1A at usb-0000:00:10.4-4.3, full speed 4 [SC8820 ]: USB-Audio - SC-8820 Roland SC-8820 at usb-0000:00:10.3-1, full speed 5 [Bt878 ]: Bt87x - Brooktree Bt878 Brooktree Bt878 at 0xeff00000, irq 169 6 [VirMIDI ]: VirMIDI - VirMIDI Virtual MIDI Card 1 7 [NX ]: USB-Audio - SB Audigy 2 NX Creative Technology Ltd SB Audigy 2 NX at usb-0000:00:10.4-3, high speed 8 [UM2 ]: USB-Audio - UM-2 EDIROL UM-2 at usb-0000:00:10.0-2, full speed 9 [Loopback ]: Loopback - Loopback Loopback 1 10 [Live ]: EMU10K1 - SBLive! Value [CT4670] SBLive! Value [CT4670] (rev.5, serial:0x201102) at 0x9400, irq 217 11 [UART16550A ]: Serial - Serial MIDI (UART16550A) Serial MIDI (UART16550A) at 0x3f8, irq 4 speed 38400 div 3 outs 1 ins 1 adaptor Soundcanvas droponfull 0
Quoted 2 lines
Yeah, that's less than 100. :-)
But I'd rather find compilation errors in all drivers.
Yep, the bug that TEA575X isn't activated must be fixed.
FYI, it also turned out that the latest pci/Kconfig in 2.6.18 git tree is a bit different from alsa-kernel HG and buggy. It reads:
config SND_FM801_TEA575X tristate depends on SND_FM801_TEA575X_BOOL default SND_FM801 select VIDEO_V4L1
Here we need another fix to add
select VIDEO_DEV
too.
Takashi
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 4 lines · Takashi Iwai
[...]
I meantCONFIG_SND_FM801_TEA575Xin the external alsa-driver tree is never set to y or m. It's always n. This is becauseCONFIG_SND_FM801_TEA575Xis evaluated before*_TEA575X_BOOL.
Okay, I reverted my Kconfig change.
I tried to use this patch to manually evaluate the TEA575X symbols:
alsa-driver/configure.in +8 -0
@@ -2548,6 +2548,14 @@ CONFIG_SOUND=m ALSA_TOPLEVEL_SELECT +dnl Workaround for module->option dependency +if ( test "$CONFIG_SND_FM801_TEA575X_BOOL" = "y" ) && + ( test "$CONFIG_VIDEO_DEV" = "y" ); then + CONFIG_SND_FM801_TEA575X="m" +else + CONFIG_SND_FM801_TEA575X_BOOL="" +fi + dnl OSS emulations if test "$CONFIG_SND_OSSEMUL" = "y"; then CONFIG_SND_MIXER_OSS="$CONFIG_SND"
However, this results in include/config1.h and toplevel.config being inconsistent. Apparently, autoconf writes the symbols to config1.h when AC_DEFINE is called, but writes to toplevel.config when AC_SUBST is called. This means that the above workaround gets applied after config1.h was written.
The obvious solution would be to move the AC_DEFINE()s out of ALSA_TOPLEVEL_SELECT into a new macro or into ALSA_TOPLEVEL_OUTPUT. However, this may also change the values of the OSS symbols that are written to config1.h (which is done before the assignments under "OSS emulations"), and I'm not sure if this change might break anything.
Regards,
Clemens
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
At Mon, 21 Aug 2006 09:52:05 +0200,
Quoted 36 lines · Clemens Ladisch
Quoted 4 lines · Takashi Iwai
[...]
I meantCONFIG_SND_FM801_TEA575Xin the external alsa-driver tree is never set to y or m. It's always n. This is becauseCONFIG_SND_FM801_TEA575Xis evaluated before*_TEA575X_BOOL.Okay, I reverted my
Kconfigchange.I tried to use this patch to manually evaluate the TEA575X symbols:
alsa-driver/configure.in +8
-0@@ -2548,6 +2548,14 @@ CONFIG_SOUND=m ALSA_TOPLEVEL_SELECT +dnl Workaround for module->option dependency +if ( test "$CONFIG_SND_FM801_TEA575X_BOOL" = "y" ) && + ( test "$CONFIG_VIDEO_DEV" = "y" ); then + CONFIG_SND_FM801_TEA575X="m" +else + CONFIG_SND_FM801_TEA575X_BOOL="" +fi + dnl OSS emulations if test "$CONFIG_SND_OSSEMUL" = "y"; then CONFIG_SND_MIXER_OSS="$CONFIG_SND"However, this results in
include/config1.hand toplevel.config being inconsistent. Apparently, autoconf writes the symbols toconfig1.hwhenAC_DEFINEis called, but writes to toplevel.config whenAC_SUBSTis called. This means that the above workaround gets applied afterconfig1.hwas written.
Quoted 5 lines
The obvious solution would be to move the AC_DEFINE()s out of
ALSA_TOPLEVEL_SELECTinto a new macro or intoALSA_TOPLEVEL_OUTPUT. However, this may also change the values of the OSS symbols that are written toconfig1.h(which is done before the assignments under "OSS emulations"), and I'm not sure if this change might break anything.
I think it's a bug that config1.h is written before any manual modifications like configs for OSS emulation. We should move writes to config1.h to a later stage as you suggested.
Takashi
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 3 lines · Takashi Iwai
I think it's a bug that
config1.his written before any manual modifications like configs for OSS emulation. We should move writes toconfig1.hto a later stage as you suggested.
Done, but only for the TEA575x workaround. I didn't test what the consequences of the OSS change would be.
Regards,
Clemens
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
At Tue, 22 Aug 2006 09:31:42 +0200,
Quoted 8 lines · Clemens Ladisch
Quoted 3 lines · Takashi Iwai
I think it's a bug that
config1.his written before any manual modifications like configs for OSS emulation. We should move writes toconfig1.hto a later stage as you suggested.Done, but only for the TEA575x workaround. I didn't test what the consequences of the OSS change would be.
Thanks, it seems working fine.
I have a pending patch for adriver.h to fix the build on RH4, but waiting for confirmation. It's no critical fix, and if the answer doesn't come in today, we can go forward to the 1.0.12 final release.
Any other pending fixes?
Takashi
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642