All of lore.kernel.org
 help / color / mirror / Atom feed
* generic i2s driver problems on an Exynos 5250 A15 board
@ 2014-08-12  8:17 Matt Flax
  0 siblings, 0 replies; only message in thread
From: Matt Flax @ 2014-08-12  8:17 UTC (permalink / raw)
  To: alsa-devel

hi there,

I am writing a very generic alsa soc i2s driver for a very generic i2s 
device.
The platform is an Exynos 5250 SoC board.

Having trouble was looking for some help ...

I have tried to start this driver in two ways. 1] Using the 
module_init/module_exit method and 2] Using the module_platform_driver 
approach.

I have implemented the following :
soc/codecs/implant.c
soc/samsung/implant.c

In both cases I have :
static struct snd_soc_ops implant_ops = {
     .hw_params = implant_hw_params,
};

static struct snd_soc_dai_link implant_dai = {
     .name        = "implant",
     .stream_name    = "IMPLANT",
     .cpu_dai_name = "samsung-i2s.0",
     .codec_dai_name = "implant-pcm",
     .platform_name = "samsung-i2s.0",
     .codec_name    = "implant.0-001a",
     .ignore_suspend = 1,
     .ops = &implant_ops,
};

I have setup the device tree as expected for sound@3830000
     sound@3830000 {
         samsung,codec-type = "implant";
     };

1]    Approach using module_init/module_exit
static struct snd_soc_card snd_soc_machine_implant = {
     .name        = "Implant",
     .owner        = THIS_MODULE,
     .dai_link    = &implant_dai,
     .num_links    = 1,

     .dapm_widgets    = widgets,
     .num_dapm_widgets = ARRAY_SIZE(widgets),
     .dapm_routes    = audio_paths,
     .num_dapm_routes = ARRAY_SIZE(audio_paths),
};

Here is the output of the kernel :

[    1.802645] soc-audio soc-audio: ASoC: machine Implant should use 
snd_soc_register_card()
[    1.802656] soc-audio soc-audio: ASoC: CPU DAI samsung-i2s.0 not 
registered
[    1.802679] platform soc-audio: Driver soc-audio requests probe deferral
[    2.271140] soc-audio: probe of soc-audio failed with error -22

Not sure why it fails.

The only thing I know is that my driver exits the init function 
returning 0 (module_init(implant_init)).
This appears to be correct.

2]     Approach using module_platform_driver
When I switch to using snd_soc_register_card with :
module_platform_driver(implant_driver);

static struct platform_driver implant_driver = {
     .driver = {
         .name = "implant",
         .owner = THIS_MODULE,
     },
     .probe = implant_probe,
     .remove = implant_remove,
};

I get the following from dmesg :
[    1.802430] Error: Driver 'implant' is already registered, aborting...

However I don't see any of my printk statements from dmesg ...


Matt

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-12  8:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12  8:17 generic i2s driver problems on an Exynos 5250 A15 board Matt Flax

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.