Custom ASOC codec driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All

I'm implementing a driver for TEF663x, and link (machine driver) to
iMX6 (kernel 4.x)
I understand ALSA and ASOC layers and architecture. I have good
knowledge about both chipset (soc and codec). Nevertheless I am really
confused with asoc structures, wich fields are mandatory and some
links between platform, machine and codec.

1-Why teh followin controls are duplicated? When muste ia have to use each one?
struct snd_soc_component_driver{
....
	/* Default control and setup, added after probe() is run */
	const struct snd_kcontrol_new *controls;
	unsigned int num_controls;
	const struct snd_soc_dapm_widget *dapm_widgets;
	unsigned int num_dapm_widgets;
	const struct snd_soc_dapm_route *dapm_routes;
	unsigned int num_dapm_routes;
....
}

but this struct is included in snd_soc_codec_driver, which one has his
own widgets, routes and kcontrols
struct snd_soc_codec_driver {
.....
        struct snd_soc_component_driver component_driver;
	/* Default control and setup, added after probe() is run */
	const struct snd_kcontrol_new *controls;
	int num_controls;
	const struct snd_soc_dapm_widget *dapm_widgets;
	int num_dapm_widgets;
	const struct snd_soc_dapm_route *dapm_routes;
	int num_dapm_routes;
....

}

2-In kernel/Documentation/sound/alsa/soc/platform.txt, states "The
platform drivers only target the SoC CPU and must have no board
specific code", but several CODEC drivers have struct
snd_soc_platform_driver defined
Is it an specifications missleading, or bad codec implementation?

3-Is there any document/guide to implement asoc driver, or ASOC is
under development, and the mess should be organized


I was looking for information at
http://processors.wiki.ti.com/index.php/Sitara_Linux_Audio_DAC_Example
kernel/Documentation/sound/alsa/soc
ALSA home page (of curse writing alsa driver)
http://blog.csdn.net/sepnic/article/category/778492
Several kernel source files (each manufacturer have his own way :( )


Thanks ind advance

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux