sound/pci: coding style fixes: hda
PATCH 10/24 sound/pci: coding style fixes: hda
- <asm/io.h> -> <linux/io.h>
- remove trailing whitespaces
- convert comments
Only compile tested.
Signed-off-by Alexander Beregalov <[email protected]>
---
sound/pci/hda/hda_codec.c | 12 ++-- sound/pci/hda/hda_codec.h | 10 ++-- sound/pci/hda/hda_generic.c | 58 +++++++++--------- sound/pci/hda/hda_hwdep.c | 2 +- sound/pci/hda/hda_intel.c | 18 +++--- sound/pci/hda/hda_proc.c | 8 +- sound/pci/hda/patch_analog.c | 22 ++++---- sound/pci/hda/patch_cmedia.c | 2 +- sound/pci/hda/patch_conexant.c | 22 ++++---- sound/pci/hda/patch_realtek.c | 6 +- sound/pci/hda/patch_si3054.c | 8 +- sound/pci/hda/patch_sigmatel.c | 130 ++++++++++++++++++++-------------------- sound/pci/hda/patch_via.c | 34 +++++----- 13 files changed, 166 insertions(+), 166 deletions(-)
sound/pci/hda/hda_codec.c +6 -6
@@ -1123,7 +1123,7 @@ int snd_hda_add_vmaster(struct hda_codec *codec, char *name, err =snd_ctl_add (codec->bus->card, kctl);if (err <0 )return err; - +for (s = slaves; *s; s++) {struct snd_kcontrol *sctl;
@@ -2832,7 +2832,7 @@ static void sort_pins_by_sequence(hda_nid_t * pins, short * sequences,int i, j;short seq;hda_nid_t nid; - +for (i =0 ; i < num_pins; i++) {for (j = i +1 ; j < num_pins; j++) {if (sequences[i] > sequences[j]) {
@@ -2860,7 +2860,7 @@ static void sort_pins_by_sequence(hda_nid_t * pins, short * sequences,* is detected, one of speaker of HP pins is assigned as the primary * output, i.e. to line_out_pins[0]. So, line_outs is always positive * if any analog output exists. -* +* * The analog input pins are assigned to input_pins array. * The digital input/output pins are assigned to dig_in_pin and dig_out_pin, * respectively.
@@ -2925,9 +2925,9 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,case AC_JACK_SPEAKER : seq =get_defcfg_sequence (def_conf); assoc =get_defcfg_association (def_conf); -if (! assoc) +if (!assoc)continue ; -if (! assoc_speaker) +if (!assoc_speaker) assoc_speaker = assoc;else if (assoc_speaker != assoc)continue ;
@@ -3013,7 +3013,7 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec, cfg->speaker_outs);sort_pins_by_sequence (cfg->hp_pins, sequences_hp, cfg->hp_outs); - +/* if we have only one mic, make it AUTO_PIN_MIC */ if (!cfg->input_pins[AUTO_PIN_MIC ] && cfg->input_pins[AUTO_PIN_FRONT_MIC ]) {
sound/pci/hda/hda_codec.h +5 -5
@@ -42,7 +42,7 @@ enum {AC_GRP_AUDIO_FUNCTION =0x01 , AC_GRP_MODEM_FUNCTION = 0x02, }; - +/* * widget types */
@@ -306,15 +306,15 @@ enum {#define AC_KNBCAP_DELTA (1<<7)/* HDMI LPCM capabilities */ -#define AC_LPCMCAP_48K_CP_CHNS (0x0f<<0)/* max channels w/ CP-on */ +#define AC_LPCMCAP_48K_CP_CHNS (0x0f<<0)/* max channels w/ CP-on */ #define AC_LPCMCAP_48K_NO_CHNS (0x0f<<4)/* max channels w/o CP-on */ #define AC_LPCMCAP_48K_20BIT (1<<8)/* 20b bitrate supported */ #define AC_LPCMCAP_48K_24BIT (1<<9)/* 24b bitrate supported */ -#define AC_LPCMCAP_96K_CP_CHNS (0x0f<<10)/* max channels w/ CP-on */ +#define AC_LPCMCAP_96K_CP_CHNS (0x0f<<10)/* max channels w/ CP-on */ #define AC_LPCMCAP_96K_NO_CHNS (0x0f<<14)/* max channels w/o CP-on */ #define AC_LPCMCAP_96K_20BIT (1<<18)/* 20b bitrate supported */ #define AC_LPCMCAP_96K_24BIT (1<<19)/* 24b bitrate supported */ -#define AC_LPCMCAP_192K_CP_CHNS (0x0f<<20)/* max channels w/ CP-on */ +#define AC_LPCMCAP_192K_CP_CHNS (0x0f<<20)/* max channels w/ CP-on */ #define AC_LPCMCAP_192K_NO_CHNS (0x0f<<24)/* max channels w/o CP-on */ #define AC_LPCMCAP_192K_20BIT (1<<28)/* 20b bitrate supported */ #define AC_LPCMCAP_192K_24BIT (1<<29)/* 24b bitrate supported */
@@ -603,7 +603,7 @@ struct hda_codec_preset {const char *name;int (*patch)(struct hda_codec *codec); }; - +/* ops set by the preset patch */ struct hda_codec_ops {int (*build_controls)(struct hda_codec *codec);
sound/pci/hda/hda_generic.c +29 -29
212 lines not on this page · raw message
sound/pci/hda/hda_hwdep.c +1 -1
@@ -49,7 +49,7 @@ static int get_wcap_ioctl(struct hda_codec *codec, struct hda_verb_ioctl __user *arg) {u32 verb, res; - +if (get_user (verb, &arg->verb))return -EFAULT ; res =get_wcaps (codec, verb >>24 );
sound/pci/hda/hda_intel.c +9 -9
@@ -31,10 +31,10 @@* CHANGES: * * 2004.12.01 Major rewrite by tiwai, merged the work of pshou -* +* */ -#include <asm/io.h> +#include <linux/io.h> #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/kernel.h>
@@ -139,7 +139,7 @@ MODULE_DESCRIPTION("Intel HDA driver");#define ICH6_REG_INTCTL 0x20#define ICH6_REG_INTSTS 0x24#define ICH6_REG_WALCLK 0x30 -#define ICH6_REG_SYNC 0x34 +#define ICH6_REG_SYNC 0x34#define ICH6_REG_CORBLBASE 0x40#define ICH6_REG_CORBUBASE 0x44#define ICH6_REG_CORBWP 0x48
@@ -422,7 +422,7 @@ static char *driver_short_names[] __devinitdata = { [AZX_DRIVER_SIS] = "HDA SIS966", [AZX_DRIVER_ULI] = "HDA ULI M5461", [AZX_DRIVER_NVIDIA] = "HDA NVidia", - [AZX_DRIVER_TERA] = "HDA Teradici", + [AZX_DRIVER_TERA] = "HDA Teradici", };/*
@@ -554,7 +554,7 @@ static void azx_update_rirb(struct azx *chip)if (wp == chip->rirb.wp)return ; chip->rirb.wp = wp; - +while (chip->rirb.rp != wp) { chip->rirb.rp++; chip->rirb.rp %=ICH6_MAX_RIRB_ENTRIES ;
@@ -777,7 +777,7 @@ static int azx_reset(struct azx *chip)/* * Lowlevel interface -*/ +*/ /* enable interrupts */ static void azx_int_enable (struct azx *chip)
@@ -913,7 +913,7 @@ static void azx_init_pci(struct azx *chip)case AZX_DRIVER_ATI :/* For ATI SB450 azalia HD audio, we need to enable snoop */ update_pci_byte (chip->pci, -ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR , +ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR ,0x07 ,ATI_SB450_HDAUDIO_ENABLE_SNOOP );break ;case AZX_DRIVER_NVIDIA :
@@ -964,7 +964,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)spin_unlock (&chip->reg_lock);return IRQ_NONE ; } - +for (i =0 ; i < chip->num_streams; i++) { azx_dev = &chip->azx_dev[i];if (status & azx_dev->sd_int_sta_mask) {
@@ -1004,7 +1004,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)azx_writeb (chip,STATESTS ,0x04 );#endif spin_unlock (&chip->reg_lock); - +return IRQ_HANDLED ; }
sound/pci/hda/hda_proc.c +4 -4
@@ -1,6 +1,6 @@/* * Universal Interface for Intel High Definition Audio Codec -* +* * Generic proc interface * * Copyright (c) 2004 Takashi Iwai <[email protected]>
@@ -99,7 +99,7 @@ static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) pcm &=AC_SUPPCM_RATES ;snd_iprintf (buffer," rates [0x%x]:" , pcm); -for (i =0 ; i <ARRAY_SIZE (rates); i++) +for (i =0 ; i <ARRAY_SIZE (rates); i++)if (pcm & (1 << i))snd_iprintf (buffer," %d" , rates[i]);snd_iprintf (buffer,"\n" );
@@ -527,7 +527,7 @@ static void print_codec_info(struct snd_info_entry *entry,else snd_iprintf (buffer,"No Modem Function Group found\n" ); -if (! codec->afg) +if (!codec->afg)return ;snd_hda_power_up (codec);snd_iprintf (buffer,"Default PCM:\n" );
@@ -538,7 +538,7 @@ static void print_codec_info(struct snd_info_entry *entry,print_amp_caps (buffer, codec, codec->afg,HDA_OUTPUT ); nodes =snd_hda_get_sub_nodes (codec, codec->afg, &nid); -if (! nid || nodes <0 ) { +if (!nid || nodes <0 ) {snd_iprintf (buffer,"Invalid AFG subtree\n" );snd_hda_power_down (codec);return ;
sound/pci/hda/patch_analog.c +11 -11
@@ -174,7 +174,7 @@ static int ad198x_build_controls(struct hda_codec *codec)if (err <0 )return err; spec->multiout.share_spdif =1 ; - } + }if (spec->dig_in_nid) { err =snd_hda_create_spdif_in_ctls (codec, spec->dig_in_nid);if (err <0 )
@@ -412,7 +412,7 @@ static int ad198x_eapd_get(struct snd_kcontrol *kcontrol,struct ad198x_spec *spec = codec->spec;int invert = (kcontrol->private_value >>8 ) &1 ;if (invert) - ucontrol->value.integer.value[0 ] = ! spec->cur_eapd; + ucontrol->value.integer.value[0 ] = !spec->cur_eapd;else ucontrol->value.integer.value[0 ] = spec->cur_eapd;return 0 ;
@@ -1413,7 +1413,7 @@ static int ad1981_hp_master_sw_put(struct snd_kcontrol *kcontrol,struct hda_codec *codec =snd_kcontrol_chip (kcontrol);struct ad198x_spec *spec = codec->spec; -if (!ad198x_eapd_put (kcontrol, ucontrol)) +if (!ad198x_eapd_put (kcontrol, ucontrol))return 0 ;/* change speaker pin appropriately */ snd_hda_codec_write(codec, 0x05, 0,
@@ -2426,7 +2426,7 @@ static void ad1988_laptop_unsol_event(struct hda_codec *codec, unsigned int res)snd_hda_sequence_write (codec, ad1988_laptop_hp_on); elsesnd_hda_sequence_write (codec ,ad1988_laptop_hp_off ); -} +}#ifdef CONFIG_SND_HDA_POWER_SAVE static struct hda_amp_list ad1988_loopbacks[] = {
@@ -2466,7 +2466,7 @@ static int add_control(struct ad198x_spec *spec, int type, const char *name,int num = spec->num_kctl_alloc +NUM_CONTROL_ALLOC ; knew =kcalloc (num +1 ,sizeof (*knew),GFP_KERNEL );/* array + terminator */ -if (! knew) +if (!knew)return -ENOMEM ;if (spec->kctl_alloc) {memcpy (knew, spec->kctl_alloc,sizeof (*knew) * spec->num_kctl_alloc);
@@ -2479,7 +2479,7 @@ static int add_control(struct ad198x_spec *spec, int type, const char *name, knew = &spec->kctl_alloc[spec->num_kctl_used]; *knew = ad1988_control_templates[type]; knew->name =kstrdup (name,GFP_KERNEL ); -if (! knew->name) +if (!knew->name)return -ENOMEM ; knew->private_value = val; spec->num_kctl_used++;
@@ -2581,7 +2581,7 @@ static int ad1988_auto_create_multi_out_ctls(struct ad198x_spec *spec,for (i =0 ; i < cfg->line_outs; i++) {hda_nid_t dac = spec->multiout.dac_nids[i]; -if (! dac) +if (!dac)continue ; nid = ad1988_mixer_nids[ad1988_pin_idx (cfg->line_out_pins[i])];if (i ==2 ) {
@@ -2631,7 +2631,7 @@ static int ad1988_auto_create_extra_out(struct hda_codec *codec, hda_nid_t pin,int i, idx, err;char name[32 ]; -if (! pin) +if (!pin)return 0 ; idx =ad1988_pin_idx (pin);
@@ -2784,7 +2784,7 @@ static void ad1988_auto_init_analog_input(struct hda_codec *codec)for (i =0 ; i <AUTO_PIN_LAST ; i++) {hda_nid_t nid = spec->autocfg.input_pins[i]; -if (! nid) +if (!nid)continue ;switch (nid) {case 0x15 :/* port-C */
@@ -2818,7 +2818,7 @@ static int ad1988_parse_auto_config(struct hda_codec *codec)return err;if ((err =ad1988_auto_fill_dac_nids (codec, &spec->autocfg)) <0 )return err; -if (! spec->autocfg.line_outs) +if (!spec->autocfg.line_outs)return 0 ;/* can't find valid BIOS pin config */ if ((err = ad1988_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 || (err = ad1988_auto_create_extra_out(codec,
@@ -2904,7 +2904,7 @@ static int patch_ad1988(struct hda_codec *codec)if (err <0 ) {ad198x_free (codec);return err; - }else if (! err) { + }else if (!err) {printk (KERN_INFO "hda_codec: Cannot set up configuration from BIOS. Using 6-stack mode...\n" ); board_config =AD1988_6STACK ; }
sound/pci/hda/patch_cmedia.c +1 -1
@@ -372,7 +372,7 @@ static int cmi9880_fill_multi_dac_nids(struct hda_codec *codec, const struct autcontinue ;/* search for an empty channel */ for (j =0 ; j < cfg->line_outs; j++) { -if (! assigned[j]) { +if (!assigned[j]) { spec->dac_nids[i] = j +0x03 ; assigned[j] =1 ;break ;
sound/pci/hda/patch_conexant.c +11 -11
@@ -377,7 +377,7 @@ static int conexant_build_controls(struct hda_codec *codec)if (err <0 )return err; spec->multiout.share_spdif =1 ; - } + }if (spec->dig_in_nid) { err =snd_hda_create_spdif_in_ctls (codec,spec->dig_in_nid);if (err <0 )
@@ -428,7 +428,7 @@ static int cxt_eapd_put(struct snd_kcontrol *kcontrol, eapd = !eapd;if (eapd == spec->cur_eapd)return 0 ; - + spec->cur_eapd = eapd; snd_hda_codec_write_cache(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE,
@@ -592,7 +592,7 @@ static void cxt5045_hp_automute(struct hda_codec *codec) spec->hp_present =snd_hda_codec_read (codec,0x11 ,0 ,AC_VERB_GET_PIN_SENSE ,0 ) &0x80000000 ; - bits = (spec->hp_present || !spec->cur_eapd) ?HDA_AMP_MUTE :0 ; + bits = (spec->hp_present || !spec->cur_eapd) ?HDA_AMP_MUTE :0 ;snd_hda_codec_amp_stereo (codec,0x10 ,HDA_OUTPUT ,0 ,HDA_AMP_MUTE , bits); }
@@ -706,7 +706,7 @@ static struct hda_verb cxt5045_init_verbs[] = { {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, { 0x13, AC_VERB_SET_CONNECT_SEL, 0x0 },/* EAPD */ - {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */ + {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */ { } /* end */ };
@@ -772,7 +772,7 @@ static struct snd_kcontrol_new cxt5045_test_mixer[] = {HDA_CODEC_MUTE ("Node 11 Playback Switch" ,0x11 ,0x0 ,HDA_OUTPUT ),HDA_CODEC_VOLUME ("Node 12 Playback Volume" ,0x12 ,0x0 ,HDA_OUTPUT ),HDA_CODEC_MUTE ("Node 12 Playback Switch" ,0x12 ,0x0 ,HDA_OUTPUT ), - +/* Modes for retasking pin widgets */ CXT_PIN_MODE ("HP-OUT pin mode" ,0x11 ,CXT_PIN_DIR_INOUT ), CXT_PIN_MODE("LINE1 pin mode", 0x12, CXT_PIN_DIR_INOUT),
@@ -1004,8 +1004,8 @@ static int patch_cxt5045(struct hda_codec *codec) spec->mixers[0 ] = cxt5045_test_mixer; spec->init_verbs[0 ] = cxt5045_test_init_verbs;break ; - -#endif + +#endif }switch (codec->subsystem_id >>16 ) {
@@ -1395,7 +1395,7 @@ static struct hda_verb cxt5047_test_init_verbs[] = {*/ {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0}, -/* Ensure mic1, mic2, line1 pin widgets take input from the +/* Ensure mic1, mic2, line1 pin widgets take input from the * OUT1 sum bus when acting as an output. */ {0x1a, AC_VERB_SET_CONNECT_SEL, 0},
@@ -1530,7 +1530,7 @@ static int patch_cxt5047(struct hda_codec *codec) spec->mixers[0 ] = cxt5047_test_mixer; spec->init_verbs[0 ] = cxt5047_test_init_verbs; codec->patch_ops.unsol_event = cxt5047_hp_unsol_event; -#endif +#endif }return 0 ; }
@@ -1685,7 +1685,7 @@ static struct hda_verb cxt5051_init_verbs[] = {/* HP, Amp */ {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, -/* DAC1 */ +/* DAC1 */ {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},/* Record selector: Int mic */ {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44},
@@ -1694,7 +1694,7 @@ static struct hda_verb cxt5051_init_verbs[] = {/* SPDIF route: PCM */ {0x1c, AC_VERB_SET_CONNECT_SEL, 0x0},/* EAPD */ - {0x1a, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ + {0x1a, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ {0x16, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|CONEXANT_HP_EVENT}, {0x17, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|CXT5051_PORTB_EVENT}, {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|CXT5051_PORTC_EVENT},
sound/pci/hda/patch_realtek.c +3 -3
@@ -9291,7 +9291,7 @@ static struct hda_verb alc262_hippo1_unsol_verbs[] = {static struct hda_verb alc262_sony_unsol_verbs[] = { {0x14 ,AC_VERB_SET_PIN_WIDGET_CONTROL ,0xc0 }, {0x15 ,AC_VERB_SET_CONNECT_SEL ,0x00 }, - {0x19 ,AC_VERB_SET_PIN_WIDGET_CONTROL ,0x24 },// Front Mic + {0x19 ,AC_VERB_SET_PIN_WIDGET_CONTROL ,0x24 },/* Front Mic */ {0x15 ,AC_VERB_SET_UNSOLICITED_ENABLE ,AC_USRSP_EN |ALC880_HP_EVENT }, {0x15 ,AC_VERB_SET_PIN_WIDGET_CONTROL ,PIN_HP },
@@ -15209,7 +15209,7 @@ static void alc662_eeepc_unsol_event(struct hda_codec *codec, unsigned int res) {if ((res >>26 ) ==ALC880_HP_EVENT ) -alc262_hippo1_automute ( codec ); +alc262_hippo1_automute (codec);if ((res >>26 ) ==ALC880_MIC_EVENT )alc662_eeepc_mic_automute (codec);
@@ -15217,7 +15217,7 @@ static void alc662_eeepc_unsol_event(struct hda_codec *codec,static void alc662_eeepc_inithook (struct hda_codec *codec) { -alc262_hippo1_automute ( codec ); +alc262_hippo1_automute (codec);alc662_eeepc_mic_automute (codec); }
sound/pci/hda/patch_si3054.c +4 -4
@@ -103,7 +103,7 @@ static int si3054_switch_get(struct snd_kcontrol *kcontrol,struct hda_codec *codec =snd_kcontrol_chip (kcontrol);u16 reg =PRIVATE_REG (kcontrol->private_value);u16 mask =PRIVATE_MASK (kcontrol->private_value); - uvalue->value.integer.value[0 ] = (GET_REG (codec, reg)) & mask ?1 :0 ; + uvalue->value.integer.value[0 ] = (GET_REG (codec, reg)) & mask ?1 :0 ;return 0 ; }
@@ -128,7 +128,7 @@ static int si3054_switch_put(struct snd_kcontrol *kcontrol, .put = si3054_switch_put, \ .private_value = PRIVATE_VALUE(reg,mask), \ } - +static struct snd_kcontrol_new si3054_modem_mixer[] = {SI3054_KCONTROL ("Off-hook Switch" ,SI3054_GPIO_CONTROL ,SI3054_GPIO_OH ),
@@ -233,7 +233,7 @@ static int si3054_init(struct hda_codec *codec) val =GET_REG (codec,SI3054_EXTENDED_MID ); }while ((val &SI3054_MEI_READY ) !=SI3054_MEI_READY && wait_count--); -if ((val&SI3054_MEI_READY ) !=SI3054_MEI_READY ) { +if ((val&SI3054_MEI_READY ) !=SI3054_MEI_READY ) {snd_printk (KERN_ERR "si3054: cannot initialize. EXT MID = %04x\n" , val);/* let's pray that this is no fatal error */ /* return -EACCES; */
@@ -244,7 +244,7 @@ static int si3054_init(struct hda_codec *codec)SET_REG (codec,SI3054_MISC_AFE ,0 );SET_REG (codec,SI3054_LINE_CFG1 ,0x200 ); -if ((GET_REG (codec,SI3054_LINE_STATUS ) & (1 <<6 )) ==0 ) { +if ((GET_REG (codec,SI3054_LINE_STATUS ) & (1 <<6 )) ==0 ) {snd_printd ("Link Frame Detect(FDT) is not ready (line status: %04x)\n" ,GET_REG (codec,SI3054_LINE_STATUS )); }
sound/pci/hda/patch_sigmatel.c +65 -65
417 lines not on this page · raw message
sound/pci/hda/patch_via.c +17 -17
@@ -344,7 +344,7 @@ static struct hda_verb vt1708_volume_init_verbs[] = { {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - +/* Setup default input to PW4 */ {0x20, AC_VERB_SET_CONNECT_SEL, 0x1}, /* PW9 Output enable */
@@ -644,8 +644,8 @@ static int vt1708_auto_fill_dac_nids(struct via_spec *spec, spec->multiout.num_dacs = cfg->line_outs; spec->multiout.dac_nids = spec->private_dac_nids; - -for (i =0 ; i <4 ; i++) { + +for (i =0 ; i <4 ; i++) { nid = cfg->line_out_pins[i];if (nid) {/* config dac list */
@@ -683,7 +683,7 @@ static int vt1708_auto_create_multi_out_ctls(struct via_spec *spec,if (!nid)continue ; - +if (i !=AUTO_SEQ_FRONT ) nid_vol =0x1b - i +1 ;
@@ -727,7 +727,7 @@ static int vt1708_auto_create_multi_out_ctls(struct via_spec *spec, HDA_INPUT));if (err <0 )return err; - +/* add control to PW3 */ sprintf (name,"%s Playback Volume" , chname[i]); err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
@@ -806,7 +806,7 @@ static int vt1708_auto_create_analog_input_ctls(struct via_spec *spec,case 0x1d :/* Mic */ idx =2 ;break ; - +case 0x1e :/* Line In */ idx =3 ;break ;
@@ -874,7 +874,7 @@ static int vt1708_parse_auto_config(struct hda_codec *codec)if (spec->kctl_alloc) spec->mixers[spec->num_mixers++] = spec->kctl_alloc; - spec->init_verbs = vt1708_volume_init_verbs; + spec->init_verbs = vt1708_volume_init_verbs; spec->input_mux = &spec->private_imux;
@@ -913,7 +913,7 @@ static int patch_vt1708(struct hda_codec *codec) "from BIOS. Using genenic mode...\n"); } - + spec->stream_name_analog ="VT1708 Analog" ; spec->stream_analog_playback = &vt1708_pcm_analog_playback;/* disable 32bit format on VT1708 */
@@ -925,7 +925,7 @@ static int patch_vt1708(struct hda_codec *codec) spec->stream_digital_playback = &vt1708_pcm_digital_playback; spec->stream_digital_capture = &vt1708_pcm_digital_capture; - +if (!spec->adc_nids && spec->input_mux) { spec->adc_nids = vt1708_adc_nids; spec->num_adc_nids =ARRAY_SIZE (vt1708_adc_nids);
@@ -1104,7 +1104,7 @@ static int vt1709_auto_fill_dac_nids(struct via_spec *spec, spec->multiout.dac_nids[cfg->line_outs] =0x28 ;/* AOW4 */ }else if (cfg->line_outs ==3 ) {/* 6 channels */ -for (i =0 ; i < cfg->line_outs; i++) { +for (i =0 ; i < cfg->line_outs; i++) { nid = cfg->line_out_pins[i];if (nid) {/* config dac list */
@@ -1143,7 +1143,7 @@ static int vt1709_auto_create_multi_out_ctls(struct via_spec *spec,for (i =0 ; i <=AUTO_SEQ_SIDE ; i++) { nid = cfg->line_out_pins[i]; -if (!nid) +if (!nid)continue ;if (i ==AUTO_SEQ_CENLFE ) {
@@ -1186,7 +1186,7 @@ static int vt1709_auto_create_multi_out_ctls(struct via_spec *spec, HDA_INPUT));if (err <0 )return err; - +/* add control to PW3 */ sprintf (name,"%s Playback Volume" , chname[i]); err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
@@ -1281,7 +1281,7 @@ static int vt1709_auto_create_analog_input_ctls(struct via_spec *spec,case 0x1d :/* Mic */ idx =2 ;break ; - +case 0x1e :/* Line In */ idx =3 ;break ;
@@ -1375,7 +1375,7 @@ static int patch_vt1709_10ch(struct hda_codec *codec) "Using genenic mode...\n"); } - spec->init_verbs = vt1709_10ch_volume_init_verbs; + spec->init_verbs = vt1709_10ch_volume_init_verbs; spec->stream_name_analog ="VT1709 Analog" ; spec->stream_analog_playback = &vt1709_10ch_pcm_analog_playback;
@@ -1385,7 +1385,7 @@ static int patch_vt1709_10ch(struct hda_codec *codec) spec->stream_digital_playback = &vt1709_pcm_digital_playback; spec->stream_digital_capture = &vt1709_pcm_digital_capture; - +if (!spec->adc_nids && spec->input_mux) { spec->adc_nids = vt1709_adc_nids; spec->num_adc_nids =ARRAY_SIZE (vt1709_adc_nids);
@@ -1466,7 +1466,7 @@ static int patch_vt1709_6ch(struct hda_codec *codec) "Using genenic mode...\n"); } - spec->init_verbs = vt1709_6ch_volume_init_verbs; + spec->init_verbs = vt1709_6ch_volume_init_verbs; spec->stream_name_analog ="VT1709 Analog" ; spec->stream_analog_playback = &vt1709_6ch_pcm_analog_playback;
@@ -1476,7 +1476,7 @@ static int patch_vt1709_6ch(struct hda_codec *codec) spec->stream_digital_playback = &vt1709_pcm_digital_playback; spec->stream_digital_capture = &vt1709_pcm_digital_capture; - +if (!spec->adc_nids && spec->input_mux) { spec->adc_nids = vt1709_adc_nids; spec->num_adc_nids =ARRAY_SIZE (vt1709_adc_nids);