/[openvortex]/alsa/alsa-kernel/pci/via82xx.c
ViewVC logotype

Diff of /alsa/alsa-kernel/pci/via82xx.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by vizard, Sat May 31 02:35:11 2003 UTC revision 1.3 by vizard, Mon Aug 11 00:06:39 2003 UTC
# Line 564  static void snd_via82xx_channel_reset(vi Line 564  static void snd_via82xx_channel_reset(vi
564  {  {
565          outb(VIA_REG_CTRL_PAUSE | VIA_REG_CTRL_TERMINATE | VIA_REG_CTRL_RESET,          outb(VIA_REG_CTRL_PAUSE | VIA_REG_CTRL_TERMINATE | VIA_REG_CTRL_RESET,
566               VIADEV_REG(viadev, OFFSET_CONTROL));               VIADEV_REG(viadev, OFFSET_CONTROL));
567            inb(VIADEV_REG(viadev, OFFSET_CONTROL));
568          udelay(50);          udelay(50);
569          /* disable interrupts */          /* disable interrupts */
570          outb(0x00, VIADEV_REG(viadev, OFFSET_CONTROL));          outb(0x00, VIADEV_REG(viadev, OFFSET_CONTROL));
# Line 885  static int snd_via8233_playback_prepare( Line 886  static int snd_via8233_playback_prepare(
886                  snd_ac97_set_rate(chip->ac97, AC97_PCM_LFE_DAC_RATE, runtime->rate);                  snd_ac97_set_rate(chip->ac97, AC97_PCM_LFE_DAC_RATE, runtime->rate);
887                  snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate);                  snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate);
888          }          }
889          if (chip->chip_type == TYPE_VIA8233A)          if (chip->revision == VIA_REV_8233A)
890                  rbits = 0;                  rbits = 0;
891          else          else
892                  rbits = (0xfffff / 48000) * runtime->rate + ((0xfffff % 48000) * runtime->rate) / 48000;                  rbits = (0xfffff / 48000) * runtime->rate + ((0xfffff % 48000) * runtime->rate) / 48000;
# Line 927  static int snd_via8233_multi_prepare(snd Line 928  static int snd_via8233_multi_prepare(snd
928          fmt = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? VIA_REG_MULTPLAY_FMT_16BIT : VIA_REG_MULTPLAY_FMT_8BIT;          fmt = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? VIA_REG_MULTPLAY_FMT_16BIT : VIA_REG_MULTPLAY_FMT_8BIT;
929          fmt |= runtime->channels << 4;          fmt |= runtime->channels << 4;
930          outb(fmt, VIADEV_REG(viadev, OFS_MULTPLAY_FORMAT));          outb(fmt, VIADEV_REG(viadev, OFS_MULTPLAY_FORMAT));
931          if (chip->chip_type == TYPE_VIA8233A)          if (chip->revision == VIA_REV_8233A)
932                  slots = 0;                  slots = 0;
933          else {          else {
934                  /* set sample number to slot 3, 4, 7, 8, 6, 9 (for VIA8233/C,8235) */                  /* set sample number to slot 3, 4, 7, 8, 6, 9 (for VIA8233/C,8235) */
# Line 1107  static int snd_via8233_multi_open(snd_pc Line 1108  static int snd_via8233_multi_open(snd_pc
1108          if ((err = snd_via82xx_pcm_open(chip, viadev, substream)) < 0)          if ((err = snd_via82xx_pcm_open(chip, viadev, substream)) < 0)
1109                  return err;                  return err;
1110          substream->runtime->hw.channels_max = 6;          substream->runtime->hw.channels_max = 6;
1111          if (chip->chip_type == TYPE_VIA8233A)          if (chip->revision == VIA_REV_8233A)
1112                  snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels);                  snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels);
1113          return 0;          return 0;
1114  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26