[alsa-devel] [PATCH -mm] sound/pci/trident/trident_main.c remove unused code

Michal Piotrowski michal.k.k.piotrowski at gmail.com
Sun Mar 25 17:52:42 CEST 2007


This patch is against the latest -mm snapshot.

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski at gmail.com>

--- linux-work5/sound/pci/trident/trident_main.c	2007-03-25 00:31:00.000000000 +0100
+++ linux-work3/sound/pci/trident/trident_main.c	2007-03-25 00:51:49.000000000 +0100
@@ -63,49 +63,6 @@ static int snd_trident_free(struct snd_t
  *  common I/O routines
  */
 
-
-#if 0
-static void snd_trident_print_voice_regs(struct snd_trident *trident, int voice)
-{
-	unsigned int val, tmp;
-
-	printk("Trident voice %i:\n", voice);
-	outb(voice, TRID_REG(trident, T4D_LFO_GC_CIR));
-	val = inl(TRID_REG(trident, CH_LBA));
-	printk("LBA: 0x%x\n", val);
-	val = inl(TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC));
-	printk("GVSel: %i\n", val >> 31);
-	printk("Pan: 0x%x\n", (val >> 24) & 0x7f);
-	printk("Vol: 0x%x\n", (val >> 16) & 0xff);
-	printk("CTRL: 0x%x\n", (val >> 12) & 0x0f);
-	printk("EC: 0x%x\n", val & 0x0fff);
-	if (trident->device != TRIDENT_DEVICE_ID_NX) {
-		val = inl(TRID_REG(trident, CH_DX_CSO_ALPHA_FMS));
-		printk("CSO: 0x%x\n", val >> 16);
-		printk("Alpha: 0x%x\n", (val >> 4) & 0x0fff);
-		printk("FMS: 0x%x\n", val & 0x0f);
-		val = inl(TRID_REG(trident, CH_DX_ESO_DELTA));
-		printk("ESO: 0x%x\n", val >> 16);
-		printk("Delta: 0x%x\n", val & 0xffff);
-		val = inl(TRID_REG(trident, CH_DX_FMC_RVOL_CVOL));
-	} else {		// TRIDENT_DEVICE_ID_NX
-		val = inl(TRID_REG(trident, CH_NX_DELTA_CSO));
-		tmp = (val >> 24) & 0xff;
-		printk("CSO: 0x%x\n", val & 0x00ffffff);
-		val = inl(TRID_REG(trident, CH_NX_DELTA_ESO));
-		tmp |= (val >> 16) & 0xff00;
-		printk("Delta: 0x%x\n", tmp);
-		printk("ESO: 0x%x\n", val & 0x00ffffff);
-		val = inl(TRID_REG(trident, CH_NX_ALPHA_FMS_FMC_RVOL_CVOL));
-		printk("Alpha: 0x%x\n", val >> 20);
-		printk("FMS: 0x%x\n", (val >> 16) & 0x0f);
-	}
-	printk("FMC: 0x%x\n", (val >> 14) & 3);
-	printk("RVol: 0x%x\n", (val >> 7) & 0x7f);
-	printk("CVol: 0x%x\n", val & 0x7f);
-}
-#endif
-
 /*---------------------------------------------------------------------------
    unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned short reg)
   
@@ -495,15 +452,6 @@ void snd_trident_write_voice_regs(struct
 	outl(regs[2], TRID_REG(trident, CH_START + 8));
 	outl(regs[3], TRID_REG(trident, CH_START + 12));
 	outl(regs[4], TRID_REG(trident, CH_START + 16));
-
-#if 0
-	printk("written %i channel:\n", voice->number);
-	printk("  regs[0] = 0x%x/0x%x\n", regs[0], inl(TRID_REG(trident, CH_START + 0)));
-	printk("  regs[1] = 0x%x/0x%x\n", regs[1], inl(TRID_REG(trident, CH_START + 4)));
-	printk("  regs[2] = 0x%x/0x%x\n", regs[2], inl(TRID_REG(trident, CH_START + 8)));
-	printk("  regs[3] = 0x%x/0x%x\n", regs[3], inl(TRID_REG(trident, CH_START + 12)));
-	printk("  regs[4] = 0x%x/0x%x\n", regs[4], inl(TRID_REG(trident, CH_START + 16)));
-#endif
 }
 
 EXPORT_SYMBOL(snd_trident_write_voice_regs);
@@ -972,12 +920,7 @@ static int snd_trident_playback_prepare(
 	voice->CVol = mix->cvol;
 	voice->Pan = mix->pan;
 	voice->Attribute = 0;
-#if 0
-	voice->Attribute = (1<<(30-16))|(2<<(26-16))|
-			   (0<<(24-16))|(0x1f<<(19-16));
-#else
 	voice->Attribute = 0;
-#endif
 
 	snd_trident_write_voice_regs(trident, voice);
 
@@ -996,12 +939,7 @@ static int snd_trident_playback_prepare(
 		evoice->Vol = 0x3ff;			/* mute */
 		evoice->RVol = evoice->CVol = 0x7f;	/* mute */
 		evoice->Pan = 0x7f;			/* mute */
-#if 0
-		evoice->Attribute = (1<<(30-16))|(2<<(26-16))|
-				    (0<<(24-16))|(0x1f<<(19-16));
-#else
 		evoice->Attribute = 0;
-#endif
 		snd_trident_write_voice_regs(trident, evoice);
 		evoice->isync2 = 1;
 		evoice->isync_mark = runtime->period_size;
@@ -3804,14 +3742,7 @@ static irqreturn_t snd_trident_interrupt
 				snd_trident_write_eso_reg(trident, voice, voice->ESO);
 				snd_trident_start_voice(trident, voice->number);
 			}
-#if 0
-			if (voice->extra) {
-				/* update CSO for extra voice to preserve sync */
-				snd_trident_stop_voice(trident, voice->extra->number);
-				snd_trident_write_cso_reg(trident, voice->extra, 0);
-				snd_trident_start_voice(trident, voice->extra->number);
-			}
-#endif
+
 			spin_unlock(&trident->reg_lock);
 			snd_pcm_period_elapsed(voice->substream);
 			spin_lock(&trident->reg_lock);



More information about the Alsa-devel mailing list