alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Liam Girdwood <lg@opensource.wolfsonmicro.com>,
	alsa-devel@alsa-project.org
Subject: snd_soc_dai_link.init()
Date: Wed, 30 May 2007 17:34:29 -0500	[thread overview]
Message-ID: <465DFBF5.9040800@freescale.com> (raw)

Liam,

Why does the init() function pointer in the snd_soc_dai_link structure take a 
snd_soc_codec pointer?  Wouldn't it make more sense for it to take a snd_soc_dai_link 
pointer?  That way, I could use the init() function to initialize the structure.

I'm trying to write a function that will initialize the codec_dai pointer.  I thought I 
could use snd_soc_dai_link.init(), but I don't know how to get the pointer to the 
snd_soc_dai_link structure from a snd_soc_codec structure.



/* SoC machine DAI configuration, glues a codec and cpu DAI together */
struct snd_soc_dai_link  {
	char *name;			/* Codec name */
	char *stream_name;		/* Stream name */

	/* DAI */
	struct snd_soc_codec_dai *codec_dai;
	struct snd_soc_cpu_dai *cpu_dai;

	/* machine stream operations */
	struct snd_soc_ops *ops;

	/* codec/machine specific init - e.g. add machine controls */
	int (*init)(struct snd_soc_codec *codec);
};


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

             reply	other threads:[~2007-05-30 22:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-30 22:34 Timur Tabi [this message]
2007-05-31 17:02 ` snd_soc_dai_link.init() Liam Girdwood
2007-05-31 17:04   ` snd_soc_dai_link.init() Timur Tabi
2007-05-31 17:09     ` snd_soc_dai_link.init() Liam Girdwood
2007-05-31 23:14       ` snd_soc_dai_link.init() Timur Tabi
2007-06-01 13:38         ` snd_soc_dai_link.init() Liam Girdwood
2007-06-01 14:41           ` snd_soc_dai_link.init() Liam Girdwood
2007-06-01 16:42             ` snd_soc_dai_link.init() Timur Tabi

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=465DFBF5.9040800@freescale.com \
    --to=timur@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lg@opensource.wolfsonmicro.com \
    /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).