aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/neo1973_wm8753.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/s3c24xx/neo1973_wm8753.c')
-rw-r--r--sound/soc/s3c24xx/neo1973_wm8753.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index 962cc20b1af5..e2339b9f0b3b 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -33,7 +33,7 @@
33#include <asm/arch/regs-gpio.h> 33#include <asm/arch/regs-gpio.h>
34#include <asm/hardware.h> 34#include <asm/hardware.h>
35#include <asm/arch/audio.h> 35#include <asm/arch/audio.h>
36#include <asm/io.h> 36#include <linux/io.h>
37#include <asm/arch/spi-gpio.h> 37#include <asm/arch/spi-gpio.h>
38 38
39#include <asm/plat-s3c24xx/regs-iis.h> 39#include <asm/plat-s3c24xx/regs-iis.h>
@@ -122,7 +122,7 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream,
122 122
123 /* set MCLK division for sample rate */ 123 /* set MCLK division for sample rate */
124 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, S3C24XX_DIV_MCLK, 124 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, S3C24XX_DIV_MCLK,
125 S3C2410_IISMOD_32FS ); 125 S3C2410_IISMOD_32FS);
126 if (ret < 0) 126 if (ret < 0)
127 return ret; 127 return ret;
128 128
@@ -133,7 +133,7 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream,
133 133
134 /* set prescaler division for sample rate */ 134 /* set prescaler division for sample rate */
135 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER, 135 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER,
136 S3C24XX_PRESCALE(4,4)); 136 S3C24XX_PRESCALE(4, 4));
137 if (ret < 0) 137 if (ret < 0)
138 return ret; 138 return ret;
139 139
@@ -222,7 +222,7 @@ static struct snd_soc_ops neo1973_voice_ops = {
222 .hw_free = neo1973_voice_hw_free, 222 .hw_free = neo1973_voice_hw_free,
223}; 223};
224 224
225static int neo1973_scenario = 0; 225static int neo1973_scenario;
226 226
227static int neo1973_get_scenario(struct snd_kcontrol *kcontrol, 227static int neo1973_get_scenario(struct snd_kcontrol *kcontrol,
228 struct snd_ctl_elem_value *ucontrol) 228 struct snd_ctl_elem_value *ucontrol)
@@ -233,7 +233,7 @@ static int neo1973_get_scenario(struct snd_kcontrol *kcontrol,
233 233
234static int set_scenario_endpoints(struct snd_soc_codec *codec, int scenario) 234static int set_scenario_endpoints(struct snd_soc_codec *codec, int scenario)
235{ 235{
236 switch(neo1973_scenario) { 236 switch (neo1973_scenario) {
237 case NEO_AUDIO_OFF: 237 case NEO_AUDIO_OFF:
238 snd_soc_dapm_set_endpoint(codec, "Audio Out", 0); 238 snd_soc_dapm_set_endpoint(codec, "Audio Out", 0);
239 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0); 239 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0);
@@ -334,7 +334,7 @@ static void lm4857_write_regs(void)
334static int lm4857_get_reg(struct snd_kcontrol *kcontrol, 334static int lm4857_get_reg(struct snd_kcontrol *kcontrol,
335 struct snd_ctl_elem_value *ucontrol) 335 struct snd_ctl_elem_value *ucontrol)
336{ 336{
337 int reg=kcontrol->private_value & 0xFF; 337 int reg = kcontrol->private_value & 0xFF;
338 int shift = (kcontrol->private_value >> 8) & 0x0F; 338 int shift = (kcontrol->private_value >> 8) & 0x0F;
339 int mask = (kcontrol->private_value >> 16) & 0xFF; 339 int mask = (kcontrol->private_value >> 16) & 0xFF;
340 340
@@ -349,11 +349,11 @@ static int lm4857_set_reg(struct snd_kcontrol *kcontrol,
349 int shift = (kcontrol->private_value >> 8) & 0x0F; 349 int shift = (kcontrol->private_value >> 8) & 0x0F;
350 int mask = (kcontrol->private_value >> 16) & 0xFF; 350 int mask = (kcontrol->private_value >> 16) & 0xFF;
351 351
352 if (((lm4857_regs[reg] >> shift ) & mask) == 352 if (((lm4857_regs[reg] >> shift) & mask) ==
353 ucontrol->value.integer.value[0]) 353 ucontrol->value.integer.value[0])
354 return 0; 354 return 0;
355 355
356 lm4857_regs[reg] &= ~ (mask << shift); 356 lm4857_regs[reg] &= ~(mask << shift);
357 lm4857_regs[reg] |= ucontrol->value.integer.value[0] << shift; 357 lm4857_regs[reg] |= ucontrol->value.integer.value[0] << shift;
358 lm4857_write_regs(); 358 lm4857_write_regs();
359 return 1; 359 return 1;
@@ -398,7 +398,7 @@ static const struct snd_soc_dapm_widget wm8753_dapm_widgets[] = {
398 398
399 399
400/* example machine audio_mapnections */ 400/* example machine audio_mapnections */
401static const char* audio_map[][3] = { 401static const char *audio_map[][3] = {
402 402
403 /* Connections to the lm4857 amp */ 403 /* Connections to the lm4857 amp */
404 {"Audio Out", NULL, "LOUT1"}, 404 {"Audio Out", NULL, "LOUT1"},
@@ -450,7 +450,7 @@ static const char *neo_scenarios[] = {
450}; 450};
451 451
452static const struct soc_enum neo_scenario_enum[] = { 452static const struct soc_enum neo_scenario_enum[] = {
453 SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(neo_scenarios),neo_scenarios), 453 SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(neo_scenarios), neo_scenarios),
454}; 454};
455 455
456static const struct snd_kcontrol_new wm8753_neo1973_controls[] = { 456static const struct snd_kcontrol_new wm8753_neo1973_controls[] = {
@@ -521,8 +521,8 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
521/* 521/*
522 * BT Codec DAI 522 * BT Codec DAI
523 */ 523 */
524static struct snd_soc_cpu_dai bt_dai = 524static struct snd_soc_cpu_dai bt_dai = {
525{ .name = "Bluetooth", 525 .name = "Bluetooth",
526 .id = 0, 526 .id = 0,
527 .type = SND_SOC_DAI_PCM, 527 .type = SND_SOC_DAI_PCM,
528 .playback = { 528 .playback = {