Skip to contentSkip to conversation

i.MX SDMA support

DISCUSSION Sascha Hauer 3 participants 14 messages Aug 9, 2010 – Aug 11, 2010

Subsystems (3)
lore
Share & tools
lore

Sascha Hauer

author maintainer
#0 lore raw

Hi,

I just posted a series adding SDMA support for i.MX to the Arm Linux Kernel mailing list. It also contains a patch for adding SDMA support to the i.MX SSI units. I haven't cc'd alsa-devel because most of the stuff is not sound related. I know at least Mark and Liam are interested, so I leave a pointer here. The sound stuff needs to be synchronized with the other patches, so it's probably best if all patches go via my tree.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#1 lore raw
Quoted 4 lines · Sascha Hauer

Hi,

I just posted a series adding SDMA support for i.MX to the Arm Linux Kernel mailing list.

I noticed. It's good to see SDMA support going upstream :)

Quoted 6 lines

It also contains a patch for adding SDMA support
to the i.MX SSI units. I haven't cc'd alsa-devel because most of the stuff is not sound related. I know at least Mark and Liam are interested, so I leave a pointer here. The sound stuff needs to be synchronized with the other patches, so it's probably best if all patches go via my tree.

Yeah, that should be OK. However, we do have a ASoC core multi-component update merging later this week. This may conflict with some of your SDMA updates, although the multi-component support only really affects ASoC component probe() and remove() as every component is a regular Linux device now (with platform data, etc) and private data access.

The multi-component branch is here:-

git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6.git topic/multi-component

I did have to make some changes to i.MX ASoC in order to de-couple some of the components in order for them to be distinct kernel devices. Any chance you could give this a test with the new SDMA code ?

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
author maintainer
#2 lore raw
Quoted 15 lines · Liam Girdwood
Quoted 4 lines · Sascha Hauer

Hi,

I just posted a series adding SDMA support for i.MX to the Arm Linux Kernel mailing list.

I noticed. It's good to see SDMA support going upstream :)

Quoted 6 lines

It also contains a patch for adding SDMA support
to the i.MX SSI units. I haven't cc'd alsa-devel because most of the stuff is not sound related. I know at least Mark and Liam are interested, so I leave a pointer here. The sound stuff needs to be synchronized with the other patches, so it's probably best if all patches go via my tree.

Quoted 5 lines

Yeah, that should be OK. However, we do have a ASoC core multi-component update merging later this week. This may conflict with some of your SDMA updates, although the multi-component support only really affects ASoC component probe() and remove() as every component is a regular Linux device now (with platform data, etc) and private data access.

That won't be a problem. The SDMA code will wait until the next merge window anyway, I will rebase it after the multi-compoment merge if necessary.

Quoted 8 lines

The multi-component branch is here:-

git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6.git topic/multi-component

I did have to make some changes to i.MX ASoC in order to de-couple some of the components in order for them to be distinct kernel devices. Any chance you could give this a test with the new SDMA code ?

Yes, will do later today or tomorrow. In fact, I wanted to do earlier, but didn't find the time.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#3 lore raw
Quoted 11 lines · Sascha Hauer
Quoted 6 lines · Liam Girdwood

Yeah, that should be OK. However, we do have a ASoC core multi-component update merging later this week. This may conflict with some of your SDMA updates, although the multi-component support only really affects ASoC component probe() and remove() as every component is a regular Linux device now (with platform data, etc) and private data access.

That won't be a problem. The SDMA code will wait until the next merge window anyway, I will rebase it after the multi-compoment merge if necessary.

This is precisely the issue - multi component will go in 2.6.37 too, meaning conflicts in -next unless one tree is pulled into the other during the release cycle.

Quoted 1 line
Quoted 1 line
author maintainer
#4 lore raw
Quoted 10 lines · Mark Brown
Quoted 8 lines · Sascha Hauer
Quoted 6 lines · Liam Girdwood

Yeah, that should be OK. However, we do have a ASoC core multi-component update merging later this week. This may conflict with some of your SDMA updates, although the multi-component support only really affects ASoC component probe() and remove() as every component is a regular Linux device now (with platform data, etc) and private data access.

Quoted 7 lines
Quoted 3 lines

That won't be a problem. The SDMA code will wait until the next merge window anyway, I will rebase it after the multi-compoment merge if necessary.

This is precisely the issue - multi component will go in 2.6.37 too, meaning conflicts in -next unless one tree is pulled into the other during the release cycle.

Linus Walleij just proposed to implement the SDMA engine as part of the dmaengine API, so expect some delays here.
I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#5 lore raw
Quoted 2 lines · Sascha Hauer

Linus Walleij just proposed to implement the SDMA engine as part of the dmaengine API, so expect some delays here.

I saw. I suspect it might be sensible to merge SDMA support and then do updates for DMAENGINE as followup work, the lack of it is painful enough to make the feature worth the win.

Quoted 3 lines

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Oh dear. It has been difficult to get testers, unfortunately.

#6 lore raw
In reply to Sascha Hauer
Quoted 3 lines · Sascha Hauer

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Ok, I don't think it's that far off. Everything builds for i.MX and all components should register. The part I can't test is the component probe() and playback/capture.

Have you seen an oops ?

Thanks

Liam

author maintainer
#7 lore raw
Quoted 11 lines · Liam Girdwood
Quoted 3 lines · Sascha Hauer

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Ok, I don't think it's that far off. Everything builds for i.MX and all components should register. The part I can't test is the component probe() and playback/capture.

Have you seen an oops ?

Many of them, yes ;)

The following patch puts i.MX (nearly) back into business.

Sascha

commit cbd076cc6238efcabd1e23176b3829ddc74266e8

Author: Sascha Hauer <[email protected]>
Date:   Wed Aug 11 10:37:34 2010 +0200

ASoC: multi-component - i.MX fixes

sound/soc/imx/imx-pcm-fiq.c +30 -19
index bb69825..413b78d 100644
@@ -241,15 +241,8 @@ static int ssi_irq = 0;
 static int imx_pcm_fiq_new(struct snd_card *card, struct snd_soc_dai *dai,
 	struct snd_pcm *pcm)
 {
-	struct imx_ssi *ssi = snd_soc_dai_get_drvdata(dai);
 	int ret;
 
-	ret = claim_fiq(&fh);
-	if (ret) {
-		dev_err(dai->dev, "failed to claim fiq: %d", ret);
-		return ret;
-	}
-
 	ret = imx_pcm_new(card, dai, pcm);
 	if (ret)
 		return ret;
@@ -270,17 +263,6 @@ static int imx_pcm_fiq_new(struct snd_card *card, struct snd_soc_dai *dai,
 		imx_ssi_fiq_rx_buffer = (unsigned long)buf->area;
 	}
 
-	mxc_set_irq_fiq(ssi->irq, 1);
-	ssi_irq = ssi->irq;
-
-	imx_pcm_fiq = ssi->irq;
-
-	imx_ssi_fiq_base = (unsigned long)ssi->base;
-
-	ssi->dma_params_tx.burstsize = 4;
-	ssi->dma_params_rx.burstsize = 6;
-
-
 	set_fiq_handler(&imx_ssi_fiq_start,
 		&imx_ssi_fiq_end - &imx_ssi_fiq_start);
 
@@ -302,7 +284,36 @@ static struct snd_soc_platform_driver imx_soc_platform_fiq = {
 
 static int __devinit imx_soc_platform_probe(struct platform_device *pdev)
 {
-	return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_fiq);
+	struct imx_ssi *ssi = platform_get_drvdata(pdev);
+	int ret;
+
+	ret = claim_fiq(&fh);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to claim fiq: %d", ret);
+		return ret;
+	}
+
+	mxc_set_irq_fiq(ssi->irq, 1);
+	ssi_irq = ssi->irq;
+
+	imx_pcm_fiq = ssi->irq;
+
+	imx_ssi_fiq_base = (unsigned long)ssi->base;
+
+	ssi->dma_params_tx.burstsize = 4;
+	ssi->dma_params_rx.burstsize = 6;
+
+	ret = snd_soc_register_platform(&pdev->dev, &imx_soc_platform_fiq);
+	if (ret)
+		goto failed_register;
+
+	return 0;
+
+failed_register:
+	mxc_set_irq_fiq(ssi_irq, 0);
+	release_fiq(&fh);
+
+	return ret;
 }
 
 static int __devexit imx_soc_platform_remove(struct platform_device *pdev)
sound/soc/imx/imx-ssi.c +33 -8

87 lines not on this page · raw message

sound/soc/imx/imx-ssi.h +2 -0
index c46d8df..53b780d 100644
@@ -210,6 +210,8 @@ struct imx_ssi {
 	struct imx_pcm_dma_params	dma_params_tx;
 
 	int enabled;
+
+	struct platform_device *soc_platform_pdev;
 };
 
 struct snd_soc_platform *imx_ssi_fiq_init(struct platform_device *pdev,
sound/soc/imx/phycore-ac97.c +7 -2
index 18fa91b..6a65dd7 100644
@@ -34,8 +34,8 @@ static struct snd_soc_dai_link imx_phycore_dai_ac97[] = {
 		.stream_name	= "HiFi",
 		.codec_dai_name		= "wm9712-hifi",
 		.codec_name	= "wm9712-codec",
-		.cpu_dai_name	= "imx-ssi-dai.0",
-		.platform_name	= "imx-pcm-audio",
+		.cpu_dai_name	= "imx-ssi.0",
+		.platform_name	= "imx-fiq-pcm-audio.0",
 		.ops		= &imx_phycore_hifi_ops,
 	},
 };
@@ -63,6 +63,11 @@ static int __init imx_phycore_init(void)
 	platform_set_drvdata(imx_phycore_snd_device, &imx_phycore);
 	ret = platform_device_add(imx_phycore_snd_device);
 
+	imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1);
+	if (!imx_phycore_snd_device)
+		return -ENOMEM;
+	ret = platform_device_add(imx_phycore_snd_device);
+
 	if (ret) {
 		printk(KERN_ERR "ASoC: Platform device allocation failed\n");
 		platform_device_put(imx_phycore_snd_device);
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#8 lore raw
Quoted 11 lines · Sascha Hauer
Quoted 10 lines · Liam Girdwood
Quoted 3 lines · Sascha Hauer

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Ok, I don't think it's that far off. Everything builds for i.MX and all components should register. The part I can't test is the component probe() and playback/capture.

Quoted 6 lines
Quoted 1 line

Have you seen an oops ?

Many of them, yes ;)

The following patch puts i.MX (nearly) back into business.

Thanks for this.

sound/soc/imx/imx-ssi.c static struct platform_driver imx_ssi_driver = { · line 734

Quoted 7 lines
sound/soc/imx/imx-ssi.c +1 -1
 	if (ssi->flags & IMX_SSI_USE_AC97)
@@ -706,7 +731,7 @@ static struct platform_driver imx_ssi_driver = {
 	.remove = __devexit_p(imx_ssi_remove),
 
 	.driver = {
-		.name = "imx-ssi-dai",
+		.name = "imx-ssi",

The reason that the DAI driver name was changed on all platforms to include a "-dai" suffix was to distinguish the ASoC SSI driver from a generic SSI serial IO driver (i.e. SSI for non audio users). This is mainly due to the fact that most audio interfaces on SoC CPUs exist within a generic serial interface and are also often used for non audio purposes.

So if this suffix is ok, I guess I would need to update the the following too ?

arch/arm/mach-mx2/devices.c:418: .name = "imx-ssi", \
arch/arm/mach-mx2/clock_imx27.c:656: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx2/clock_imx27.c:657: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/clock-imx31.c:561: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx3/clock-imx31.c:562: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/clock-imx35.c:467: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx3/clock-imx35.c:468: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/devices.c:565: .name = "imx-ssi",
arch/arm/mach-mx3/devices.c:572: .name = "imx-ssi",
arch/arm/plat-mxc/audmux-v2.c:52: return "imx-ssi.0";
arch/arm/plat-mxc/audmux-v2.c:54: return "imx-ssi.1";

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
author maintainer
#9 lore raw
Quoted 12 lines · Liam Girdwood
Quoted 11 lines · Sascha Hauer
Quoted 10 lines · Liam Girdwood
Quoted 3 lines · Sascha Hauer

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Ok, I don't think it's that far off. Everything builds for i.MX and all components should register. The part I can't test is the component probe() and playback/capture.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Have you seen an oops ?

Many of them, yes ;)

The following patch puts i.MX (nearly) back into business.

Thanks for this.

There are probably some bits for the DMA part missing, I haven't tested it yet, but will do soon.

Quoted 16 lines

sound/soc/imx/imx-ssi.c static struct platform_driver imx_ssi_driver = { · line 734

Quoted 8 lines
sound/soc/imx/imx-ssi.c +1 -1
 	if (ssi->flags & IMX_SSI_USE_AC97)
@@ -706,7 +731,7 @@ static struct platform_driver imx_ssi_driver = {
 	.remove = __devexit_p(imx_ssi_remove),
 
 	.driver = {
-		.name = "imx-ssi-dai",
+		.name = "imx-ssi",

The reason that the DAI driver name was changed on all platforms to include a "-dai" suffix was to distinguish the ASoC SSI driver from a generic SSI serial IO driver (i.e. SSI for non audio users). This is mainly due to the fact that most audio interfaces on SoC CPUs exist within a generic serial interface and are also often used for non audio purposes.

Quoted 2 lines

So if this suffix is ok, I guess I would need to update the the following too ?

Yes, they have to be updated too. I have some more occurences in my tree, but a wcgrep imx-ssi should catch them all.

Quoted 14 lines

arch/arm/mach-mx2/devices.c:418: .name = "imx-ssi", \
arch/arm/mach-mx2/clock_imx27.c:656: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx2/clock_imx27.c:657: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/clock-imx31.c:561: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx3/clock-imx31.c:562: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/clock-imx35.c:467: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx3/clock-imx35.c:468: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/devices.c:565: .name = "imx-ssi",
arch/arm/mach-mx3/devices.c:572: .name = "imx-ssi",
arch/arm/plat-mxc/audmux-v2.c:52: return "imx-ssi.0";
arch/arm/plat-mxc/audmux-v2.c:54: return "imx-ssi.1";

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#10 lore raw
Quoted 41 lines · Sascha Hauer
Quoted 12 lines · Liam Girdwood
Quoted 11 lines · Sascha Hauer
Quoted 10 lines · Liam Girdwood
Quoted 3 lines · Sascha Hauer

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Ok, I don't think it's that far off. Everything builds for i.MX and all components should register. The part I can't test is the component probe() and playback/capture.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Have you seen an oops ?

Many of them, yes ;)

The following patch puts i.MX (nearly) back into business.

Thanks for this.

There are probably some bits for the DMA part missing, I haven't tested it yet, but will do soon.

Quoted 16 lines

sound/soc/imx/imx-ssi.c static struct platform_driver imx_ssi_driver = { · line 734

Quoted 8 lines
sound/soc/imx/imx-ssi.c +1 -1
 	if (ssi->flags & IMX_SSI_USE_AC97)
@@ -706,7 +731,7 @@ static struct platform_driver imx_ssi_driver = {
 	.remove = __devexit_p(imx_ssi_remove),
 
 	.driver = {
-		.name = "imx-ssi-dai",
+		.name = "imx-ssi",

The reason that the DAI driver name was changed on all platforms to include a "-dai" suffix was to distinguish the ASoC SSI driver from a generic SSI serial IO driver (i.e. SSI for non audio users). This is mainly due to the fact that most audio interfaces on SoC CPUs exist within a generic serial interface and are also often used for non audio purposes.

Quoted 20 lines
Quoted 2 lines

So if this suffix is ok, I guess I would need to update the the following too ?

Yes, they have to be updated too. I have some more occurences in my tree, but a wcgrep imx-ssi should catch them all.

Quoted 14 lines

arch/arm/mach-mx2/devices.c:418: .name = "imx-ssi", \
arch/arm/mach-mx2/clock_imx27.c:656: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx2/clock_imx27.c:657: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/clock-imx31.c:561: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx3/clock-imx31.c:562: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/clock-imx35.c:467: _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
arch/arm/mach-mx3/clock-imx35.c:468: _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
arch/arm/mach-mx3/devices.c:565: .name = "imx-ssi",
arch/arm/mach-mx3/devices.c:572: .name = "imx-ssi",
arch/arm/plat-mxc/audmux-v2.c:52: return "imx-ssi.0";
arch/arm/plat-mxc/audmux-v2.c:54: return "imx-ssi.1";

Ok, I'll apply and fix these up too.

Thanks

Liam

#11 lore raw
In reply to Sascha Hauer
Quoted 11 lines · Sascha Hauer
Quoted 10 lines · Liam Girdwood
Quoted 3 lines · Sascha Hauer

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Ok, I don't think it's that far off. Everything builds for i.MX and all components should register. The part I can't test is the component probe() and playback/capture.

Quoted 8 lines
Quoted 1 line

Have you seen an oops ?

Many of them, yes ;)

The following patch puts i.MX (nearly) back into business.

Sascha

Both applied. I'll do the string change for SSI shortly.

Thanks

Liam

author maintainer
#12 lore raw
In reply to Liam Girdwood
Quoted 6 lines · Liam Girdwood
Quoted 3 lines · Sascha Hauer

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Quoted 6 lines

Ok, I don't think it's that far off. Everything builds for i.MX and all components should register. The part I can't test is the component probe() and playback/capture.

Have you seen an oops ?

Besides the patch that I just sent I get a null pointer deref without the following patch. I couldn't find who should set codec->ac97->bus->card, but it's null when I get here. Is this an i.MX fault or is there something else missing here?

Sascha

sound/soc/soc-core.c +1 -1
index 81a77e0..eddb26e 100644
@@ -312,7 +312,7 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec)
 	codec->ac97->dev.release = soc_ac97_device_release;
 
 	dev_set_name(&codec->ac97->dev, "%d-%d:%s",
-		     codec->ac97->bus->card->number, 0, codec->name);
+		     codec->snd_card->number, 0, codec->name);
 	err = device_register(&codec->ac97->dev);
 	if (err < 0) {
 		snd_printk(KERN_ERR "Can't register ac97 bus\n");
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#13 lore raw
Quoted 11 lines · Sascha Hauer
Quoted 10 lines · Liam Girdwood
Quoted 3 lines · Sascha Hauer

I just looked at the i.MX part in the multi-component update and this is currently far from being in a working state, so there's still some work to do before thinking about possible conflicts...

Ok, I don't think it's that far off. Everything builds for i.MX and all components should register. The part I can't test is the component probe() and playback/capture.

Quoted 8 lines
Quoted 2 lines

Have you seen an oops ?

Besides the patch that I just sent I get a null pointer deref without the following patch. I couldn't find who should set codec->ac97->bus->card, but it's null when I get here. Is this an i.MX fault or is there something else missing here?

That is set in the AC97 core and did work at the time of the RFC (when I could test on my now non working Zylonite). Although since the RFC there had been changes to use the dev_name for component binding and a little re-reordering on the bind (and would have affected this piece of code too).

Quoted 7 lines

Sascha

sound/soc/soc-core.c +0 -0
index 81a77e0..eddb26e 100644

sound/soc/soc-core.c static int soc_ac97_dev_register(struct snd_soc_codec *codec) · line 318

Quoted 8 lines
sound/soc/soc-core.c +1 -1
@@ -312,7 +312,7 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec)
 	codec->ac97->dev.release = soc_ac97_device_release;
 
 	dev_set_name(&codec->ac97->dev, "%d-%d:%s",
-		     codec->ac97->bus->card->number, 0, codec->name);
+		     codec->snd_card->number, 0, codec->name);
 	err = device_register(&codec->ac97->dev);
 	if (err < 0) {
 		snd_printk(KERN_ERR "Can't register ac97 bus\n");

This looks good to me, as card will be set after the device_register.

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk