From: Nicolin Chen <Guangyu.Chen@freescale.com>
To: Mark Brown <broonie@kernel.org>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
lgirdwood@gmail.com
Subject: Re: [PATCH] ASoC: imx-spdif: Use module_init() to handle platform_device_register()
Date: Tue, 17 Dec 2013 18:31:05 +0800 [thread overview]
Message-ID: <20131217103049.GA3043@MrMyself> (raw)
In-Reply-To: <20131216221710.GH3185@sirena.org.uk>
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
Sir, I just tried to register the CODEC DAI in machine driver and it
works perfectly for module-loading. But when unloading it....
[...]
root@freescale ~$ modprobe snd-soc-imx-spdif
imx-spdif sound-spdif.10: S/PDIF-RX <-> 2004000.spdif mapping ok
root@freescale ~$ lsmod
Module Size Used by
snd_soc_imx_spdif 3207 1
snd_soc_fsl_spdif 9604 2
imx_pcm_dma 1140 1 snd_soc_fsl_spdif
imx_sdma 10781 0 [permanent]
root@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.
Then I also tried to register it to the pdev->dev of CPU DAI driver --
fsl-spdif, which is also the platform driver. The result is that there's
nothing wrong with module loading/unloading except one failure:
[...]
root@freescale ~$ rmmod snd-soc-imx-spdif
root@freescale ~$ modprobe snd-soc-imx-spdif
debugfs: creating file 'imx-spdif'
debugfs: creating file 'dapm_pop_time'
debugfs: creating file 'dapm'
debugfs: creating file 'bias_level'
debugfs: creating file '2004000.spdif'
debugfs: creating file 'cache_sync'
debugfs: creating file 'cache_only'
debugfs: creating file 'codec_reg'
debugfs: creating file 'dapm'
debugfs: creating file 'bias_level'
debugfs: creating file '2004000.spdif'
fsl-spdif-dai 2004000.spdif: ASoC: Failed to create platform debugfs directory
imx-spdif sound-spdif.10: S/PDIF-RX <-> 2004000.spdif mapping ok
debugfs: creating file 'Capture'
debugfs: creating file 'spdif-in'
[...]
It should be caused by the naming conflict since they are two exact same
names.
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.
Thank you,
Nicolin Chen
next prev parent reply other threads:[~2013-12-17 10:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 10:36 [PATCH] ASoC: imx-spdif: Use module_init() to handle platform_device_register() Nicolin Chen
2013-12-16 19:47 ` Mark Brown
2013-12-16 21:19 ` Russell King - ARM Linux
2013-12-16 22:17 ` Mark Brown
2013-12-17 3:05 ` Nicolin Chen
2013-12-17 10:31 ` Nicolin Chen [this message]
2013-12-18 13:04 ` Mark Brown
2013-12-20 7:02 ` Nicolin Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131217103049.GA3043@MrMyself \
--to=guangyu.chen@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux@arm.linux.org.uk \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).