aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-09-10 09:32:38 -0400
committerTakashi Iwai <tiwai@suse.de>2009-09-10 09:32:38 -0400
commit45fae5c78d873b10c66dfc04db6701e05c493791 (patch)
treeb553f8386d4a6a4c9ddf920b43ea09743bddfdc4 /sound/pci
parent74fca6a42863ffacaf7ba6f1936a9f228950f657 (diff)
parent848bffef28454049549bfba113b932df7c6d243d (diff)
Merge branch 'topic/ali5451-cleanup' into for-linus
* topic/ali5451-cleanup: ALSA: ali5451: remove dead code
Diffstat (limited to 'sound/pci')
-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);