sound/pci: coding style fixes: au88x0
PATCH 2/24 sound/pci: coding style fixes: au88x0
- <asm/io.h> -> <linux/io.h>
- remove trailing whitespaces
- convert comments
Only compile tested.
Signed-off-by Alexander Beregalov <[email protected]>
---
sound/pci/au88x0/au88x0.c | 46 ++++---- sound/pci/au88x0/au88x0.h | 4 +- sound/pci/au88x0/au88x0_a3d.c | 46 ++++---- sound/pci/au88x0/au88x0_core.c | 254 +++++++++++++++++++------------------- sound/pci/au88x0/au88x0_eq.c | 24 ++-- sound/pci/au88x0/au88x0_mixer.c | 2 +- sound/pci/au88x0/au88x0_mpu401.c | 2 +- sound/pci/au88x0/au88x0_pcm.c | 46 ++++---- sound/pci/au88x0/au88x0_synth.c | 46 ++++---- sound/pci/au88x0/au88x0_xtalk.c | 26 ++-- sound/pci/au88x0/au88x0_xtalk.h | 2 +- 11 files changed, 249 insertions(+), 249 deletions(-)
sound/pci/au88x0/au88x0.c +23 -23
@@ -125,7 +125,7 @@ static int snd_vortex_dev_free(struct snd_device *device)vortex_gameport_unregister (vortex);vortex_core_shutdown (vortex); -// Take down PCI interface. +/* Take down PCI interface. */ free_irq (vortex->irq, vortex);iounmap (vortex->mmio);pci_release_regions (vortex->pci_dev);
@@ -148,7 +148,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) *rchip =NULL ; -// check PCI availability (DMA). +/* check PCI availability (DMA). */ if ((err =pci_enable_device (pci)) <0 )return err; if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
@@ -166,7 +166,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) chip->card = card; -// initialize the stuff +/* initialize the stuff */ chip->pci_dev = pci; chip->io =pci_resource_start (pci,0 ); chip->vendor = pci->vendor;
@@ -174,8 +174,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) chip->card = card; chip->irq =-1 ; -// (1) PCI resource allocation -// Get MMIO area +/* (1) PCI resource allocation */ +/* Get MMIO area */ // if ((err =pci_request_regions (pci,CARD_NAME_SHORT )) !=0 ) goto regions_out;
@@ -205,9 +205,9 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) chip->irq = pci->irq;pci_set_master (pci); -// End of PCI setup. +/* End of PCI setup. */ -// Register alsa root device. +/* Register alsa root device. */ if ((err =snd_device_new (card,SNDRV_DEV_LOWLEVEL , chip, &ops)) <0 ) { goto alloc_out; }
@@ -228,7 +228,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)pci_release_regions (chip->pci_dev); regions_out:pci_disable_device (chip->pci_dev); -//FIXME: this not the right place to unregister the gameport +/* FIXME: this not the right place to unregister the gameport */ vortex_gameport_unregister (chip);kfree (chip);return err;
@@ -243,64 +243,64 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)vortex_t *chip;int err; -// (1) +/* (1) */ if (dev >=SNDRV_CARDS )return -ENODEV ;if (!enable[dev]) { dev++;return -ENOENT ; } -// (2) +/* (2) */ card =snd_card_new (index[dev], id[dev],THIS_MODULE ,0 );if (card ==NULL )return -ENOMEM ; -// (3) +/* (3) */ if ((err =snd_vortex_create (card, pci, &chip)) <0 ) {snd_card_free (card);return err; }snd_vortex_workaround (pci, pcifix[dev]); -// Card details needed in snd_vortex_midi +/* Card details needed in snd_vortex_midi */ strcpy (card->driver,CARD_NAME_SHORT );sprintf (card->shortname,"Aureal Vortex %s" ,CARD_NAME_SHORT );sprintf (card->longname,"%s at 0x%lx irq %i" , card->shortname, chip->io, chip->irq); -// (4) Alloc components. -// ADB pcm. +/* (4) Alloc components. */ +/* ADB pcm. */ if ((err =snd_vortex_new_pcm (chip,VORTEX_PCM_ADB ,NR_ADB )) <0 ) {snd_card_free (card);return err; }#ifndef CHIP_AU8820 -// ADB SPDIF +/* ADB SPDIF */ if ((err =snd_vortex_new_pcm (chip,VORTEX_PCM_SPDIF ,1 )) <0 ) {snd_card_free (card);return err; } -// A3D +/* A3D */ if ((err =snd_vortex_new_pcm (chip,VORTEX_PCM_A3D ,NR_A3D )) <0 ) {snd_card_free (card);return err; }#endif /* -// ADB I2S +//ADB I2S if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_I2S, 1)) < 0) { snd_card_free(card); return err; } */ #ifndef CHIP_AU8810 -// WT pcm. +/* WT pcm. */ if ((err =snd_vortex_new_pcm (chip,VORTEX_PCM_WT ,NR_WT )) <0 ) {snd_card_free (card);return err; }#endif -// snd_ac97_mixer and Vortex mixer. +/* snd_ac97_mixer and Vortex mixer. */ if ((err =snd_vortex_mixer (chip)) <0 ) {snd_card_free (card);return err;
@@ -329,12 +329,12 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) }#endif -// (5) +/* (5) */ if ((err =pci_read_config_word (pci,PCI_DEVICE_ID , &(chip->device))) <0 ) {snd_card_free (card);return err; - } + }if ((err =pci_read_config_word (pci,PCI_VENDOR_ID , &(chip->vendor))) <0 ) {snd_card_free (card);
@@ -354,12 +354,12 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) }#endif -// (6) +/* (6) */ if ((err =snd_card_register (card)) <0 ) {snd_card_free (card);return err; } -// (7) +/* (7) */ pci_set_drvdata (pci, card); dev++;vortex_connect_default (chip,1 );
sound/pci/au88x0/au88x0.h +2 -2
@@ -13,13 +13,13 @@* along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - +#ifndef __SOUND_AU88X0_H#define __SOUND_AU88X0_H#ifdef __KERNEL__#include <linux/pci.h> -#include <asm/io.h> +#include <linux/io.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/rawmidi.h>
sound/pci/au88x0/au88x0_a3d.c +23 -23
152 lines not on this page · raw message
sound/pci/au88x0/au88x0_core.c +127 -127
773 lines not on this page · raw message
sound/pci/au88x0/au88x0_eq.c +12 -12
@@ -4,7 +4,7 @@* * Sun Jun 8 18:19:19 2003 * 2003 Manuel Jander ([email protected]) -* +* * 02 July 2003: First time something works :) * November 2003: A3D Bypass code completed but untested. *
@@ -32,7 +32,7 @@/* The Aureal Hardware EQ is found on AU8810 and AU8830 chips only. -it has 4 inputs (2 for general mix, 2 for A3D) and 2 outputs (supposed +it has 4 inputs (2 for general mix, 2 for A3D) and 2 outputs (supposed to be routed to the codec). */
@@ -444,9 +444,9 @@ static void vortex_EqHw_ZeroState(vortex_t * vortex)vortex_EqHw_SetRightGainsTarget (vortex, eq_gains_zero);vortex_EqHw_SetBypassGain (vortex,0 ,0 ); -//vortex_EqHw_SetCurrBypassGain(vortex, 0, 0); +/* vortex_EqHw_SetCurrBypassGain(vortex, 0, 0); */ vortex_EqHw_SetA3DBypassGain (vortex,0 ,0 ); -//vortex_EqHw_SetCurrA3DBypassGain(vortex, 0, 0); +/* vortex_EqHw_SetCurrA3DBypassGain(vortex, 0, 0); */ vortex_EqHw_SetLeftStates (vortex, eq_states_zero, asEqOutStateZeros);vortex_EqHw_SetRightStates (vortex, eq_states_zero, asEqOutStateZeros);vortex_EqHw_SetLevels (vortex, (u16 *) eq_levels);
@@ -570,7 +570,7 @@ vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains, s32 *cnt)return 1 ; si++; } -while (eq->this10 > si) ; +while (eq->this10 > si); *cnt = si *2 ;return 0 ; }
@@ -597,7 +597,7 @@ vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], s32 count)for (i =0 ; i < count; i++) { eq->this130[i] = gains[i]; } - +if (eq->this54)return 0 ;return vortex_Eqlzr_SetAllBandsFromActiveCoeffSet (vortex);
@@ -643,7 +643,7 @@ static void vortex_Eqlzr_ShutDownA3d(vortex_t * vortex)static void vortex_Eqlzr_SetBypass (vortex_t * vortex,u32 bp) {eqlzr_t *eq = &(vortex->eq); - +if ((eq->this28) && (bp ==0 )) {/* EQ enabled */ vortex_Eqlzr_SetAllBandsFromActiveCoeffSet (vortex);
@@ -691,7 +691,7 @@ static void vortex_Eqlzr_init(vortex_t * vortex)eqlzr_t *eq = &(vortex->eq);/* Object constructor */ -//eq->this04 = 0; +/* eq->this04 = 0; */ eq->this08 =0 ;/* Bypass gain with EQ in use. */ eq->this0a =0x5999 ; eq->this0c =0x5999 ;/* Bypass gain with EQ disabled. */
@@ -736,7 +736,7 @@ snd_vortex_eqtoggle_get(struct snd_kcontrol *kcontrol, {vortex_t *vortex =snd_kcontrol_chip (kcontrol);eqlzr_t *eq = &(vortex->eq); -//int i = kcontrol->private_value; +/* int i = kcontrol->private_value; */ ucontrol->value.integer.value[0 ] = eq->this54 ?0 :1 ;
@@ -749,7 +749,7 @@ snd_vortex_eqtoggle_put(struct snd_kcontrol *kcontrol, {vortex_t *vortex =snd_kcontrol_chip (kcontrol);eqlzr_t *eq = &(vortex->eq); -//int i = kcontrol->private_value; +/* int i = kcontrol->private_value; */ eq->this54 = ucontrol->value.integer.value[0 ] ?0 :1 ;vortex_Eqlzr_SetBypass (vortex, eq->this54);
@@ -900,7 +900,7 @@ static int __devinit vortex_eq_init(vortex_t * vortex) kcontrol->private_value = i;if ((err =snd_ctl_add (vortex->card, kcontrol)) <0 )return err; -//vortex->eqctrl[i] = kcontrol; +/* vortex->eqctrl[i] = kcontrol; */ }/* EQ band levels */ if ((kcontrol =snd_ctl_new1 (&vortex_levels_kcontrol, vortex)) ==NULL )
@@ -916,7 +916,7 @@ static int vortex_eq_free(vortex_t * vortex)/* //FIXME: segfault because vortex->eqctrl[i] == 4 int i; -for (i=0; i<10; i++) { +for (i = 0; i < 10; i++) { if (vortex->eqctrl[i]) snd_ctl_remove(vortex->card, vortex->eqctrl[i]); }
sound/pci/au88x0/au88x0_mixer.c +1 -1
@@ -23,7 +23,7 @@ static int __devinit snd_vortex_mixer(vortex_t * vortex)if ((err =snd_ac97_bus (vortex->card,0 , &ops,NULL , &pbus)) <0 )return err;memset (&ac97,0 ,sizeof (ac97)); -// Intialize AC97 codec stuff. +/* Intialize AC97 codec stuff. */ ac97.private_data = vortex; ac97.scaps =AC97_SCAP_NO_SPDIF ; err =snd_ac97_mixer (pbus, &ac97, &vortex->codec);
sound/pci/au88x0/au88x0_mpu401.c +1 -1
@@ -72,7 +72,7 @@ static int __devinit snd_vortex_midi(vortex_t * vortex)/* Check if anything is OK. */ temp =hwread (vortex->mmio,VORTEX_MIDI_DATA ); -if (temp !=MPU401_ACK /*0xfe */ ) { +if (temp !=MPU401_ACK /*0xfe */ ) {printk (KERN_ERR "midi port doesn't acknowledge!\n" );return -ENODEV ; }
sound/pci/au88x0/au88x0_pcm.c +23 -23
158 lines not on this page · raw message
sound/pci/au88x0/au88x0_synth.c +23 -23
151 lines not on this page · raw message
sound/pci/au88x0/au88x0_xtalk.c +13 -13
@@ -64,7 +64,7 @@ static xtalk_gains_t const asXtalkGains1Chan = {static xtalk_gains_t const asXtalkGainsAllChan = {0x7FFF ,0x7FFF ,0x7FFF ,0x7FFF ,0 ,0x7FFF ,0x7FFF ,0x7FFF ,0x7FFF ,0 -//0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7fff,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7fff +/* 0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7fff,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7fff */ };static xtalk_gains_t const asXtalkGainsZeros;
@@ -672,7 +672,7 @@ static void vortex_XtalkHw_ZeroIO(vortex_t * vortex)static void vortex_XtalkHw_ZeroState (vortex_t * vortex) { -vortex_XtalkHw_ZeroIO (vortex);// inlined +vortex_XtalkHw_ZeroIO (vortex);/* inlined */ vortex_XtalkHw_SetLeftEQ (vortex,0 ,0 , asXtalkCoefsZeros);vortex_XtalkHw_SetRightEQ (vortex,0 ,0 , asXtalkCoefsZeros);
@@ -680,14 +680,14 @@ static void vortex_XtalkHw_ZeroState(vortex_t * vortex)vortex_XtalkHw_SetLeftXT (vortex,0 ,0 , asXtalkCoefsZeros);vortex_XtalkHw_SetRightXT (vortex,0 ,0 , asXtalkCoefsZeros); -vortex_XtalkHw_SetGains (vortex, asXtalkGainsZeros);// inlined +vortex_XtalkHw_SetGains (vortex, asXtalkGainsZeros);/* inlined */ -vortex_XtalkHw_SetDelay (vortex,0 ,0 );// inlined +vortex_XtalkHw_SetDelay (vortex,0 ,0 );/* inlined */ -vortex_XtalkHw_SetLeftDline (vortex, alXtalkDlineZeros);// inlined -vortex_XtalkHw_SetRightDline (vortex, alXtalkDlineZeros);// inlined -vortex_XtalkHw_SetLeftDline (vortex, alXtalkDlineZeros);// inlined -vortex_XtalkHw_SetRightDline (vortex, alXtalkDlineZeros);// inlined +vortex_XtalkHw_SetLeftDline (vortex, alXtalkDlineZeros);/* inlined */ +vortex_XtalkHw_SetRightDline (vortex, alXtalkDlineZeros);/* inlined */ +vortex_XtalkHw_SetLeftDline (vortex, alXtalkDlineZeros);/* inlined */ +vortex_XtalkHw_SetRightDline (vortex, alXtalkDlineZeros);/* inlined */ vortex_XtalkHw_SetLeftEQStates (vortex, asXtalkInStateZeros, asXtalkOutStateZeros);
@@ -707,7 +707,7 @@ static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex)vortex_XtalkHw_SetLeftXT (vortex,0 ,0 , asXtalkCoefsZeros);vortex_XtalkHw_SetRightXT (vortex,0 ,0 , asXtalkCoefsZeros); -vortex_XtalkHw_SetDelay (vortex,0 ,0 );// inlined +vortex_XtalkHw_SetDelay (vortex,0 ,0 );/* inlined */ }static void vortex_XtalkHw_ProgramXtalkWide (vortex_t * vortex)
@@ -724,7 +724,7 @@ static void vortex_XtalkHw_ProgramXtalkWide(vortex_t * vortex) sXtalkWideShiftLeftXt, asXtalkWideCoefsLeftXt); -vortex_XtalkHw_SetDelay (vortex, wXtalkWideRightDelay, wXtalkWideLeftDelay);// inlined +vortex_XtalkHw_SetDelay (vortex, wXtalkWideRightDelay, wXtalkWideLeftDelay);/* inlined */ }static void vortex_XtalkHw_ProgramXtalkNarrow (vortex_t * vortex)
@@ -743,13 +743,13 @@ static void vortex_XtalkHw_ProgramXtalkNarrow(vortex_t * vortex) sXtalkNarrowShiftLeftXt, asXtalkNarrowCoefsLeftXt); -vortex_XtalkHw_SetDelay (vortex, wXtalkNarrowRightDelay, wXtalkNarrowLeftDelay);// inlined +vortex_XtalkHw_SetDelay (vortex, wXtalkNarrowRightDelay, wXtalkNarrowLeftDelay);/* inlined */ }static void vortex_XtalkHw_ProgramDiamondXtalk (vortex_t * vortex) { -//sDiamondKLeftEq,sDiamondKRightXt,asDiamondCoefsLeftEq +/* sDiamondKLeftEq,sDiamondKRightXt,asDiamondCoefsLeftEq */ vortex_XtalkHw_SetLeftEQ (vortex, sDiamondKLeftEq, sDiamondShiftLeftEq, asDiamondCoefsLeftEq); vortex_XtalkHw_SetRightEQ(vortex, sDiamondKRightEq,
@@ -759,7 +759,7 @@ static void vortex_XtalkHw_ProgramDiamondXtalk(vortex_t * vortex)vortex_XtalkHw_SetRightXT (vortex, sDiamondKLeftXt, sDiamondShiftLeftXt, asDiamondCoefsLeftXt); -vortex_XtalkHw_SetDelay (vortex, wDiamondRightDelay, wDiamondLeftDelay);// inlined +vortex_XtalkHw_SetDelay (vortex, wDiamondRightDelay, wDiamondLeftDelay);/* inlined */ }static void vortex_XtalkHw_init (vortex_t * vortex)
sound/pci/au88x0/au88x0_xtalk.h +1 -1
@@ -22,7 +22,7 @@* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* The crosstalk canceler supports 5 stereo input channels. The result is +/* The crosstalk canceler supports 5 stereo input channels. The result is available at one single output route pair (stereo). */ #ifndef _AU88X0_CXTALK_H