aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-08-19 16:09:55 -0400
committerTakashi Iwai <tiwai@suse.de>2009-08-23 12:59:14 -0400
commit848bffef28454049549bfba113b932df7c6d243d (patch)
tree669710a4f8005747c50952fcc436bc1726dd54bc
parent70bdbd3d1ae9c4ca3e84a43df34262face26575d (diff)
ALSA: ali5451: remove dead code
Remove code covered by #if/endif 0 and #ifdef/endif CODEC_RESET (CODEC_RESET is never defined). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ali5451/ali5451.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 76d76c08339b..b458d208720b 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -478,45 +478,6 @@ static int snd_ali_reset_5451(struct snd_ali *codec)
478 return 0; 478 return 0;
479} 479}
480 480
481#ifdef CODEC_RESET
482
483static int snd_ali_reset_codec(struct snd_ali *codec)
484{
485 struct pci_dev *pci_dev;
486 unsigned char bVal;
487 unsigned int dwVal;
488 unsigned short wCount, wReg;
489
490 pci_dev = codec->pci_m1533;
491
492 pci_read_config_dword(pci_dev, 0x7c, &dwVal);
493 pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000);
494 udelay(5000);
495 pci_read_config_dword(pci_dev, 0x7c, &dwVal);
496 pci_write_config_dword(pci_dev, 0x7c, dwVal & 0xf7ffffff);
497 udelay(5000);
498
499 bVal = inb(ALI_REG(codec,ALI_SCTRL));
500 bVal |= 0x02;
501 outb(ALI_REG(codec,ALI_SCTRL),bVal);
502 udelay(5000);
503 bVal = inb(ALI_REG(codec,ALI_SCTRL));
504 bVal &= 0xfd;
505 outb(ALI_REG(codec,ALI_SCTRL),bVal);
506 udelay(15000);
507
508 wCount = 200;
509 while (wCount--) {
510 wReg = snd_ali_codec_read(codec->ac97, AC97_POWERDOWN);
511 if ((wReg & 0x000f) == 0x000f)
512 return 0;
513 udelay(5000);
514 }
515 return -1;
516}
517
518#endif
519
520/* 481/*
521 * ALI 5451 Controller 482 * ALI 5451 Controller
522 */ 483 */
@@ -561,22 +522,6 @@ static void snd_ali_disable_address_interrupt(struct snd_ali *codec)
561 outl(gc, ALI_REG(codec, ALI_GC_CIR)); 522 outl(gc, ALI_REG(codec, ALI_GC_CIR));
562} 523}
563 524
564#if 0 /* not used */
565static void snd_ali_enable_voice_irq(struct snd_ali *codec,
566 unsigned int channel)
567{
568 unsigned int mask;
569 struct snd_ali_channel_control *pchregs = &(codec->chregs);
570
571 snd_ali_printk("enable_voice_irq channel=%d\n",channel);
572
573 mask = 1 << (channel & 0x1f);
574 pchregs->data.ainten = inl(ALI_REG(codec, pchregs->regs.ainten));
575 pchregs->data.ainten |= mask;
576 outl(pchregs->data.ainten, ALI_REG(codec, pchregs->regs.ainten));
577}
578#endif
579
580static void snd_ali_disable_voice_irq(struct snd_ali *codec, 525static void snd_ali_disable_voice_irq(struct snd_ali *codec,
581 unsigned int channel) 526 unsigned int channel)
582{ 527{
@@ -677,16 +622,6 @@ static void snd_ali_free_channel_pcm(struct snd_ali *codec, int channel)
677 } 622 }
678} 623}
679 624
680#if 0 /* not used */
681static void snd_ali_start_voice(struct snd_ali *codec, unsigned int channel)
682{
683 unsigned int mask = 1 << (channel & 0x1f);
684
685 snd_ali_printk("start_voice: channel=%d\n",channel);
686 outl(mask, ALI_REG(codec,codec->chregs.regs.start));
687}
688#endif
689
690static void snd_ali_stop_voice(struct snd_ali *codec, unsigned int channel) 625static void snd_ali_stop_voice(struct snd_ali *codec, unsigned int channel)
691{ 626{
692 unsigned int mask = 1 << (channel & 0x1f); 627 unsigned int mask = 1 << (channel & 0x1f);