aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm9713.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-24 09:05:29 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-24 09:05:34 -0500
commit55b8bac50a494871594e81a05b37c15e7283f868 (patch)
treee44eedb9f910b97821c79cf1f60c136911a8539b /sound/soc/codecs/wm9713.c
parent4f904735c809e44c11f57cd4f82446aac1243e0e (diff)
ASoC: Use supplied DAI for WM9713 rather than substream
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm9713.c')
-rw-r--r--sound/soc/codecs/wm9713.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index 7be811a3b02a..a502667fca7a 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -931,9 +931,7 @@ static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream,
931 struct snd_pcm_hw_params *params, 931 struct snd_pcm_hw_params *params,
932 struct snd_soc_dai *dai) 932 struct snd_soc_dai *dai)
933{ 933{
934 struct snd_soc_pcm_runtime *rtd = substream->private_data; 934 struct snd_soc_codec *codec = dai->codec;
935 struct snd_soc_device *socdev = rtd->socdev;
936 struct snd_soc_codec *codec = socdev->codec;
937 u16 reg = ac97_read(codec, AC97_CENTER_LFE_MASTER) & 0xfff3; 935 u16 reg = ac97_read(codec, AC97_CENTER_LFE_MASTER) & 0xfff3;
938 936
939 switch (params_format(params)) { 937 switch (params_format(params)) {
@@ -958,9 +956,7 @@ static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream,
958static void wm9713_voiceshutdown(struct snd_pcm_substream *substream, 956static void wm9713_voiceshutdown(struct snd_pcm_substream *substream,
959 struct snd_soc_dai *dai) 957 struct snd_soc_dai *dai)
960{ 958{
961 struct snd_soc_pcm_runtime *rtd = substream->private_data; 959 struct snd_soc_codec *codec = dai->codec;
962 struct snd_soc_device *socdev = rtd->socdev;
963 struct snd_soc_codec *codec = socdev->codec;
964 u16 status; 960 u16 status;
965 961
966 /* Gracefully shut down the voice interface. */ 962 /* Gracefully shut down the voice interface. */
@@ -974,10 +970,8 @@ static void wm9713_voiceshutdown(struct snd_pcm_substream *substream,
974static int ac97_hifi_prepare(struct snd_pcm_substream *substream, 970static int ac97_hifi_prepare(struct snd_pcm_substream *substream,
975 struct snd_soc_dai *dai) 971 struct snd_soc_dai *dai)
976{ 972{
973 struct snd_soc_codec *codec = dai->codec;
977 struct snd_pcm_runtime *runtime = substream->runtime; 974 struct snd_pcm_runtime *runtime = substream->runtime;
978 struct snd_soc_pcm_runtime *rtd = substream->private_data;
979 struct snd_soc_device *socdev = rtd->socdev;
980 struct snd_soc_codec *codec = socdev->codec;
981 int reg; 975 int reg;
982 u16 vra; 976 u16 vra;
983 977
@@ -995,10 +989,8 @@ static int ac97_hifi_prepare(struct snd_pcm_substream *substream,
995static int ac97_aux_prepare(struct snd_pcm_substream *substream, 989static int ac97_aux_prepare(struct snd_pcm_substream *substream,
996 struct snd_soc_dai *dai) 990 struct snd_soc_dai *dai)
997{ 991{
992 struct snd_soc_codec *codec = dai->codec;
998 struct snd_pcm_runtime *runtime = substream->runtime; 993 struct snd_pcm_runtime *runtime = substream->runtime;
999 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1000 struct snd_soc_device *socdev = rtd->socdev;
1001 struct snd_soc_codec *codec = socdev->codec;
1002 u16 vra, xsle; 994 u16 vra, xsle;
1003 995
1004 vra = ac97_read(codec, AC97_EXTENDED_STATUS); 996 vra = ac97_read(codec, AC97_EXTENDED_STATUS);