aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8993.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8993.c')
-rw-r--r--sound/soc/codecs/wm8993.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 03e8b1a6a56c..d8d300c6175f 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -371,7 +371,7 @@ static int wm8993_set_fll(struct snd_soc_dai *dai, int fll_id, int source,
371 unsigned int Fref, unsigned int Fout) 371 unsigned int Fref, unsigned int Fout)
372{ 372{
373 struct snd_soc_codec *codec = dai->codec; 373 struct snd_soc_codec *codec = dai->codec;
374 struct wm8993_priv *wm8993 = codec->private_data; 374 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
375 u16 reg1, reg4, reg5; 375 u16 reg1, reg4, reg5;
376 struct _fll_div fll_div; 376 struct _fll_div fll_div;
377 int ret; 377 int ret;
@@ -458,7 +458,7 @@ static int wm8993_set_fll(struct snd_soc_dai *dai, int fll_id, int source,
458 458
459static int configure_clock(struct snd_soc_codec *codec) 459static int configure_clock(struct snd_soc_codec *codec)
460{ 460{
461 struct wm8993_priv *wm8993 = codec->private_data; 461 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
462 unsigned int reg; 462 unsigned int reg;
463 463
464 /* This should be done on init() for bypass paths */ 464 /* This should be done on init() for bypass paths */
@@ -717,7 +717,7 @@ static int class_w_put(struct snd_kcontrol *kcontrol,
717{ 717{
718 struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); 718 struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
719 struct snd_soc_codec *codec = widget->codec; 719 struct snd_soc_codec *codec = widget->codec;
720 struct wm8993_priv *wm8993 = codec->private_data; 720 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
721 int ret; 721 int ret;
722 722
723 /* Turn it off if we're using the main output mixer */ 723 /* Turn it off if we're using the main output mixer */
@@ -949,7 +949,7 @@ static void wm8993_cache_restore(struct snd_soc_codec *codec)
949static int wm8993_set_bias_level(struct snd_soc_codec *codec, 949static int wm8993_set_bias_level(struct snd_soc_codec *codec,
950 enum snd_soc_bias_level level) 950 enum snd_soc_bias_level level)
951{ 951{
952 struct wm8993_priv *wm8993 = codec->private_data; 952 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
953 int ret; 953 int ret;
954 954
955 switch (level) { 955 switch (level) {
@@ -1047,7 +1047,7 @@ static int wm8993_set_sysclk(struct snd_soc_dai *codec_dai,
1047 int clk_id, unsigned int freq, int dir) 1047 int clk_id, unsigned int freq, int dir)
1048{ 1048{
1049 struct snd_soc_codec *codec = codec_dai->codec; 1049 struct snd_soc_codec *codec = codec_dai->codec;
1050 struct wm8993_priv *wm8993 = codec->private_data; 1050 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
1051 1051
1052 switch (clk_id) { 1052 switch (clk_id) {
1053 case WM8993_SYSCLK_MCLK: 1053 case WM8993_SYSCLK_MCLK:
@@ -1067,7 +1067,7 @@ static int wm8993_set_dai_fmt(struct snd_soc_dai *dai,
1067 unsigned int fmt) 1067 unsigned int fmt)
1068{ 1068{
1069 struct snd_soc_codec *codec = dai->codec; 1069 struct snd_soc_codec *codec = dai->codec;
1070 struct wm8993_priv *wm8993 = codec->private_data; 1070 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
1071 unsigned int aif1 = snd_soc_read(codec, WM8993_AUDIO_INTERFACE_1); 1071 unsigned int aif1 = snd_soc_read(codec, WM8993_AUDIO_INTERFACE_1);
1072 unsigned int aif4 = snd_soc_read(codec, WM8993_AUDIO_INTERFACE_4); 1072 unsigned int aif4 = snd_soc_read(codec, WM8993_AUDIO_INTERFACE_4);
1073 1073
@@ -1163,7 +1163,7 @@ static int wm8993_hw_params(struct snd_pcm_substream *substream,
1163 struct snd_soc_dai *dai) 1163 struct snd_soc_dai *dai)
1164{ 1164{
1165 struct snd_soc_codec *codec = dai->codec; 1165 struct snd_soc_codec *codec = dai->codec;
1166 struct wm8993_priv *wm8993 = codec->private_data; 1166 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
1167 int ret, i, best, best_val, cur_val; 1167 int ret, i, best, best_val, cur_val;
1168 unsigned int clocking1, clocking3, aif1, aif4; 1168 unsigned int clocking1, clocking3, aif1, aif4;
1169 1169
@@ -1328,7 +1328,7 @@ static int wm8993_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
1328 unsigned int rx_mask, int slots, int slot_width) 1328 unsigned int rx_mask, int slots, int slot_width)
1329{ 1329{
1330 struct snd_soc_codec *codec = dai->codec; 1330 struct snd_soc_codec *codec = dai->codec;
1331 struct wm8993_priv *wm8993 = codec->private_data; 1331 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
1332 int aif1 = 0; 1332 int aif1 = 0;
1333 int aif2 = 0; 1333 int aif2 = 0;
1334 1334
@@ -1431,7 +1431,7 @@ static int wm8993_probe(struct platform_device *pdev)
1431 1431
1432 socdev->card->codec = wm8993_codec; 1432 socdev->card->codec = wm8993_codec;
1433 codec = wm8993_codec; 1433 codec = wm8993_codec;
1434 wm8993 = codec->private_data; 1434 wm8993 = snd_soc_codec_get_drvdata(codec);
1435 1435
1436 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); 1436 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
1437 if (ret < 0) { 1437 if (ret < 0) {
@@ -1478,7 +1478,7 @@ static int wm8993_suspend(struct platform_device *pdev, pm_message_t state)
1478{ 1478{
1479 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 1479 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
1480 struct snd_soc_codec *codec = socdev->card->codec; 1480 struct snd_soc_codec *codec = socdev->card->codec;
1481 struct wm8993_priv *wm8993 = codec->private_data; 1481 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
1482 int fll_fout = wm8993->fll_fout; 1482 int fll_fout = wm8993->fll_fout;
1483 int fll_fref = wm8993->fll_fref; 1483 int fll_fref = wm8993->fll_fref;
1484 int ret; 1484 int ret;
@@ -1502,7 +1502,7 @@ static int wm8993_resume(struct platform_device *pdev)
1502{ 1502{
1503 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 1503 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
1504 struct snd_soc_codec *codec = socdev->card->codec; 1504 struct snd_soc_codec *codec = socdev->card->codec;
1505 struct wm8993_priv *wm8993 = codec->private_data; 1505 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
1506 int ret; 1506 int ret;
1507 1507
1508 wm8993_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1508 wm8993_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
@@ -1571,7 +1571,7 @@ static int wm8993_i2c_probe(struct i2c_client *i2c,
1571 codec->set_bias_level = wm8993_set_bias_level; 1571 codec->set_bias_level = wm8993_set_bias_level;
1572 codec->dai = &wm8993_dai; 1572 codec->dai = &wm8993_dai;
1573 codec->num_dai = 1; 1573 codec->num_dai = 1;
1574 codec->private_data = wm8993; 1574 snd_soc_codec_set_drvdata(codec, wm8993);
1575 1575
1576 wm8993->hubs_data.hp_startup_mode = 1; 1576 wm8993->hubs_data.hp_startup_mode = 1;
1577 wm8993->hubs_data.dcs_codes = -2; 1577 wm8993->hubs_data.dcs_codes = -2;