Commit cc67b7f7 authored by Vedran Miletic's avatar Vedran Miletic Committed by Jaroslav Kysela

ALSA: ice1712/ice1724: Coding style fixes part 1 (more coming up)

Inspired by Alexander Beregalov's patches for wtm and aureon.c,
I decided to run checkpatch on some more files. After some work
checkpatch.pl-0.23 --no-tree --file --strict <file> reports
0 errors, 0 warnings, 0 checks, n lines checked for:
phase.c
phase.h
juli.c (1 check about unused code, maybe we should comment it)
juli.h (no changes necessary)
In other files I have just fixed // comments and long lines along the
way (but not all of them), more coming up.
Signed-off-by: default avatarVedran Miletic <rivanvx@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 07f455f7
...@@ -400,7 +400,7 @@ static void delta_setup_spdif(struct snd_ice1712 *ice, int rate) ...@@ -400,7 +400,7 @@ static void delta_setup_spdif(struct snd_ice1712 *ice, int rate)
static int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kcontrol, static int snd_ice1712_delta1010lt_wordclock_status_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
char reg = 0x10; // cs8427 receiver error register char reg = 0x10; /* CS8427 receiver error register */
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
if (snd_i2c_sendbytes(ice->cs8427, &reg, 1) != 1) if (snd_i2c_sendbytes(ice->cs8427, &reg, 1) != 1)
......
...@@ -34,9 +34,10 @@ ...@@ -34,9 +34,10 @@
#include "ice1712.h" #include "ice1712.h"
#include "envy24ht.h" #include "envy24ht.h"
#include "juli.h" #include "juli.h"
struct juli_spec { struct juli_spec {
struct ak4114 *ak4114; struct ak4114 *ak4114;
unsigned int analog: 1; unsigned int analog:1;
}; };
/* /*
...@@ -160,14 +161,17 @@ static int get_gpio_val(int rate) ...@@ -160,14 +161,17 @@ static int get_gpio_val(int rate)
return 0; return 0;
} }
static void juli_ak4114_write(void *private_data, unsigned char reg, unsigned char val) static void juli_ak4114_write(void *private_data, unsigned char reg,
unsigned char val)
{ {
snd_vt1724_write_i2c((struct snd_ice1712 *)private_data, AK4114_ADDR, reg, val); snd_vt1724_write_i2c((struct snd_ice1712 *)private_data, AK4114_ADDR,
reg, val);
} }
static unsigned char juli_ak4114_read(void *private_data, unsigned char reg) static unsigned char juli_ak4114_read(void *private_data, unsigned char reg)
{ {
return snd_vt1724_read_i2c((struct snd_ice1712 *)private_data, AK4114_ADDR, reg); return snd_vt1724_read_i2c((struct snd_ice1712 *)private_data,
AK4114_ADDR, reg);
} }
/* /*
...@@ -572,10 +576,12 @@ static void juli_ak4114_change(struct ak4114 *ak4114, unsigned char c0, ...@@ -572,10 +576,12 @@ static void juli_ak4114_change(struct ak4114 *ak4114, unsigned char c0,
static int __devinit juli_init(struct snd_ice1712 *ice) static int __devinit juli_init(struct snd_ice1712 *ice)
{ {
static const unsigned char ak4114_init_vals[] = { static const unsigned char ak4114_init_vals[] = {
/* AK4117_REG_PWRDN */ AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1, /* AK4117_REG_PWRDN */ AK4114_RST | AK4114_PWN |
AK4114_OCKS0 | AK4114_OCKS1,
/* AK4114_REQ_FORMAT */ AK4114_DIF_I24I2S, /* AK4114_REQ_FORMAT */ AK4114_DIF_I24I2S,
/* AK4114_REG_IO0 */ AK4114_TX1E, /* AK4114_REG_IO0 */ AK4114_TX1E,
/* AK4114_REG_IO1 */ AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(1), /* AK4114_REG_IO1 */ AK4114_EFH_1024 | AK4114_DIT |
AK4114_IPS(1),
/* AK4114_REG_INT0_MASK */ 0, /* AK4114_REG_INT0_MASK */ 0,
/* AK4114_REG_INT1_MASK */ 0 /* AK4114_REG_INT1_MASK */ 0
}; };
...@@ -605,9 +611,11 @@ static int __devinit juli_init(struct snd_ice1712 *ice) ...@@ -605,9 +611,11 @@ static int __devinit juli_init(struct snd_ice1712 *ice)
spec->ak4114->check_flags = 0; spec->ak4114->check_flags = 0;
#if 0 #if 0
/* it seems that the analog doughter board detection does not work /*
reliably, so force the analog flag; it should be very rare * it seems that the analog doughter board detection does not work reliably, so
to use Juli@ without the analog doughter board */ * force the analog flag; it should be very rare (if ever) to come at Juli@
* used without the analog daughter board
*/
spec->analog = (ice->gpio.get_data(ice) & GPIO_ANALOG_PRESENT) ? 0 : 1; spec->analog = (ice->gpio.get_data(ice) & GPIO_ANALOG_PRESENT) ? 0 : 1;
#else #else
spec->analog = 1; spec->analog = 1;
...@@ -618,11 +626,13 @@ static int __devinit juli_init(struct snd_ice1712 *ice) ...@@ -618,11 +626,13 @@ static int __devinit juli_init(struct snd_ice1712 *ice)
ice->num_total_dacs = 2; ice->num_total_dacs = 2;
ice->num_total_adcs = 2; ice->num_total_adcs = 2;
ak = ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
if (! ak) ak = ice->akm;
if (!ak)
return -ENOMEM; return -ENOMEM;
ice->akm_codecs = 1; ice->akm_codecs = 1;
if ((err = snd_ice1712_akm4xxx_init(ak, &akm_juli_dac, NULL, ice)) < 0) err = snd_ice1712_akm4xxx_init(ak, &akm_juli_dac, NULL, ice);
if (err < 0)
return err; return err;
} }
......
This diff is collapsed.
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
/* WM8776 registers */ /* WM8776 registers */
#define WM_HP_ATTEN_L 0x00 /* headphone left attenuation */ #define WM_HP_ATTEN_L 0x00 /* headphone left attenuation */
#define WM_HP_ATTEN_R 0x01 /* headphone left attenuation */ #define WM_HP_ATTEN_R 0x01 /* headphone left attenuation */
#define WM_HP_MASTER 0x02 /* headphone master (both channels), override LLR */ #define WM_HP_MASTER 0x02 /* headphone master (both channels) */
/* override LLR */
#define WM_DAC_ATTEN_L 0x03 /* digital left attenuation */ #define WM_DAC_ATTEN_L 0x03 /* digital left attenuation */
#define WM_DAC_ATTEN_R 0x04 #define WM_DAC_ATTEN_R 0x04
#define WM_DAC_MASTER 0x05 #define WM_DAC_MASTER 0x05
...@@ -740,7 +741,7 @@ static int __devinit pontis_init(struct snd_ice1712 *ice) ...@@ -740,7 +741,7 @@ static int __devinit pontis_init(struct snd_ice1712 *ice)
WM_DAC_ATTEN_L, 0x0100, /* DAC 0dB */ WM_DAC_ATTEN_L, 0x0100, /* DAC 0dB */
WM_DAC_ATTEN_R, 0x0000, /* DAC 0dB */ WM_DAC_ATTEN_R, 0x0000, /* DAC 0dB */
WM_DAC_ATTEN_R, 0x0100, /* DAC 0dB */ WM_DAC_ATTEN_R, 0x0100, /* DAC 0dB */
// WM_DAC_MASTER, 0x0100, /* DAC master muted */ /* WM_DAC_MASTER, 0x0100, */ /* DAC master muted */
WM_PHASE_SWAP, 0x0000, /* phase normal */ WM_PHASE_SWAP, 0x0000, /* phase normal */
WM_DAC_CTRL2, 0x0000, /* no deemphasis, no ZFLG */ WM_DAC_CTRL2, 0x0000, /* no deemphasis, no ZFLG */
WM_ADC_ATTEN_L, 0x0000, /* ADC muted */ WM_ADC_ATTEN_L, 0x0000, /* ADC muted */
......
/* /*
* ALSA driver for ICEnsemble ICE1712 (Envy24) * ALSA driver for ICEnsemble ICE1712 (Envy24)
* *
* Lowlevel functions for M-Audio Revolution 7.1 * Lowlevel functions for M-Audio Audiophile 192, Revolution 7.1 and 5.1
* *
* Copyright (c) 2003 Takashi Iwai <tiwai@suse.de> * Copyright (c) 2003 Takashi Iwai <tiwai@suse.de>
* *
...@@ -48,7 +48,7 @@ static void revo_i2s_mclk_changed(struct snd_ice1712 *ice) ...@@ -48,7 +48,7 @@ static void revo_i2s_mclk_changed(struct snd_ice1712 *ice)
} }
/* /*
* change the rate of envy24HT, AK4355 and AK4381 * change the rate of Envy24HT, AK4355 and AK4381
*/ */
static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
{ {
...@@ -83,8 +83,8 @@ static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) ...@@ -83,8 +83,8 @@ static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
tmp = snd_akm4xxx_get(ak, 0, reg); tmp = snd_akm4xxx_get(ak, 0, reg);
tmp &= ~(0x03 << shift); tmp &= ~(0x03 << shift);
tmp |= dfs << shift; tmp |= dfs << shift;
// snd_akm4xxx_write(ak, 0, reg, tmp); /* snd_akm4xxx_write(ak, 0, reg, tmp); */
snd_akm4xxx_set(ak, 0, reg, tmp); /* the value is written in reset(0) */ snd_akm4xxx_set(ak, 0, reg, tmp); /* value is written in reset(0) */
snd_akm4xxx_reset(ak, 0); snd_akm4xxx_reset(ak, 0);
} }
......
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