aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/neo1973_wm8753.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-06 13:04:34 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-06 13:04:34 -0500
commitee7d476714464206317d4420d67e3bfa0308448d (patch)
tree023355c0e09a8f1e0f5f40dac93d02afc2765b50 /sound/soc/s3c24xx/neo1973_wm8753.c
parent26bd7b496cabc232fcff9ae0249828420c52b5af (diff)
ASoC: Re-remove hand-rolled pr_debug() macros
The recent set of S3C64xx patches re-added a lot of uses of DBG() that had previously been removed - revert this so the standard pr_debug() macro is used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/s3c24xx/neo1973_wm8753.c')
-rw-r--r--sound/soc/s3c24xx/neo1973_wm8753.c44
1 files changed, 18 insertions, 26 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index 74573352718a..5f6aeec0437d 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -40,14 +40,6 @@
40#include "s3c24xx-pcm.h" 40#include "s3c24xx-pcm.h"
41#include "s3c24xx-i2s.h" 41#include "s3c24xx-i2s.h"
42 42
43/* Debugging stuff */
44#define S3C24XX_SOC_NEO1973_WM8753_DEBUG 0
45#if S3C24XX_SOC_NEO1973_WM8753_DEBUG
46#define DBG(x...) printk(KERN_DEBUG "s3c24xx-soc-neo1973-wm8753: " x)
47#else
48#define DBG(x...)
49#endif
50
51/* define the scenarios */ 43/* define the scenarios */
52#define NEO_AUDIO_OFF 0 44#define NEO_AUDIO_OFF 0
53#define NEO_GSM_CALL_AUDIO_HANDSET 1 45#define NEO_GSM_CALL_AUDIO_HANDSET 1
@@ -72,7 +64,7 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream,
72 int ret = 0; 64 int ret = 0;
73 unsigned long iis_clkrate; 65 unsigned long iis_clkrate;
74 66
75 DBG("Entered %s\n", __func__); 67 pr_debug("Entered %s\n", __func__);
76 68
77 iis_clkrate = s3c24xx_i2s_get_clockrate(); 69 iis_clkrate = s3c24xx_i2s_get_clockrate();
78 70
@@ -158,7 +150,7 @@ static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream)
158 struct snd_soc_pcm_runtime *rtd = substream->private_data; 150 struct snd_soc_pcm_runtime *rtd = substream->private_data;
159 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 151 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
160 152
161 DBG("Entered %s\n", __func__); 153 pr_debug("Entered %s\n", __func__);
162 154
163 /* disable the PLL */ 155 /* disable the PLL */
164 return snd_soc_dai_set_pll(codec_dai, WM8753_PLL1, 0, 0); 156 return snd_soc_dai_set_pll(codec_dai, WM8753_PLL1, 0, 0);
@@ -181,7 +173,7 @@ static int neo1973_voice_hw_params(struct snd_pcm_substream *substream,
181 int ret = 0; 173 int ret = 0;
182 unsigned long iis_clkrate; 174 unsigned long iis_clkrate;
183 175
184 DBG("Entered %s\n", __func__); 176 pr_debug("Entered %s\n", __func__);
185 177
186 iis_clkrate = s3c24xx_i2s_get_clockrate(); 178 iis_clkrate = s3c24xx_i2s_get_clockrate();
187 179
@@ -224,7 +216,7 @@ static int neo1973_voice_hw_free(struct snd_pcm_substream *substream)
224 struct snd_soc_pcm_runtime *rtd = substream->private_data; 216 struct snd_soc_pcm_runtime *rtd = substream->private_data;
225 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 217 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
226 218
227 DBG("Entered %s\n", __func__); 219 pr_debug("Entered %s\n", __func__);
228 220
229 /* disable the PLL */ 221 /* disable the PLL */
230 return snd_soc_dai_set_pll(codec_dai, WM8753_PLL2, 0, 0); 222 return snd_soc_dai_set_pll(codec_dai, WM8753_PLL2, 0, 0);
@@ -246,7 +238,7 @@ static int neo1973_get_scenario(struct snd_kcontrol *kcontrol,
246 238
247static int set_scenario_endpoints(struct snd_soc_codec *codec, int scenario) 239static int set_scenario_endpoints(struct snd_soc_codec *codec, int scenario)
248{ 240{
249 DBG("Entered %s\n", __func__); 241 pr_debug("Entered %s\n", __func__);
250 242
251 switch (neo1973_scenario) { 243 switch (neo1973_scenario) {
252 case NEO_AUDIO_OFF: 244 case NEO_AUDIO_OFF:
@@ -330,7 +322,7 @@ static int neo1973_set_scenario(struct snd_kcontrol *kcontrol,
330{ 322{
331 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 323 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
332 324
333 DBG("Entered %s\n", __func__); 325 pr_debug("Entered %s\n", __func__);
334 326
335 if (neo1973_scenario == ucontrol->value.integer.value[0]) 327 if (neo1973_scenario == ucontrol->value.integer.value[0])
336 return 0; 328 return 0;
@@ -344,7 +336,7 @@ static u8 lm4857_regs[4] = {0x00, 0x40, 0x80, 0xC0};
344 336
345static void lm4857_write_regs(void) 337static void lm4857_write_regs(void)
346{ 338{
347 DBG("Entered %s\n", __func__); 339 pr_debug("Entered %s\n", __func__);
348 340
349 if (i2c_master_send(i2c, lm4857_regs, 4) != 4) 341 if (i2c_master_send(i2c, lm4857_regs, 4) != 4)
350 printk(KERN_ERR "lm4857: i2c write failed\n"); 342 printk(KERN_ERR "lm4857: i2c write failed\n");
@@ -357,7 +349,7 @@ static int lm4857_get_reg(struct snd_kcontrol *kcontrol,
357 int shift = (kcontrol->private_value >> 8) & 0x0F; 349 int shift = (kcontrol->private_value >> 8) & 0x0F;
358 int mask = (kcontrol->private_value >> 16) & 0xFF; 350 int mask = (kcontrol->private_value >> 16) & 0xFF;
359 351
360 DBG("Entered %s\n", __func__); 352 pr_debug("Entered %s\n", __func__);
361 353
362 ucontrol->value.integer.value[0] = (lm4857_regs[reg] >> shift) & mask; 354 ucontrol->value.integer.value[0] = (lm4857_regs[reg] >> shift) & mask;
363 return 0; 355 return 0;
@@ -385,7 +377,7 @@ static int lm4857_get_mode(struct snd_kcontrol *kcontrol,
385{ 377{
386 u8 value = lm4857_regs[LM4857_CTRL] & 0x0F; 378 u8 value = lm4857_regs[LM4857_CTRL] & 0x0F;
387 379
388 DBG("Entered %s\n", __func__); 380 pr_debug("Entered %s\n", __func__);
389 381
390 if (value) 382 if (value)
391 value -= 5; 383 value -= 5;
@@ -399,7 +391,7 @@ static int lm4857_set_mode(struct snd_kcontrol *kcontrol,
399{ 391{
400 u8 value = ucontrol->value.integer.value[0]; 392 u8 value = ucontrol->value.integer.value[0];
401 393
402 DBG("Entered %s\n", __func__); 394 pr_debug("Entered %s\n", __func__);
403 395
404 if (value) 396 if (value)
405 value += 5; 397 value += 5;
@@ -508,7 +500,7 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
508{ 500{
509 int i, err; 501 int i, err;
510 502
511 DBG("Entered %s\n", __func__); 503 pr_debug("Entered %s\n", __func__);
512 504
513 /* set up NC codec pins */ 505 /* set up NC codec pins */
514 snd_soc_dapm_nc_pin(codec, "LOUT2"); 506 snd_soc_dapm_nc_pin(codec, "LOUT2");
@@ -593,7 +585,7 @@ static struct snd_soc_device neo1973_snd_devdata = {
593static int lm4857_i2c_probe(struct i2c_client *client, 585static int lm4857_i2c_probe(struct i2c_client *client,
594 const struct i2c_device_id *id) 586 const struct i2c_device_id *id)
595{ 587{
596 DBG("Entered %s\n", __func__); 588 pr_debug("Entered %s\n", __func__);
597 589
598 i2c = client; 590 i2c = client;
599 591
@@ -603,7 +595,7 @@ static int lm4857_i2c_probe(struct i2c_client *client,
603 595
604static int lm4857_i2c_remove(struct i2c_client *client) 596static int lm4857_i2c_remove(struct i2c_client *client)
605{ 597{
606 DBG("Entered %s\n", __func__); 598 pr_debug("Entered %s\n", __func__);
607 599
608 i2c = NULL; 600 i2c = NULL;
609 601
@@ -614,7 +606,7 @@ static u8 lm4857_state;
614 606
615static int lm4857_suspend(struct i2c_client *dev, pm_message_t state) 607static int lm4857_suspend(struct i2c_client *dev, pm_message_t state)
616{ 608{
617 DBG("Entered %s\n", __func__); 609 pr_debug("Entered %s\n", __func__);
618 610
619 dev_dbg(&dev->dev, "lm4857_suspend\n"); 611 dev_dbg(&dev->dev, "lm4857_suspend\n");
620 lm4857_state = lm4857_regs[LM4857_CTRL] & 0xf; 612 lm4857_state = lm4857_regs[LM4857_CTRL] & 0xf;
@@ -627,7 +619,7 @@ static int lm4857_suspend(struct i2c_client *dev, pm_message_t state)
627 619
628static int lm4857_resume(struct i2c_client *dev) 620static int lm4857_resume(struct i2c_client *dev)
629{ 621{
630 DBG("Entered %s\n", __func__); 622 pr_debug("Entered %s\n", __func__);
631 623
632 if (lm4857_state) { 624 if (lm4857_state) {
633 lm4857_regs[LM4857_CTRL] |= (lm4857_state & 0x0f); 625 lm4857_regs[LM4857_CTRL] |= (lm4857_state & 0x0f);
@@ -638,7 +630,7 @@ static int lm4857_resume(struct i2c_client *dev)
638 630
639static void lm4857_shutdown(struct i2c_client *dev) 631static void lm4857_shutdown(struct i2c_client *dev)
640{ 632{
641 DBG("Entered %s\n", __func__); 633 pr_debug("Entered %s\n", __func__);
642 634
643 dev_dbg(&dev->dev, "lm4857_shutdown\n"); 635 dev_dbg(&dev->dev, "lm4857_shutdown\n");
644 lm4857_regs[LM4857_CTRL] &= 0xf0; 636 lm4857_regs[LM4857_CTRL] &= 0xf0;
@@ -669,7 +661,7 @@ static int __init neo1973_init(void)
669{ 661{
670 int ret; 662 int ret;
671 663
672 DBG("Entered %s\n", __func__); 664 pr_debug("Entered %s\n", __func__);
673 665
674 if (!machine_is_neo1973_gta01()) { 666 if (!machine_is_neo1973_gta01()) {
675 printk(KERN_INFO 667 printk(KERN_INFO
@@ -700,7 +692,7 @@ static int __init neo1973_init(void)
700 692
701static void __exit neo1973_exit(void) 693static void __exit neo1973_exit(void)
702{ 694{
703 DBG("Entered %s\n", __func__); 695 pr_debug("Entered %s\n", __func__);
704 696
705 i2c_del_driver(&lm4857_i2c_driver); 697 i2c_del_driver(&lm4857_i2c_driver);
706 platform_device_unregister(neo1973_snd_device); 698 platform_device_unregister(neo1973_snd_device);