[alsa-devel] [PATCH 0/2] ASoC: Fix Panda board support
Hello,
The following two patch fixes the audio support for Panda board. The sdp4430 machine driver suppose to handle sdp4430/panda board, but for some reason the machine_is check was excluding the Panda board.
It would be nice if this can be integrated to 3.2.
Regards, Peter --- Peter Ujfalusi (2): ASoC: sdp4430: No need to announce the loading of the driver ASoC: sdp4430: Fix Panda support
sound/soc/omap/sdp4430.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
Reduce the noise in kernel log for SDP4430 from audio.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com --- sound/soc/omap/sdp4430.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index 03d9fa4..eef80b5 100644 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c @@ -180,7 +180,6 @@ static int __init sdp4430_soc_init(void)
if (!machine_is_omap_4430sdp()) return -ENODEV; - printk(KERN_INFO "SDP4430 SoC init\n");
sdp4430_snd_device = platform_device_alloc("soc-audio", -1); if (!sdp4430_snd_device) {
Panda supposed to be using the same driver (Kconfig selects sdp4430 for panda board as well), but due to the wrong machine_is check the Panda board support was broken.
Fix the Panda board support, and use different card name for the SDP4430/Panda.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com --- sound/soc/omap/sdp4430.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index eef80b5..5b633b6 100644 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c @@ -162,7 +162,6 @@ static struct snd_soc_dai_link sdp4430_dai = {
/* Audio machine driver */ static struct snd_soc_card snd_soc_sdp4430 = { - .name = "SDP4430", .dai_link = &sdp4430_dai, .num_links = 1,
@@ -178,7 +177,11 @@ static int __init sdp4430_soc_init(void) { int ret;
- if (!machine_is_omap_4430sdp()) + if (machine_is_omap_4430sdp()) + snd_soc_sdp4430.name = "OMAP4 SDP"; + else if (machine_is_omap4_panda()) + snd_soc_sdp4430.name = "OMAP4 Panda"; + else return -ENODEV;
sdp4430_snd_device = platform_device_alloc("soc-audio", -1);
On Mon, Nov 21, 2011 at 03:14:06PM +0200, Peter Ujfalusi wrote:
- if (!machine_is_omap_4430sdp())
- if (machine_is_omap_4430sdp())
snd_soc_sdp4430.name = "OMAP4 SDP";
- else if (machine_is_omap4_panda())
snd_soc_sdp4430.name = "OMAP4 Panda";
- else
I'm not thrilled by this given that I'd imagine this'll end up like Beagle and have lots of derivatives. Why not just change the string to be something generic along the lines of "OMAP4 audio reference design" rather than the name of a particular board?
On Mon, Nov 21, 2011 at 3:38 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Mon, Nov 21, 2011 at 03:14:06PM +0200, Peter Ujfalusi wrote:
- if (!machine_is_omap_4430sdp())
- if (machine_is_omap_4430sdp())
- snd_soc_sdp4430.name = "OMAP4 SDP";
- else if (machine_is_omap4_panda())
- snd_soc_sdp4430.name = "OMAP4 Panda";
- else
I'm not thrilled by this given that I'd imagine this'll end up like Beagle and have lots of derivatives. Why not just change the string to be something generic along the lines of "OMAP4 audio reference design" rather than the name of a particular board?
Not sure how to handle this... Panda does not have Digital Mic, analog Main/Sub mic, and Vibra support in HW. Panda is simple in terms of audio. SDP is more like reference design with all possible audio connection. When I add UCM profiles for SDP/Panda they should be different (due to different HW), and the best way is to have different card names for them. But they can share the same machine driver, since SDP just have more features.
On Mon, Nov 21, 2011 at 04:17:02PM +0200, Ujfalusi, Peter wrote:
Panda does not have Digital Mic, analog Main/Sub mic, and Vibra support in HW. Panda is simple in terms of audio. SDP is more like reference design with all possible audio connection.
Well, that's rather different to what your patch did - I'd expect your patch would also be avoiding setting up all the not connected stuff on Panda. Perhaps what's needed is platform data (which can have a DT representation when that comes) which represents the differences and can include the name to use?
On Mon, Nov 21, 2011 at 4:19 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
Well, that's rather different to what your patch did - I'd expect your patch would also be avoiding setting up all the not connected stuff on Panda. Perhaps what's needed is platform data (which can have a DT representation when that comes) which represents the differences and can include the name to use?
Ultimately this is the plan, but for 3.2 it would have been too big of a change. I just happen to had the DMIC support done locally first (will send it soon). Just reordered the patches, since we feel that 3.2 kernel would deserve fix for the Panda audio, and obviously the DMIC will go for 3.3. The DT representation will follow as soon as I can work out some of the issues with it.
On Mon, Nov 21, 2011 at 04:29:54PM +0200, Ujfalusi, Peter wrote:
On Mon, Nov 21, 2011 at 4:19 PM, Mark Brown
Well, that's rather different to what your patch did - I'd expect your patch would also be avoiding setting up all the not connected stuff on Panda. Perhaps what's needed is platform data (which can have a DT representation when that comes) which represents the differences and can include the name to use?
Ultimately this is the plan, but for 3.2 it would have been too big of a change. I just happen to had the DMIC support done locally first (will send it soon). Just reordered the patches, since we feel that 3.2 kernel would deserve fix for the Panda audio, and obviously the DMIC will go for 3.3.
I'd suggest just jumping straight to platform data now, making it mandatory and using that to grab the name. That'll be more ready for device tree and make life a bit easier for people carrying patches for further derivatives. The platform data can then be extended to support new features and a device tree binding added for it.
Please also fix the word wrapping in whatever mailer you're using.
On 21 November 2011 13:38, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Mon, Nov 21, 2011 at 03:14:06PM +0200, Peter Ujfalusi wrote:
- if (!machine_is_omap_4430sdp())
- if (machine_is_omap_4430sdp())
- snd_soc_sdp4430.name = "OMAP4 SDP";
- else if (machine_is_omap4_panda())
- snd_soc_sdp4430.name = "OMAP4 Panda";
- else
I'm not thrilled by this given that I'd imagine this'll end up like Beagle and have lots of derivatives. Why not just change the string to be something generic along the lines of "OMAP4 audio reference design" rather than the name of a particular board?
Alsa-lib and also UCM need the string name to load the correct init + configuration files.
I don't anticipate it growing too much, as we should be able to pull this out of device tree soon.
Liam
Obviously I do not have Panda Board... We need to patch the board-oma4panda.c in arch/arm/mach-omap2/ as well... Will resend the series again.
participants (4)
-
Girdwood, Liam
-
Mark Brown
-
Peter Ujfalusi
-
Ujfalusi, Peter