Commit ee7d4767 authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 26bd7b49
...@@ -40,14 +40,6 @@ ...@@ -40,14 +40,6 @@
#include "s3c24xx-pcm.h" #include "s3c24xx-pcm.h"
#include "s3c24xx-i2s.h" #include "s3c24xx-i2s.h"
/* Debugging stuff */
#define S3C24XX_SOC_NEO1973_WM8753_DEBUG 0
#if S3C24XX_SOC_NEO1973_WM8753_DEBUG
#define DBG(x...) printk(KERN_DEBUG "s3c24xx-soc-neo1973-wm8753: " x)
#else
#define DBG(x...)
#endif
/* define the scenarios */ /* define the scenarios */
#define NEO_AUDIO_OFF 0 #define NEO_AUDIO_OFF 0
#define NEO_GSM_CALL_AUDIO_HANDSET 1 #define NEO_GSM_CALL_AUDIO_HANDSET 1
...@@ -72,7 +64,7 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream, ...@@ -72,7 +64,7 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream,
int ret = 0; int ret = 0;
unsigned long iis_clkrate; unsigned long iis_clkrate;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
iis_clkrate = s3c24xx_i2s_get_clockrate(); iis_clkrate = s3c24xx_i2s_get_clockrate();
...@@ -158,7 +150,7 @@ static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream) ...@@ -158,7 +150,7 @@ static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
/* disable the PLL */ /* disable the PLL */
return snd_soc_dai_set_pll(codec_dai, WM8753_PLL1, 0, 0); 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,7 +173,7 @@ static int neo1973_voice_hw_params(struct snd_pcm_substream *substream,
int ret = 0; int ret = 0;
unsigned long iis_clkrate; unsigned long iis_clkrate;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
iis_clkrate = s3c24xx_i2s_get_clockrate(); iis_clkrate = s3c24xx_i2s_get_clockrate();
...@@ -224,7 +216,7 @@ static int neo1973_voice_hw_free(struct snd_pcm_substream *substream) ...@@ -224,7 +216,7 @@ static int neo1973_voice_hw_free(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
/* disable the PLL */ /* disable the PLL */
return snd_soc_dai_set_pll(codec_dai, WM8753_PLL2, 0, 0); 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,7 +238,7 @@ static int neo1973_get_scenario(struct snd_kcontrol *kcontrol,
static int set_scenario_endpoints(struct snd_soc_codec *codec, int scenario) static int set_scenario_endpoints(struct snd_soc_codec *codec, int scenario)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
switch (neo1973_scenario) { switch (neo1973_scenario) {
case NEO_AUDIO_OFF: case NEO_AUDIO_OFF:
...@@ -330,7 +322,7 @@ static int neo1973_set_scenario(struct snd_kcontrol *kcontrol, ...@@ -330,7 +322,7 @@ static int neo1973_set_scenario(struct snd_kcontrol *kcontrol,
{ {
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (neo1973_scenario == ucontrol->value.integer.value[0]) if (neo1973_scenario == ucontrol->value.integer.value[0])
return 0; return 0;
...@@ -344,7 +336,7 @@ static u8 lm4857_regs[4] = {0x00, 0x40, 0x80, 0xC0}; ...@@ -344,7 +336,7 @@ static u8 lm4857_regs[4] = {0x00, 0x40, 0x80, 0xC0};
static void lm4857_write_regs(void) static void lm4857_write_regs(void)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (i2c_master_send(i2c, lm4857_regs, 4) != 4) if (i2c_master_send(i2c, lm4857_regs, 4) != 4)
printk(KERN_ERR "lm4857: i2c write failed\n"); printk(KERN_ERR "lm4857: i2c write failed\n");
...@@ -357,7 +349,7 @@ static int lm4857_get_reg(struct snd_kcontrol *kcontrol, ...@@ -357,7 +349,7 @@ static int lm4857_get_reg(struct snd_kcontrol *kcontrol,
int shift = (kcontrol->private_value >> 8) & 0x0F; int shift = (kcontrol->private_value >> 8) & 0x0F;
int mask = (kcontrol->private_value >> 16) & 0xFF; int mask = (kcontrol->private_value >> 16) & 0xFF;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
ucontrol->value.integer.value[0] = (lm4857_regs[reg] >> shift) & mask; ucontrol->value.integer.value[0] = (lm4857_regs[reg] >> shift) & mask;
return 0; return 0;
...@@ -385,7 +377,7 @@ static int lm4857_get_mode(struct snd_kcontrol *kcontrol, ...@@ -385,7 +377,7 @@ static int lm4857_get_mode(struct snd_kcontrol *kcontrol,
{ {
u8 value = lm4857_regs[LM4857_CTRL] & 0x0F; u8 value = lm4857_regs[LM4857_CTRL] & 0x0F;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (value) if (value)
value -= 5; value -= 5;
...@@ -399,7 +391,7 @@ static int lm4857_set_mode(struct snd_kcontrol *kcontrol, ...@@ -399,7 +391,7 @@ static int lm4857_set_mode(struct snd_kcontrol *kcontrol,
{ {
u8 value = ucontrol->value.integer.value[0]; u8 value = ucontrol->value.integer.value[0];
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (value) if (value)
value += 5; value += 5;
...@@ -508,7 +500,7 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec) ...@@ -508,7 +500,7 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
{ {
int i, err; int i, err;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
/* set up NC codec pins */ /* set up NC codec pins */
snd_soc_dapm_nc_pin(codec, "LOUT2"); snd_soc_dapm_nc_pin(codec, "LOUT2");
...@@ -593,7 +585,7 @@ static struct snd_soc_device neo1973_snd_devdata = { ...@@ -593,7 +585,7 @@ static struct snd_soc_device neo1973_snd_devdata = {
static int lm4857_i2c_probe(struct i2c_client *client, static int lm4857_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
i2c = client; i2c = client;
...@@ -603,7 +595,7 @@ static int lm4857_i2c_probe(struct i2c_client *client, ...@@ -603,7 +595,7 @@ static int lm4857_i2c_probe(struct i2c_client *client,
static int lm4857_i2c_remove(struct i2c_client *client) static int lm4857_i2c_remove(struct i2c_client *client)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
i2c = NULL; i2c = NULL;
...@@ -614,7 +606,7 @@ static u8 lm4857_state; ...@@ -614,7 +606,7 @@ static u8 lm4857_state;
static int lm4857_suspend(struct i2c_client *dev, pm_message_t state) static int lm4857_suspend(struct i2c_client *dev, pm_message_t state)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
dev_dbg(&dev->dev, "lm4857_suspend\n"); dev_dbg(&dev->dev, "lm4857_suspend\n");
lm4857_state = lm4857_regs[LM4857_CTRL] & 0xf; lm4857_state = lm4857_regs[LM4857_CTRL] & 0xf;
...@@ -627,7 +619,7 @@ static int lm4857_suspend(struct i2c_client *dev, pm_message_t state) ...@@ -627,7 +619,7 @@ static int lm4857_suspend(struct i2c_client *dev, pm_message_t state)
static int lm4857_resume(struct i2c_client *dev) static int lm4857_resume(struct i2c_client *dev)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (lm4857_state) { if (lm4857_state) {
lm4857_regs[LM4857_CTRL] |= (lm4857_state & 0x0f); lm4857_regs[LM4857_CTRL] |= (lm4857_state & 0x0f);
...@@ -638,7 +630,7 @@ static int lm4857_resume(struct i2c_client *dev) ...@@ -638,7 +630,7 @@ static int lm4857_resume(struct i2c_client *dev)
static void lm4857_shutdown(struct i2c_client *dev) static void lm4857_shutdown(struct i2c_client *dev)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
dev_dbg(&dev->dev, "lm4857_shutdown\n"); dev_dbg(&dev->dev, "lm4857_shutdown\n");
lm4857_regs[LM4857_CTRL] &= 0xf0; lm4857_regs[LM4857_CTRL] &= 0xf0;
...@@ -669,7 +661,7 @@ static int __init neo1973_init(void) ...@@ -669,7 +661,7 @@ static int __init neo1973_init(void)
{ {
int ret; int ret;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (!machine_is_neo1973_gta01()) { if (!machine_is_neo1973_gta01()) {
printk(KERN_INFO printk(KERN_INFO
...@@ -700,7 +692,7 @@ static int __init neo1973_init(void) ...@@ -700,7 +692,7 @@ static int __init neo1973_init(void)
static void __exit neo1973_exit(void) static void __exit neo1973_exit(void)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
i2c_del_driver(&lm4857_i2c_driver); i2c_del_driver(&lm4857_i2c_driver);
platform_device_unregister(neo1973_snd_device); platform_device_unregister(neo1973_snd_device);
......
...@@ -38,13 +38,6 @@ ...@@ -38,13 +38,6 @@
#include "s3c-i2s-v2.h" #include "s3c-i2s-v2.h"
#define S3C2412_I2S_DEBUG_CON 0 #define S3C2412_I2S_DEBUG_CON 0
#define S3C2412_I2S_DEBUG 0
#if S3C2412_I2S_DEBUG
#define DBG(x...) printk(KERN_INFO x)
#else
#define DBG(x...) do { } while (0)
#endif
static inline struct s3c_i2sv2_info *to_info(struct snd_soc_dai *cpu_dai) static inline struct s3c_i2sv2_info *to_info(struct snd_soc_dai *cpu_dai)
{ {
...@@ -87,13 +80,13 @@ void s3c2412_snd_txctrl(struct s3c_i2sv2_info *i2s, int on) ...@@ -87,13 +80,13 @@ void s3c2412_snd_txctrl(struct s3c_i2sv2_info *i2s, int on)
void __iomem *regs = i2s->regs; void __iomem *regs = i2s->regs;
u32 fic, con, mod; u32 fic, con, mod;
DBG("%s(%d)\n", __func__, on); pr_debug("%s(%d)\n", __func__, on);
fic = readl(regs + S3C2412_IISFIC); fic = readl(regs + S3C2412_IISFIC);
con = readl(regs + S3C2412_IISCON); con = readl(regs + S3C2412_IISCON);
mod = readl(regs + S3C2412_IISMOD); mod = readl(regs + S3C2412_IISMOD);
DBG("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic);
if (on) { if (on) {
con |= S3C2412_IISCON_TXDMA_ACTIVE | S3C2412_IISCON_IIS_ACTIVE; con |= S3C2412_IISCON_TXDMA_ACTIVE | S3C2412_IISCON_IIS_ACTIVE;
...@@ -148,7 +141,7 @@ void s3c2412_snd_txctrl(struct s3c_i2sv2_info *i2s, int on) ...@@ -148,7 +141,7 @@ void s3c2412_snd_txctrl(struct s3c_i2sv2_info *i2s, int on)
fic = readl(regs + S3C2412_IISFIC); fic = readl(regs + S3C2412_IISFIC);
dbg_showcon(__func__, con); dbg_showcon(__func__, con);
DBG("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic);
} }
EXPORT_SYMBOL_GPL(s3c2412_snd_txctrl); EXPORT_SYMBOL_GPL(s3c2412_snd_txctrl);
...@@ -157,13 +150,13 @@ void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) ...@@ -157,13 +150,13 @@ void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on)
void __iomem *regs = i2s->regs; void __iomem *regs = i2s->regs;
u32 fic, con, mod; u32 fic, con, mod;
DBG("%s(%d)\n", __func__, on); pr_debug("%s(%d)\n", __func__, on);
fic = readl(regs + S3C2412_IISFIC); fic = readl(regs + S3C2412_IISFIC);
con = readl(regs + S3C2412_IISCON); con = readl(regs + S3C2412_IISCON);
mod = readl(regs + S3C2412_IISMOD); mod = readl(regs + S3C2412_IISMOD);
DBG("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic);
if (on) { if (on) {
con |= S3C2412_IISCON_RXDMA_ACTIVE | S3C2412_IISCON_IIS_ACTIVE; con |= S3C2412_IISCON_RXDMA_ACTIVE | S3C2412_IISCON_IIS_ACTIVE;
...@@ -214,7 +207,7 @@ void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) ...@@ -214,7 +207,7 @@ void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on)
} }
fic = readl(regs + S3C2412_IISFIC); fic = readl(regs + S3C2412_IISFIC);
DBG("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic);
} }
EXPORT_SYMBOL_GPL(s3c2412_snd_rxctrl); EXPORT_SYMBOL_GPL(s3c2412_snd_rxctrl);
...@@ -227,7 +220,7 @@ static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s) ...@@ -227,7 +220,7 @@ static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s)
u32 iiscon; u32 iiscon;
unsigned long timeout = jiffies + msecs_to_jiffies(5); unsigned long timeout = jiffies + msecs_to_jiffies(5);
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
while (1) { while (1) {
iiscon = readl(i2s->regs + S3C2412_IISCON); iiscon = readl(i2s->regs + S3C2412_IISCON);
...@@ -252,10 +245,10 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai, ...@@ -252,10 +245,10 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
struct s3c_i2sv2_info *i2s = to_info(cpu_dai); struct s3c_i2sv2_info *i2s = to_info(cpu_dai);
u32 iismod; u32 iismod;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
iismod = readl(i2s->regs + S3C2412_IISMOD); iismod = readl(i2s->regs + S3C2412_IISMOD);
DBG("hw_params r: IISMOD: %x \n", iismod); pr_debug("hw_params r: IISMOD: %x \n", iismod);
#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
#define IISMOD_MASTER_MASK S3C2412_IISMOD_MASTER_MASK #define IISMOD_MASTER_MASK S3C2412_IISMOD_MASTER_MASK
...@@ -288,7 +281,7 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai, ...@@ -288,7 +281,7 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
iismod |= IISMOD_MASTER; iismod |= IISMOD_MASTER;
break; break;
default: default:
DBG("unknwon master/slave format\n"); pr_debug("unknwon master/slave format\n");
return -EINVAL; return -EINVAL;
} }
...@@ -305,12 +298,12 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai, ...@@ -305,12 +298,12 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
iismod |= S3C2412_IISMOD_SDF_IIS; iismod |= S3C2412_IISMOD_SDF_IIS;
break; break;
default: default:
DBG("Unknown data format\n"); pr_debug("Unknown data format\n");
return -EINVAL; return -EINVAL;
} }
writel(iismod, i2s->regs + S3C2412_IISMOD); writel(iismod, i2s->regs + S3C2412_IISMOD);
DBG("hw_params w: IISMOD: %x \n", iismod); pr_debug("hw_params w: IISMOD: %x \n", iismod);
return 0; return 0;
} }
...@@ -323,7 +316,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -323,7 +316,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
struct s3c_i2sv2_info *i2s = to_info(dai->cpu_dai); struct s3c_i2sv2_info *i2s = to_info(dai->cpu_dai);
u32 iismod; u32 iismod;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
dai->cpu_dai->dma_data = i2s->dma_playback; dai->cpu_dai->dma_data = i2s->dma_playback;
...@@ -332,7 +325,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -332,7 +325,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
/* Working copies of register */ /* Working copies of register */
iismod = readl(i2s->regs + S3C2412_IISMOD); iismod = readl(i2s->regs + S3C2412_IISMOD);
DBG("%s: r: IISMOD: %x\n", __func__, iismod); pr_debug("%s: r: IISMOD: %x\n", __func__, iismod);
switch (params_format(params)) { switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S8: case SNDRV_PCM_FORMAT_S8:
...@@ -344,7 +337,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -344,7 +337,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
} }
writel(iismod, i2s->regs + S3C2412_IISMOD); writel(iismod, i2s->regs + S3C2412_IISMOD);
DBG("%s: w: IISMOD: %x\n", __func__, iismod); pr_debug("%s: w: IISMOD: %x\n", __func__, iismod);
return 0; return 0;
} }
...@@ -357,7 +350,7 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd, ...@@ -357,7 +350,7 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
unsigned long irqs; unsigned long irqs;
int ret = 0; int ret = 0;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
switch (cmd) { switch (cmd) {
case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_START:
...@@ -417,7 +410,7 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, ...@@ -417,7 +410,7 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
struct s3c_i2sv2_info *i2s = to_info(cpu_dai); struct s3c_i2sv2_info *i2s = to_info(cpu_dai);
u32 reg; u32 reg;
DBG("%s(%p, %d, %d)\n", __func__, cpu_dai, div_id, div); pr_debug("%s(%p, %d, %d)\n", __func__, cpu_dai, div_id, div);
switch (div_id) { switch (div_id) {
case S3C_I2SV2_DIV_BCLK: case S3C_I2SV2_DIV_BCLK:
...@@ -425,7 +418,7 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, ...@@ -425,7 +418,7 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
reg &= ~S3C2412_IISMOD_BCLK_MASK; reg &= ~S3C2412_IISMOD_BCLK_MASK;
writel(reg | div, i2s->regs + S3C2412_IISMOD); writel(reg | div, i2s->regs + S3C2412_IISMOD);
DBG("%s: MOD=%08x\n", __func__, readl(i2s->regs + S3C2412_IISMOD)); pr_debug("%s: MOD=%08x\n", __func__, readl(i2s->regs + S3C2412_IISMOD));
break; break;
case S3C_I2SV2_DIV_RCLK: case S3C_I2SV2_DIV_RCLK:
...@@ -457,7 +450,7 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, ...@@ -457,7 +450,7 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
reg = readl(i2s->regs + S3C2412_IISMOD); reg = readl(i2s->regs + S3C2412_IISMOD);
reg &= ~S3C2412_IISMOD_RCLK_MASK; reg &= ~S3C2412_IISMOD_RCLK_MASK;
writel(reg | div, i2s->regs + S3C2412_IISMOD); writel(reg | div, i2s->regs + S3C2412_IISMOD);
DBG("%s: MOD=%08x\n", __func__, readl(i2s->regs + S3C2412_IISMOD)); pr_debug("%s: MOD=%08x\n", __func__, readl(i2s->regs + S3C2412_IISMOD));
break; break;
case S3C_I2SV2_DIV_PRESCALER: case S3C_I2SV2_DIV_PRESCALER:
...@@ -467,7 +460,7 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, ...@@ -467,7 +460,7 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
} else { } else {
writel(0x0, i2s->regs + S3C2412_IISPSR); writel(0x0, i2s->regs + S3C2412_IISPSR);
} }
DBG("%s: PSR=%08x\n", __func__, readl(i2s->regs + S3C2412_IISPSR)); pr_debug("%s: PSR=%08x\n", __func__, readl(i2s->regs + S3C2412_IISPSR));
break; break;
default: default:
...@@ -560,7 +553,7 @@ int s3c_i2sv2_probe(struct platform_device *pdev, ...@@ -560,7 +553,7 @@ int s3c_i2sv2_probe(struct platform_device *pdev,
i2s->iis_pclk = clk_get(dev, "iis"); i2s->iis_pclk = clk_get(dev, "iis");
if (i2s->iis_pclk == NULL) { if (i2s->iis_pclk == NULL) {
DBG("failed to get iis_clock\n"); pr_debug("failed to get iis_clock\n");
iounmap(i2s->regs); iounmap(i2s->regs);
return -ENOENT; return -ENOENT;
} }
......
...@@ -42,12 +42,6 @@ ...@@ -42,12 +42,6 @@
#define S3C2412_I2S_DEBUG 0 #define S3C2412_I2S_DEBUG 0
#if S3C2412_I2S_DEBUG
#define DBG(x...) printk(KERN_INFO x)
#else
#define DBG(x...) do { } while (0)
#endif
static struct s3c2410_dma_client s3c2412_dma_client_out = { static struct s3c2410_dma_client s3c2412_dma_client_out = {
.name = "I2S PCM Stereo out" .name = "I2S PCM Stereo out"
}; };
...@@ -80,7 +74,7 @@ static int s3c2412_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, ...@@ -80,7 +74,7 @@ static int s3c2412_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
{ {
u32 iismod = readl(s3c2412_i2s.regs + S3C2412_IISMOD); u32 iismod = readl(s3c2412_i2s.regs + S3C2412_IISMOD);
DBG("%s(%p, %d, %u, %d)\n", __func__, cpu_dai, clk_id, pr_debug("%s(%p, %d, %u, %d)\n", __func__, cpu_dai, clk_id,
freq, dir); freq, dir);
switch (clk_id) { switch (clk_id) {
...@@ -115,7 +109,7 @@ static int s3c2412_i2s_probe(struct platform_device *pdev, ...@@ -115,7 +109,7 @@ static int s3c2412_i2s_probe(struct platform_device *pdev,
{ {
int ret; int ret;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
ret = s3c_i2sv2_probe(pdev, dai, &s3c2412_i2s, S3C2410_PA_IIS); ret = s3c_i2sv2_probe(pdev, dai, &s3c2412_i2s, S3C2410_PA_IIS);
if (ret) if (ret)
...@@ -126,7 +120,7 @@ static int s3c2412_i2s_probe(struct platform_device *pdev, ...@@ -126,7 +120,7 @@ static int s3c2412_i2s_probe(struct platform_device *pdev,
s3c2412_i2s.iis_cclk = clk_get(&pdev->dev, "i2sclk"); s3c2412_i2s.iis_cclk = clk_get(&pdev->dev, "i2sclk");
if (s3c2412_i2s.iis_cclk == NULL) { if (s3c2412_i2s.iis_cclk == NULL) {
DBG("failed to get i2sclk clock\n"); pr_debug("failed to get i2sclk clock\n");
iounmap(s3c2412_i2s.regs); iounmap(s3c2412_i2s.regs);
return -ENODEV; return -ENODEV;
} }
......
...@@ -39,13 +39,6 @@ ...@@ -39,13 +39,6 @@
#include "s3c24xx-pcm.h" #include "s3c24xx-pcm.h"
#include "s3c24xx-i2s.h" #include "s3c24xx-i2s.h"
#define S3C24XX_I2S_DEBUG 0
#if S3C24XX_I2S_DEBUG
#define DBG(x...) printk(KERN_DEBUG "s3c24xx-i2s: " x)
#else
#define DBG(x...)
#endif
static struct s3c2410_dma_client s3c24xx_dma_client_out = { static struct s3c2410_dma_client s3c24xx_dma_client_out = {
.name = "I2S PCM Stereo out" .name = "I2S PCM Stereo out"
}; };
...@@ -84,13 +77,13 @@ static void s3c24xx_snd_txctrl(int on) ...@@ -84,13 +77,13 @@ static void s3c24xx_snd_txctrl(int on)
u32 iiscon; u32 iiscon;
u32 iismod; u32 iismod;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON);
iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
DBG("r: IISCON: %lx IISMOD: %lx IISFCON: %lx\n", iiscon, iismod, iisfcon); pr_debug("r: IISCON: %lx IISMOD: %lx IISFCON: %lx\n", iiscon, iismod, iisfcon);
if (on) { if (on) {
iisfcon |= S3C2410_IISFCON_TXDMA | S3C2410_IISFCON_TXENABLE; iisfcon |= S3C2410_IISFCON_TXDMA | S3C2410_IISFCON_TXENABLE;
...@@ -120,7 +113,7 @@ static void s3c24xx_snd_txctrl(int on) ...@@ -120,7 +113,7 @@ static void s3c24xx_snd_txctrl(int on)
writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
} }
DBG("w: IISCON: %lx IISMOD: %lx IISFCON: %lx\n", iiscon, iismod, iisfcon); pr_debug("w: IISCON: %lx IISMOD: %lx IISFCON: %lx\n", iiscon, iismod, iisfcon);
} }
static void s3c24xx_snd_rxctrl(int on) static void s3c24xx_snd_rxctrl(int on)
...@@ -129,13 +122,13 @@ static void s3c24xx_snd_rxctrl(int on) ...@@ -129,13 +122,13 @@ static void s3c24xx_snd_rxctrl(int on)
u32 iiscon; u32 iiscon;
u32 iismod; u32 iismod;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON);
iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
DBG("r: IISCON: %lx IISMOD: %lx IISFCON: %lx\n", iiscon, iismod, iisfcon); pr_debug("r: IISCON: %lx IISMOD: %lx IISFCON: %lx\n", iiscon, iismod, iisfcon);
if (on) { if (on) {
iisfcon |= S3C2410_IISFCON_RXDMA | S3C2410_IISFCON_RXENABLE; iisfcon |= S3C2410_IISFCON_RXDMA | S3C2410_IISFCON_RXENABLE;
...@@ -165,7 +158,7 @@ static void s3c24xx_snd_rxctrl(int on) ...@@ -165,7 +158,7 @@ static void s3c24xx_snd_rxctrl(int on)
writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
} }
DBG("w: IISCON: %lx IISMOD: %lx IISFCON: %lx\n", iiscon, iismod, iisfcon); pr_debug("w: IISCON: %lx IISMOD: %lx IISFCON: %lx\n", iiscon, iismod, iisfcon);
} }
/* /*
...@@ -177,7 +170,7 @@ static int s3c24xx_snd_lrsync(void) ...@@ -177,7 +170,7 @@ static int s3c24xx_snd_lrsync(void)
u32 iiscon; u32 iiscon;
int timeout = 50; /* 5ms */ int timeout = 50; /* 5ms */
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
while (1) { while (1) {
iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
...@@ -197,7 +190,7 @@ static int s3c24xx_snd_lrsync(void) ...@@ -197,7 +190,7 @@ static int s3c24xx_snd_lrsync(void)
*/ */
static inline int s3c24xx_snd_is_clkmaster(void) static inline int s3c24xx_snd_is_clkmaster(void)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
return (readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & S3C2410_IISMOD_SLAVE) ? 0:1; return (readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & S3C2410_IISMOD_SLAVE) ? 0:1;
} }
...@@ -210,10 +203,10 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai, ...@@ -210,10 +203,10 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
{ {
u32 iismod; u32 iismod;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
DBG("hw_params r: IISMOD: %lx \n", iismod); pr_debug("hw_params r: IISMOD: %lx \n", iismod);
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBM_CFM:
...@@ -238,7 +231,7 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai, ...@@ -238,7 +231,7 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
} }
writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
DBG("hw_params w: IISMOD: %lx \n", iismod); pr_debug("hw_params w: IISMOD: %lx \n", iismod);
return 0; return 0;
} }
...@@ -249,7 +242,7 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -249,7 +242,7 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
u32 iismod; u32 iismod;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
rtd->dai->cpu_dai->dma_data = &s3c24xx_i2s_pcm_stereo_out; rtd->dai->cpu_dai->dma_data = &s3c24xx_i2s_pcm_stereo_out;
...@@ -258,7 +251,7 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -258,7 +251,7 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
/* Working copies of register */ /* Working copies of register */
iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
DBG("hw_params r: IISMOD: %lx\n", iismod); pr_debug("hw_params r: IISMOD: %lx\n", iismod);
switch (params_format(params)) { switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S8: case SNDRV_PCM_FORMAT_S8:
...@@ -276,7 +269,7 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -276,7 +269,7 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
} }
writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
DBG("hw_params w: IISMOD: %lx\n", iismod); pr_debug("hw_params w: IISMOD: %lx\n", iismod);
return 0; return 0;
} }
...@@ -285,7 +278,7 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd, ...@@ -285,7 +278,7 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
{ {
int ret = 0; int ret = 0;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
switch (cmd) { switch (cmd) {
case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_START:
...@@ -327,7 +320,7 @@ static int s3c24xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, ...@@ -327,7 +320,7 @@ static int s3c24xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
{ {
u32 iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); u32 iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
iismod &= ~S3C2440_IISMOD_MPLL; iismod &= ~S3C2440_IISMOD_MPLL;
...@@ -353,7 +346,7 @@ static int s3c24xx_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, ...@@ -353,7 +346,7 @@ static int s3c24xx_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
{ {
u32 reg; u32 reg;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
switch (div_id) { switch (div_id) {
case S3C24XX_DIV_BCLK: case S3C24XX_DIV_BCLK:
...@@ -389,7 +382,7 @@ EXPORT_SYMBOL_GPL(s3c24xx_i2s_get_clockrate); ...@@ -389,7 +382,7 @@ EXPORT_SYMBOL_GPL(s3c24xx_i2s_get_clockrate);
static int s3c24xx_i2s_probe(struct platform_device *pdev, static int s3c24xx_i2s_probe(struct platform_device *pdev,
struct snd_soc_dai *dai) struct snd_soc_dai *dai)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
s3c24xx_i2s.regs = ioremap(S3C2410_PA_IIS, 0x100); s3c24xx_i2s.regs = ioremap(S3C2410_PA_IIS, 0x100);
if (s3c24xx_i2s.regs == NULL) if (s3c24xx_i2s.regs == NULL)
...@@ -397,7 +390,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev, ...@@ -397,7 +390,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev,
s3c24xx_i2s.iis_clk = clk_get(&pdev->dev, "iis"); s3c24xx_i2s.iis_clk = clk_get(&pdev->dev, "iis");
if (s3c24xx_i2s.iis_clk == NULL) { if (s3c24xx_i2s.iis_clk == NULL) {
DBG("failed to get iis_clock\n"); pr_debug("failed to get iis_clock\n");
iounmap(s3c24xx_i2s.regs); iounmap(s3c24xx_i2s.regs);
return -ENODEV; return -ENODEV;
} }
...@@ -421,7 +414,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev, ...@@ -421,7 +414,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev,
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai) static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
...@@ -435,7 +428,7 @@ static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai) ...@@ -435,7 +428,7 @@ static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)
static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai) static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai)
{ {
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
clk_enable(s3c24xx_i2s.iis_clk); clk_enable(s3c24xx_i2s.iis_clk);
writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON); writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON);
......
...@@ -33,13 +33,6 @@ ...@@ -33,13 +33,6 @@
#include "s3c24xx-pcm.h" #include "s3c24xx-pcm.h"
#define S3C24XX_PCM_DEBUG 0
#if S3C24XX_PCM_DEBUG
#define DBG(x...) printk(KERN_DEBUG "s3c24xx-pcm: " x)
#else
#define DBG(x...)
#endif
static const struct snd_pcm_hardware s3c24xx_pcm_hardware = { static const struct snd_pcm_hardware s3c24xx_pcm_hardware = {
.info = SNDRV_PCM_INFO_INTERLEAVED | .info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_BLOCK_TRANSFER |
...@@ -84,16 +77,16 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream) ...@@ -84,16 +77,16 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream)
dma_addr_t pos = prtd->dma_pos; dma_addr_t pos = prtd->dma_pos;
int ret; int ret;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
while (prtd->dma_loaded < prtd->dma_limit) { while (prtd->dma_loaded < prtd->dma_limit) {
unsigned long len = prtd->dma_period; unsigned long len = prtd->dma_period;
DBG("dma_loaded: %d\n", prtd->dma_loaded); pr_debug("dma_loaded: %d\n", prtd->dma_loaded);
if ((pos + len) > prtd->dma_end) { if ((pos + len) > prtd->dma_end) {
len = prtd->dma_end - pos; len = prtd->dma_end - pos;
DBG(KERN_DEBUG "%s: corrected dma len %ld\n", pr_debug(KERN_DEBUG "%s: corrected dma len %ld\n",
__func__, len); __func__, len);
} }
...@@ -119,7 +112,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel, ...@@ -119,7 +112,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel,
struct snd_pcm_substream *substream = dev_id; struct snd_pcm_substream *substream = dev_id;
struct s3c24xx_runtime_data *prtd; struct s3c24xx_runtime_data *prtd;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (result == S3C2410_RES_ABORT || result == S3C2410_RES_ERR) if (result == S3C2410_RES_ABORT || result == S3C2410_RES_ERR)
return; return;
...@@ -148,7 +141,7 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -148,7 +141,7 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream,
unsigned long totbytes = params_buffer_bytes(params); unsigned long totbytes = params_buffer_bytes(params);
int ret = 0; int ret = 0;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
/* return if this is a bufferless transfer e.g. /* return if this is a bufferless transfer e.g.
* codec <--> BT codec or GSM modem -- lg FIXME */ * codec <--> BT codec or GSM modem -- lg FIXME */
...@@ -161,14 +154,14 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -161,14 +154,14 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream,
/* prepare DMA */ /* prepare DMA */
prtd->params = dma; prtd->params = dma;
DBG("params %p, client %p, channel %d\n", prtd->params, pr_debug("params %p, client %p, channel %d\n", prtd->params,
prtd->params->client, prtd->params->channel); prtd->params->client, prtd->params->channel);
ret = s3c2410_dma_request(prtd->params->channel, ret = s3c2410_dma_request(prtd->params->channel,
prtd->params->client, NULL); prtd->params->client, NULL);
if (ret < 0) { if (ret < 0) {
DBG(KERN_ERR "failed to get dma channel\n"); pr_debug(KERN_ERR "failed to get dma channel\n");
return ret; return ret;
} }
} }
...@@ -196,7 +189,7 @@ static int s3c24xx_pcm_hw_free(struct snd_pcm_substream *substream) ...@@ -196,7 +189,7 @@ static int s3c24xx_pcm_hw_free(struct snd_pcm_substream *substream)
{ {
struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
/* TODO - do we need to ensure DMA flushed */ /* TODO - do we need to ensure DMA flushed */
snd_pcm_set_runtime_buffer(substream, NULL); snd_pcm_set_runtime_buffer(substream, NULL);
...@@ -214,7 +207,7 @@ static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream) ...@@ -214,7 +207,7 @@ static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream)
struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
int ret = 0; int ret = 0;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
/* return if this is a bufferless transfer e.g. /* return if this is a bufferless transfer e.g.
* codec <--> BT codec or GSM modem -- lg FIXME */ * codec <--> BT codec or GSM modem -- lg FIXME */
...@@ -259,7 +252,7 @@ static int s3c24xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) ...@@ -259,7 +252,7 @@ static int s3c24xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
int ret = 0; int ret = 0;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
spin_lock(&prtd->lock); spin_lock(&prtd->lock);
...@@ -297,7 +290,7 @@ s3c24xx_pcm_pointer(struct snd_pcm_substream *substream) ...@@ -297,7 +290,7 @@ s3c24xx_pcm_pointer(struct snd_pcm_substream *substream)
unsigned long res; unsigned long res;
dma_addr_t src, dst; dma_addr_t src, dst;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
spin_lock(&prtd->lock); spin_lock(&prtd->lock);
s3c2410_dma_getposition(prtd->params->channel, &src, &dst); s3c2410_dma_getposition(prtd->params->channel, &src, &dst);
...@@ -309,7 +302,7 @@ s3c24xx_pcm_pointer(struct snd_pcm_substream *substream) ...@@ -309,7 +302,7 @@ s3c24xx_pcm_pointer(struct snd_pcm_substream *substream)
spin_unlock(&prtd->lock); spin_unlock(&prtd->lock);
DBG("Pointer %x %x\n", src, dst); pr_debug("Pointer %x %x\n", src, dst);
/* we seem to be getting the odd error from the pcm library due /* we seem to be getting the odd error from the pcm library due
* to out-of-bounds pointers. this is maybe due to the dma engine * to out-of-bounds pointers. this is maybe due to the dma engine
...@@ -330,7 +323,7 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream) ...@@ -330,7 +323,7 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
struct s3c24xx_runtime_data *prtd; struct s3c24xx_runtime_data *prtd;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
snd_soc_set_runtime_hwparams(substream, &s3c24xx_pcm_hardware); snd_soc_set_runtime_hwparams(substream, &s3c24xx_pcm_hardware);
...@@ -349,10 +342,10 @@ static int s3c24xx_pcm_close(struct snd_pcm_substream *substream) ...@@ -349,10 +342,10 @@ static int s3c24xx_pcm_close(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
struct s3c24xx_runtime_data *prtd = runtime->private_data; struct s3c24xx_runtime_data *prtd = runtime->private_data;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (!prtd) if (!prtd)
DBG("s3c24xx_pcm_close called with prtd == NULL\n"); pr_debug("s3c24xx_pcm_close called with prtd == NULL\n");
kfree(prtd); kfree(prtd);
...@@ -364,7 +357,7 @@ static int s3c24xx_pcm_mmap(struct snd_pcm_substream *substream, ...@@ -364,7 +357,7 @@ static int s3c24xx_pcm_mmap(struct snd_pcm_substream *substream,
{ {
struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
return dma_mmap_writecombine(substream->pcm->card->dev, vma, return dma_mmap_writecombine(substream->pcm->card->dev, vma,
runtime->dma_area, runtime->dma_area,
...@@ -390,7 +383,7 @@ static int s3c24xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) ...@@ -390,7 +383,7 @@ static int s3c24xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
struct snd_dma_buffer *buf = &substream->dma_buffer; struct snd_dma_buffer *buf = &substream->dma_buffer;
size_t size = s3c24xx_pcm_hardware.buffer_bytes_max; size_t size = s3c24xx_pcm_hardware.buffer_bytes_max;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
buf->dev.type = SNDRV_DMA_TYPE_DEV; buf->dev.type = SNDRV_DMA_TYPE_DEV;
buf->dev.dev = pcm->card->dev; buf->dev.dev = pcm->card->dev;
...@@ -409,7 +402,7 @@ static void s3c24xx_pcm_free_dma_buffers(struct snd_pcm *pcm) ...@@ -409,7 +402,7 @@ static void s3c24xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
struct snd_dma_buffer *buf; struct snd_dma_buffer *buf;
int stream; int stream;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
for (stream = 0; stream < 2; stream++) { for (stream = 0; stream < 2; stream++) {
substream = pcm->streams[stream].substream; substream = pcm->streams[stream].substream;
...@@ -433,7 +426,7 @@ static int s3c24xx_pcm_new(struct snd_card *card, ...@@ -433,7 +426,7 @@ static int s3c24xx_pcm_new(struct snd_card *card,
{ {
int ret = 0; int ret = 0;
DBG("Entered %s\n", __func__); pr_debug("Entered %s\n", __func__);
if (!card->dev->dma_mask) if (!card->dev->dma_mask)
card->dev->dma_mask = &s3c24xx_pcm_dmamask; card->dev->dma_mask = &s3c24xx_pcm_dmamask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment