From: Lee Jones <hidden> Date: 2012-07-31 14:46:03
This patch-set includes some important changes which should make
their way to the Mainline Release Candidates for the v3.6 release.
Without them Audio doesn't even probe (at all) when booting with
Device Tree selected. The kernel can't compile with ux500 audio
enabled. Even if we can get that far SoC Core will assume we're
using regmaps and attempt to use them; however, none exist for
this driver, so the kernel will oops.
arch/arm/mach-ux500/board-mop500-msp.c | 2 +-
arch/arm/mach-ux500/board-mop500.c | 9 ++++-----
sound/soc/codecs/ab8500-codec.c | 4 ++++
sound/soc/soc-dapm.c | 2 --
4 files changed, 9 insertions(+), 8 deletions(-)
From: Lee Jones <hidden> Date: 2012-07-31 14:46:06
If a list of widgets is provided and one of them fails to be added as
a control, the present semantics fail all subsequent widgets. A better
solution would be to only fail that widget, but pursue in attempting
to add the rest of the list.
Signed-off-by: Lee Jones <redacted>
---
sound/soc/soc-dapm.c | 2 --
1 file changed, 2 deletions(-)
@@ -3095,8 +3095,6 @@ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,dev_err(dapm->dev,"ASoC: Failed to create DAPM control %s\n",widget->name);-ret=-ENOMEM;-break;}widget++;}
From: Lee Jones <hidden> Date: 2012-07-31 14:46:10
This was left over during a recent clean-up which removed Device Tree
helper structs. There is no longer a requirement for it, so we can just
remove it.
Signed-off-by: Lee Jones <redacted>
---
arch/arm/mach-ux500/board-mop500.c | 5 -----
1 file changed, 5 deletions(-)
From: Lee Jones <hidden> Date: 2012-07-31 14:46:12
The platform attempts to register platform device 'snd_soc_u8500'
which doesn't actually exist. Here we change the reference to the
correct one 'snd_soc_mop500'.
Signed-off-by: Lee Jones <redacted>
---
arch/arm/mach-ux500/board-mop500-msp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Lee Jones <hidden> Date: 2012-07-31 14:46:59
Previous attempts to add platform probing of the Audio related devices
only call from non-DT initialisation functions. This patch extends that
functionality to the Device Tree related ones too.
Signed-off-by: Lee Jones <redacted>
---
arch/arm/mach-ux500/board-mop500.c | 4 ++++
1 file changed, 4 insertions(+)
From: Lee Jones <hidden> Date: 2012-07-31 14:47:22
If codec->control_data is not populated SoC Core assumes we want to
use regmap, which fails catastrophically, as we don't have one:
Unable to handle kernel NULL pointer dereference at virtual address 00000080
pgd = c0004000
[00000080] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 Not tainted (3.5.0-rc6-00884-g0b2419e-dirty #130)
PC is at regmap_read+0x10/0x5c
LR is at hw_read+0x80/0x90
pc : [<c01a91b8>] lr : [<c0216804>] psr: 60000013
Signed-off-by: Lee Jones <redacted>
---
sound/soc/codecs/ab8500-codec.c | 4 ++++
1 file changed, 4 insertions(+)
@@ -2406,6 +2406,10 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)/* Setup AB8500 according to board-settings */pdata=(structab8500_platform_data*)dev_get_platdata(dev->parent);++/* Inform SoC Core that we have our own I/O arrangements. */+codec->control_data=(void*)true;+status=ab8500_audio_setup_mics(codec,&pdata->codec->amics);if(status<0){pr_err("%s: Failed to setup mics (%d)!\n",__func__,status);
From: Mark Brown <hidden> Date: 2012-07-31 14:56:18
On Tue, Jul 31, 2012 at 03:45:40PM +0100, Lee Jones wrote:
If a list of widgets is provided and one of them fails to be added as
a control, the present semantics fail all subsequent widgets. A better
solution would be to only fail that widget, but pursue in attempting
to add the rest of the list.
To reiterate, this is in *no* way urgent or even a bug fix.
dev_err(dapm->dev,
"ASoC: Failed to create DAPM control %s\n",
widget->name);
- ret = -ENOMEM;
- break;
Indeed, removing the error return is a regression.
From: Lee Jones <hidden> Date: 2012-07-31 15:09:13
On 31/07/12 15:56, Mark Brown wrote:
On Tue, Jul 31, 2012 at 03:45:40PM +0100, Lee Jones wrote:
quoted
If a list of widgets is provided and one of them fails to be added as
a control, the present semantics fail all subsequent widgets. A better
solution would be to only fail that widget, but pursue in attempting
to add the rest of the list.
To reiterate, this is in *no* way urgent or even a bug fix.
It fixes sound in our driver.
Without this the card failes to instantiate.
quoted
dev_err(dapm->dev,
"ASoC: Failed to create DAPM control %s\n",
widget->name);
- ret = -ENOMEM;
- break;
Indeed, removing the error return is a regression.
Isn't the return code incorrect? There are a multitude of reasons why
snd_soc_dapm_new_control() would fail. No-memory is just one of them, so
why do we force this probable lie?
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
From: Mark Brown <hidden> Date: 2012-07-31 15:16:04
On Tue, Jul 31, 2012 at 04:09:08PM +0100, Lee Jones wrote:
On 31/07/12 15:56, Mark Brown wrote:
quoted
To reiterate, this is in *no* way urgent or even a bug fix.
It fixes sound in our driver.
Without this the card failes to instantiate.
You're kidding, right? Fix the actual error.
Isn't the return code incorrect? There are a multitude of reasons
why snd_soc_dapm_new_control() would fail. No-memory is just one of
them, so why do we force this probable lie?
I don't think anyone actually cares what the error code is, feel free to
pick another random number.
From: Mark Brown <hidden> Date: 2012-07-31 15:38:31
On Tue, Jul 31, 2012 at 03:45:41PM +0100, Lee Jones wrote:
If codec->control_data is not populated SoC Core assumes we want to
use regmap, which fails catastrophically, as we don't have one:
Applied. If you could do resends at a rate somewhat lower than once per
working day that'd be helpful, especially given the number of large
patch serieses that you're sending right now.