Commit 87d0e556 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA update

  - fixed sscape driver Makefile
  - fixed spin deadlock in PCM midlevel
  - added AC'97 detection workaround to ens1370 and nm256 drivers
parent 808d65a3
......@@ -115,8 +115,7 @@ or
% aplay -Dspdif foo.wav
So far, only S16LE format is supported. Still no 24bit. Sorry, not
enough info for this.
24bit format is also supported experimentally.
The playback and capture over SPDIF use normal DAC and ADC,
respectively, so you cannot playback both analog and digital streams
......
/* include/version.h. Generated by configure. */
#define CONFIG_SND_VERSION "0.9.3c"
#define CONFIG_SND_DATE " (Tue May 20 20:42:52 2003 UTC)"
#define CONFIG_SND_DATE " (Wed May 21 16:40:34 2003 UTC)"
......@@ -1143,16 +1143,10 @@ static void snd_pcm_change_state(snd_pcm_substream_t *substream, int state)
snd_pcm_group_for_each(pos, substream) {
s = snd_pcm_group_substream_entry(pos);
if (s != substream)
spin_lock(&substream->self_group.lock);
}
snd_pcm_group_for_each(pos, substream) {
s = snd_pcm_group_substream_entry(pos);
spin_lock(&s->self_group.lock);
s->runtime->status->state = state;
}
snd_pcm_group_for_each(pos, substream) {
s = snd_pcm_group_substream_entry(pos);
if (s != substream)
spin_unlock(&substream->self_group.lock);
spin_unlock(&s->self_group.lock);
}
spin_unlock(&substream->group->lock);
} else {
......@@ -1517,7 +1511,7 @@ static int snd_pcm_unlink(snd_pcm_substream_t *substream)
relink_to_local(substream);
_end:
write_unlock_irq(&snd_pcm_link_rwlock);
return 0;
return res;
}
static int snd_pcm_hw_rule_mul(snd_pcm_hw_params_t *params,
......
......@@ -10,6 +10,7 @@ snd-dt019x-objs := dt019x.o
snd-es18xx-objs := es18xx.o
snd-opl3sa2-objs := opl3sa2.o
snd-sgalaxy-objs := sgalaxy.o
snd-sscape-objs := sscape.o
# Toplevel Module Dependency
obj-$(CONFIG_SND_ALS100) += snd-als100.o
......@@ -19,6 +20,7 @@ obj-$(CONFIG_SND_DT019X) += snd-dt019x.o
obj-$(CONFIG_SND_ES18XX) += snd-es18xx.o
obj-$(CONFIG_SND_OPL3SA2) += snd-opl3sa2.o
obj-$(CONFIG_SND_SGALAXY) += snd-sgalaxy.o
obj-$(CONFIG_SND_SSCAPE) += snd-sscape.o
obj-$(CONFIG_SND) += ad1816a/ ad1848/ cs423x/ es1688/ gus/ opti9xx/ \
sb/ wavefront/
......@@ -2068,7 +2068,7 @@ int snd_ac97_mixer(snd_card_t * card, ac97_t * _ac97, ac97_t ** rac97)
snd_assert(rac97 != NULL, return -EINVAL);
*rac97 = NULL;
snd_assert(card != NULL && _ac97 != NULL, return -EINVAL);
ac97 = snd_magic_kcalloc(ac97_t, 0, GFP_KERNEL);
ac97 = snd_magic_kmalloc(ac97_t, 0, GFP_KERNEL);
if (ac97 == NULL)
return -ENOMEM;
*ac97 = *_ac97;
......@@ -2102,14 +2102,16 @@ int snd_ac97_mixer(snd_card_t * card, ac97_t * _ac97, ac97_t ** rac97)
}
/* test for AC'97 */
/* test if we can write to the record gain volume register */
snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06);
if ((err = snd_ac97_read(ac97, AC97_REC_GAIN)) == 0x8a06) {
ac97->scaps |= AC97_SCAP_AUDIO;
ac97->caps = snd_ac97_read(ac97, AC97_RESET);
ac97->ext_id = snd_ac97_read(ac97, AC97_EXTENDED_ID);
if (ac97->ext_id == 0xffff) /* invalid combination */
ac97->ext_id = 0;
if (! (ac97->scaps & AC97_SCAP_AUDIO)) {
/* test if we can write to the record gain volume register */
snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06);
if ((err = snd_ac97_read(ac97, AC97_REC_GAIN)) == 0x8a06) {
ac97->scaps |= AC97_SCAP_AUDIO;
ac97->caps = snd_ac97_read(ac97, AC97_RESET);
ac97->ext_id = snd_ac97_read(ac97, AC97_EXTENDED_ID);
if (ac97->ext_id == 0xffff) /* invalid combination */
ac97->ext_id = 0;
}
}
/* test for MC'97 */
......
......@@ -367,17 +367,14 @@ int patch_ad1980(ac97_t * ac97)
int patch_alc650(ac97_t * ac97)
{
unsigned short val, nval;
unsigned short val;
int spdif = 0;
val = snd_ac97_read(ac97, AC97_ALC650_MULTICH);
snd_ac97_write(ac97, AC97_ALC650_MULTICH, val ^ 0x80);
nval = snd_ac97_read(ac97, AC97_ALC650_MULTICH);
/* FIXME: set the above 1 if we can detect the chip rev.E correctly.
* this is used for switching mic and center/lfe, which needs
* resetting GPIO0 level on the older revision.
*/
ac97->spec.dev_flags = 0;
if (val != nval) {
ac97->spec.dev_flags = 1; /* rev.E or later */
snd_ac97_write(ac97, AC97_ALC650_MULTICH, val); /* push back */
}
/* check spdif */
if (ac97->spec.dev_flags) {
......
......@@ -1514,6 +1514,7 @@ static int snd_ensoniq_1371_mixer(ensoniq_t * ensoniq)
ac97.read = snd_es1371_codec_read;
ac97.private_data = ensoniq;
ac97.private_free = snd_ensoniq_mixer_free_ac97;
ac97.scaps = AC97_SCAP_AUDIO;
if ((err = snd_ac97_mixer(card, &ac97, &ensoniq->u.es1371.ac97)) < 0)
return err;
for (idx = 0; es1371_spdif_present[idx].vid != (unsigned short)PCI_ANY_ID; idx++)
......
......@@ -1210,6 +1210,7 @@ snd_nm256_mixer(nm256_t *chip)
ac97.reset = snd_nm256_ac97_reset;
ac97.write = snd_nm256_ac97_write;
ac97.read = snd_nm256_ac97_read;
ac97.scaps = AC97_SCAP_AUDIO; /* we support audio! */
ac97.limited_regs = 1;
for (i = 0; mixer_regs[i] >= 0; i++)
set_bit(mixer_regs[i], ac97.reg_accessed);
......
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