Commit ac0779bb authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

AC97 Codec Core,Intel8x0 driver,Intel8x0-modem driver
Fixed the detection of sample rates with no VRA support.

- Changed ac97bus->vra to ac97bus->no_vra to indicate the VRA is NOT
  supported.
- In the case of no_vra=1, only 48k is set as the possible rates in
  snd_ac97_pcm_assign().
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 882a3ff4
......@@ -423,7 +423,7 @@ struct _snd_ac97_bus {
/* --- */
snd_card_t *card;
unsigned short num; /* bus number */
unsigned short vra: 1, /* bridge supports VRA */
unsigned short no_vra: 1, /* bridge doesn't support VRA */
isdin: 1;/* independent SDIN */
unsigned int clock; /* AC'97 base clock (usually 48000Hz) */
spinlock_t bus_lock; /* used mainly for slot allocation */
......
......@@ -487,7 +487,10 @@ int snd_ac97_pcm_assign(ac97_bus_t *bus,
rpcm->r[0].rslots[j] = tmp;
rpcm->r[0].codec[j] = bus->codec[j];
rpcm->r[0].rate_table[j] = rate_table[pcm->stream][j];
rates = get_rates(rpcm, j, tmp, 0);
if (bus->no_vra)
rates = SNDRV_PCM_RATE_48000;
else
rates = get_rates(rpcm, j, tmp, 0);
if (pcm->exclusive)
avail_slots[pcm->stream][j] &= ~tmp;
}
......
......@@ -1920,8 +1920,8 @@ static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock, int ac
if (ac97_clock >= 8000 && ac97_clock <= 48000)
pbus->clock = ac97_clock;
/* FIXME: my test board doesn't work well with VRA... */
if (chip->device_type != DEVICE_ALI)
pbus->vra = 1;
if (chip->device_type == DEVICE_ALI)
pbus->no_vra = 1;
chip->ac97_bus = pbus;
ac97.pci = chip->pci;
......
......@@ -903,7 +903,6 @@ static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock)
pbus->private_free = snd_intel8x0_mixer_free_ac97_bus;
if (ac97_clock >= 8000 && ac97_clock <= 48000)
pbus->clock = ac97_clock;
pbus->vra = 1;
chip->ac97_bus = pbus;
ac97.pci = chip->pci;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment