[alsa-devel] [PATCH] ASoC: imx-spdif: Use module_init() to handle platform_device_register()

Mark Brown broonie at kernel.org
Wed Dec 18 14:04:15 CET 2013

On Tue, Dec 17, 2013 at 06:31:05PM +0800, Nicolin Chen wrote:
> On Mon, Dec 16, 2013 at 10:17:10PM +0000, Mark Brown wrote:
> > I don't see registering the DAIs directly as adding complexity here;
> > it's essentially what the current code is trying to do and doesn't
> > change the normal device registration flow at all.  I do agree that the

> root at freescale ~$ rmmod snd-soc-imx-spdif
> rmmod: can't unload 'snd_soc_imx_spdif': Resource temporarily unavailable
> [...]
> It looks like registering the CODEC DAI to the pdev->dev of machine driver
> wasn't a good idea since it would lock itself up.

OK, that's the module loading bodge kicking in.  We could always remove
that since it's not that effective anyway I suppose but it's going to
make things a bit more error prone.

> Although I'll continue finding another way to register it tomorrow, I think
> it's better to make a simple report for this solution.

> And if you have any idea, please guide me.

There's still the options of either registering the dummy devices in the
core (rather than in a specific module where two modules could conflict
with each other) or registering a subdevice for the card that I
mentioned the other day.  Of those two registering in the core seems
better - it's basically the same as your current idea but means that two
card drivers that need this won't conflict with each other.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20131218/08179d28/attachment.sig>

More information about the Alsa-devel mailing list