[alsa-devel] [PATCH] ASoC: codecs-ac97: make selectable in config
Make generic ASoC AC'97 CODEC selectable in config.
This way this driver can be used for platforms which don't need specialized AC'97 CODEC drivers but which are not directly selectable in config themselves (for example DT based ones).
Signed-off-by: Maciej Szmigiero mail@maciej.szmigiero.name
--- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -16,7 +16,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_88PM860X if MFD_88PM860X select SND_SOC_L3 select SND_SOC_AB8500_CODEC if ABX500_CORE - select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS + select SND_SOC_AC97_CODEC select SND_SOC_AD1836 if SPI_MASTER select SND_SOC_AD193X_SPI if SPI_MASTER select SND_SOC_AD193X_I2C if I2C @@ -212,8 +212,9 @@ config SND_SOC_AB8500_CODEC tristate
config SND_SOC_AC97_CODEC - tristate + tristate "Build generic ASoC AC97 CODEC driver" select SND_AC97_CODEC + select SND_SOC_AC97_BUS
config SND_SOC_AD1836 tristate
On Sun, May 10, 2015 at 12:12:04AM +0200, Maciej S. Szmigiero wrote:
@@ -16,7 +16,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_88PM860X if MFD_88PM860X select SND_SOC_L3 select SND_SOC_AB8500_CODEC if ABX500_CORE
- select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS
- select SND_SOC_AC97_CODEC select SND_SOC_AD1836 if SPI_MASTER select SND_SOC_AD193X_SPI if SPI_MASTER select SND_SOC_AD193X_I2C if I2C
No, you're missing the point of what _ALL_CODECS does - it builds everything possible. This will break the build for systems without AC'97 support.
Thanks for looking into the patch.
W dniu 12.05.2015 19:58, Mark Brown pisze:
On Sun, May 10, 2015 at 12:12:04AM +0200, Maciej S. Szmigiero wrote:
@@ -16,7 +16,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_88PM860X if MFD_88PM860X select SND_SOC_L3 select SND_SOC_AB8500_CODEC if ABX500_CORE
- select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS
- select SND_SOC_AC97_CODEC select SND_SOC_AD1836 if SPI_MASTER select SND_SOC_AD193X_SPI if SPI_MASTER select SND_SOC_AD193X_I2C if I2C
No, you're missing the point of what _ALL_CODECS does - it builds everything possible. This will break the build for systems without AC'97 support.
How? In the second hunk of the patch I've made SND_SOC_AC97_CODEC select SND_SOC_AC97_BUS.
ASoC AC'97 CODEC uses only AC'97 symbols defined in pci/ac97/ac97_codec.c, pci/ac97/ac97_pcm.c and sound/soc/soc-ac97.c.
pci/ac97/ac97_codec.c, pci/ac97/ac97_pcm.c will be built via SND_SOC_ALL_CODECS -> SND_SOC_AC97_CODEC -> SND_AC97_CODEC dependency.
sound/soc/soc-ac97.c will be build via SND_SOC_ALL_CODECS -> SND_SOC_AC97_CODEC -> SND_SOC_AC97_BUS dependency.
Best regards, Maciej Szmigiero
On Wed, May 13, 2015 at 10:57:24PM +0200, Maciej S. Szmigiero wrote:
W dniu 12.05.2015 19:58, Mark Brown pisze:
On Sun, May 10, 2015 at 12:12:04AM +0200, Maciej S. Szmigiero wrote:
@@ -16,7 +16,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_88PM860X if MFD_88PM860X select SND_SOC_L3 select SND_SOC_AB8500_CODEC if ABX500_CORE
- select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS
- select SND_SOC_AC97_CODEC select SND_SOC_AD1836 if SPI_MASTER select SND_SOC_AD193X_SPI if SPI_MASTER select SND_SOC_AD193X_I2C if I2C
No, you're missing the point of what _ALL_CODECS does - it builds everything possible. This will break the build for systems without AC'97 support.
How? In the second hunk of the patch I've made SND_SOC_AC97_CODEC select SND_SOC_AC97_BUS.
select doesn't respect dependencies, it'll just force on the selected symbol.
On 05/14/2015 07:53 PM, Mark Brown wrote:
On Wed, May 13, 2015 at 10:57:24PM +0200, Maciej S. Szmigiero wrote:
W dniu 12.05.2015 19:58, Mark Brown pisze:
On Sun, May 10, 2015 at 12:12:04AM +0200, Maciej S. Szmigiero wrote:
@@ -16,7 +16,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_88PM860X if MFD_88PM860X select SND_SOC_L3 select SND_SOC_AB8500_CODEC if ABX500_CORE
- select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS
- select SND_SOC_AC97_CODEC select SND_SOC_AD1836 if SPI_MASTER select SND_SOC_AD193X_SPI if SPI_MASTER select SND_SOC_AD193X_I2C if I2C
No, you're missing the point of what _ALL_CODECS does - it builds everything possible. This will break the build for systems without AC'97 support.
How? In the second hunk of the patch I've made SND_SOC_AC97_CODEC select SND_SOC_AC97_BUS.
select doesn't respect dependencies, it'll just force on the selected symbol.
The patch works fine, neither SND_SOC_AC97_BUS nor the symbols selected by SND_SOC_AC97_BUS have any dependencies.
Although one might argue that only AC97 host driver should select SND_SOC_AC97_BUS and the CODEC drivers should depend on it.
- Lars
On Thu, May 14, 2015 at 08:46:09PM +0200, Lars-Peter Clausen wrote:
On 05/14/2015 07:53 PM, Mark Brown wrote:
select doesn't respect dependencies, it'll just force on the selected symbol.
The patch works fine, neither SND_SOC_AC97_BUS nor the symbols selected by SND_SOC_AC97_BUS have any dependencies.
Does the select from SND_SOC_AC97_BUS actually happen if it is selected by SND_SOC_ALL_CODECS? That's the issue, if it works now it's a relatively recent thing.
On 05/14/2015 09:10 PM, Mark Brown wrote:
On Thu, May 14, 2015 at 08:46:09PM +0200, Lars-Peter Clausen wrote:
On 05/14/2015 07:53 PM, Mark Brown wrote:
select doesn't respect dependencies, it'll just force on the selected symbol.
The patch works fine, neither SND_SOC_AC97_BUS nor the symbols selected by SND_SOC_AC97_BUS have any dependencies.
Does the select from SND_SOC_AC97_BUS actually happen if it is selected by SND_SOC_ALL_CODECS? That's the issue, if it works now it's a relatively recent thing.
I'm not sure I fully understand what you mean.
The Kconfig entry for the CODEC has no 'depends on'. It does a 'select SND_SOC_AC97_BUS', which means all built time dependencies are pulled in this way. So if SND_SOC_ALL_CODECS selects the CODEC unconditionally that should work fine, since no dependencies are bypassed.
On Thu, May 14, 2015 at 09:24:15PM +0200, Lars-Peter Clausen wrote:
On 05/14/2015 09:10 PM, Mark Brown wrote:
Does the select from SND_SOC_AC97_BUS actually happen if it is selected by SND_SOC_ALL_CODECS? That's the issue, if it works now it's a relatively recent thing.
I'm not sure I fully understand what you mean.
The Kconfig entry for the CODEC has no 'depends on'. It does a 'select SND_SOC_AC97_BUS', which means all built time dependencies are pulled in this way. So if SND_SOC_ALL_CODECS selects the CODEC unconditionally that should work fine, since no dependencies are bypassed.
No, it's not just dependencies but also selects that get ignored (or used to anyway like I say) - a select just forces the symbol on.
On 05/14/2015 09:28 PM, Mark Brown wrote:
On Thu, May 14, 2015 at 09:24:15PM +0200, Lars-Peter Clausen wrote:
On 05/14/2015 09:10 PM, Mark Brown wrote:
Does the select from SND_SOC_AC97_BUS actually happen if it is selected by SND_SOC_ALL_CODECS? That's the issue, if it works now it's a relatively recent thing.
I'm not sure I fully understand what you mean.
The Kconfig entry for the CODEC has no 'depends on'. It does a 'select SND_SOC_AC97_BUS', which means all built time dependencies are pulled in this way. So if SND_SOC_ALL_CODECS selects the CODEC unconditionally that should work fine, since no dependencies are bypassed.
No, it's not just dependencies but also selects that get ignored (or used to anyway like I say) - a select just forces the symbol on.
select forces a symbol on regardless of whether its dependencies are met or not. But for any symbol that is on, no matter whether it was manually selected or selected by a 'select' from another symbol, any symbols selected by that symbol will be turned on. It's been that way as long as I can remember.
On Thu, May 14, 2015 at 09:38:55PM +0200, Lars-Peter Clausen wrote:
select forces a symbol on regardless of whether its dependencies are met or not. But for any symbol that is on, no matter whether it was manually selected or selected by a 'select' from another symbol, any symbols selected by that symbol will be turned on. It's been that way as long as I can remember.
Ah, good - that's not always been the case (or perhaps not always reliably been the case which is about the same thing).
participants (3)
-
Lars-Peter Clausen
-
Maciej S. Szmigiero
-
Mark Brown