]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ASoC: OMAP: HDMI: Introduce driver data for audio codec
authorRicardo Neri <ricardo.neri@ti.com>
Wed, 23 Nov 2011 02:09:41 +0000 (20:09 -0600)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 5 Jan 2012 08:34:47 +0000 (10:34 +0200)
Under the new DSS architecture for HDMI, there is a clear separation
between general DSS code and HDMI IP-specific data. Functions
that require access to the HDMI driver IP-specific data receive an
hdmi_ip_data structure. The ASoC codec require access to such
IP-specific data. Then, instead of accessing it directly, it will be
passed as codec driver data. This also helps to have a clear separation
between DSS and ASoC portions of the code.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/hdmi.c

index b064762b6994f595404dbd98f41d0dd68d7d1f4b..3c96d771e2c9ef4362c3bb5ad8fce72674bc6640 100644 (file)
@@ -705,7 +705,16 @@ static int hdmi_audio_startup(struct snd_pcm_substream *substream,
        return 0;
 }
 
+static int hdmi_audio_codec_probe(struct snd_soc_codec *codec)
+{
+       struct hdmi_ip_data *priv = &hdmi.ip_data;
+
+       snd_soc_codec_set_drvdata(codec, priv);
+       return 0;
+}
+
 static struct snd_soc_codec_driver hdmi_audio_codec_drv = {
+       .probe = hdmi_audio_codec_probe,
 };
 
 static struct snd_soc_dai_ops hdmi_audio_codec_ops = {