From: Takashi Iwai <tiwai@suse.de>
To: Jeremy Hall <jhall@maoz.com>
Cc: Thomas Charbonnel <thomas@undata.org>, alsa-devel@lists.sourceforge.net
Subject: Re: Intel8x0 problems with rc1
Date: Wed, 03 Dec 2003 17:45:48 +0100 [thread overview]
Message-ID: <s5hptf5c0jn.wl@alsa2.suse.de> (raw)
In-Reply-To: <200312031641.hB3GfNNd012052@sith.maoz.com>
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
At Wed, 3 Dec 2003 11:41:23 -0500 (EST),
Jeremy Hall wrote:
>
> there also appears to be a delay of upwards of 2 seconds before it starts
> playing
>
> but I don't have anything more in my logs.
you're using the cvs version, right?
then apply the patch below.
Takashi
[-- Attachment #2: Type: text/plain, Size: 3015 bytes --]
Index: alsa-kernel/pci/ac97/ac97_pcm.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_pcm.c,v
retrieving revision 1.8
diff -u -r1.8 ac97_pcm.c
--- alsa-kernel/pci/ac97/ac97_pcm.c 3 Dec 2003 13:37:25 -0000 1.8
+++ alsa-kernel/pci/ac97/ac97_pcm.c 3 Dec 2003 15:58:24 -0000
@@ -418,16 +418,19 @@
continue;
avail_slots[0][i] = get_pslots(codec, &rate_table[0][i]);
avail_slots[1][i] = get_cslots(codec);
+ printk(KERN_DEBUG "checking codec %d, slots = 0x%x / 0x%x\n", i, avail_slots[0][i], avail_slots[1][i]);
if (!(codec->scaps & AC97_SCAP_INDEP_SDIN)) {
for (j = 0; j < i; j++) {
if (bus->codec[j])
avail_slots[1][i] &= ~avail_slots[1][j];
}
+ printk(KERN_DEBUG "-> capture slots = 0x%x\n", avail_slots[1][i]);
}
}
/* FIXME: add double rate allocation */
/* first step - exclusive devices */
for (i = 0; i < pcms_count; i++) {
+ printk(KERN_DEBUG "probing pcm %d\n", i);
pcm = &pcms[i];
rpcm = &rpcms[i];
/* low-level driver thinks that it's more clever */
@@ -445,19 +448,23 @@
for (j = 0; j < 4 && slots; j++) {
if (!bus->codec[j])
continue;
+ printk(KERN_DEBUG ".. probing codec %d, slots = 0x%x\n", j, slots);
rates = ~0;
if (pcm->exclusive) {
/* exclusive access */
tmp = avail_slots[pcm->stream][j] & slots;
+ printk(KERN_DEBUG ".. tmp = 0x%x\n", tmp);
for (k = 0; k < i; k++) {
if (rpcm->stream == rpcms[k].stream)
tmp &= ~rpcms[k].r[0].rslots[j];
}
+ printk(KERN_DEBUG ".. tmp = 0x%x\n", tmp);
if (tmp) {
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);
+ printk(KERN_DEBUG ".. rslots = 0x%x, rate_table = %d, rates = 0x%x\n", tmp, rpcm->r[0].rate_table[j], rates);
avail_slots[pcm->stream][j] &= ~tmp;
}
} else {
@@ -476,6 +483,7 @@
}
if (rpcm->rates == ~0)
rpcm->rates = 0; /* not used */
+ printk(KERN_DEBUG "--> slots = 0x%x, rates = 0x%x\n", rpcm->r[0].slots, rpcm->rates);
}
bus->pcms_count = pcms_count;
bus->pcms = rpcms;
@@ -500,6 +508,7 @@
unsigned char reg;
int err = 0;
+ printk(KERN_DEBUG "ac97_pcm_open: rate = %d, cfg = %d, slots = 0x%x\n", rate, cfg, slots);
if (rate > 48000) /* FIXME: add support for double rate */
return -EINVAL;
bus = pcm->bus;
@@ -548,9 +557,10 @@
}
if (reg_ok & (1 << (reg - AC97_PCM_FRONT_DAC_RATE)))
continue;
+ printk(KERN_DEBUG "setting ac97 reg 0x%x to rate %d\n", reg, rate);
err = snd_ac97_set_rate(pcm->r[r].codec[cidx], reg, rate);
if (err < 0)
- snd_printk(KERN_ERR "error in snd_ac97_set_rate: cidx=%d, reg=0x%x, rate=%d\n, err=%d", cidx, reg, rate, err);
+ snd_printk(KERN_ERR "error in snd_ac97_set_rate: cidx=%d, reg=0x%x, rate=%d, err=%d\n", cidx, reg, rate, err);
else
reg_ok |= (1 << (reg - AC97_PCM_FRONT_DAC_RATE));
}
next prev parent reply other threads:[~2003-12-03 16:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-01 18:15 Intel8x0 problems with rc1 Thomas Charbonnel
2003-12-01 18:30 ` Takashi Iwai
2003-12-01 18:50 ` Takashi Iwai
2003-12-02 12:00 ` Thomas Charbonnel
2003-12-02 12:12 ` Takashi Iwai
2003-12-02 13:57 ` Thomas Charbonnel
2003-12-02 15:50 ` Takashi Iwai
2003-12-02 22:46 ` Thomas Charbonnel
2003-12-03 13:48 ` Takashi Iwai
2003-12-03 14:47 ` Thomas Charbonnel
2003-12-03 16:00 ` Takashi Iwai
2003-12-03 16:41 ` Jeremy Hall
2003-12-03 16:45 ` Takashi Iwai [this message]
2003-12-03 16:54 ` Jeremy Hall
2003-12-03 17:17 ` Thomas Charbonnel
2003-12-01 19:09 ` Thomas Charbonnel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hptf5c0jn.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=jhall@maoz.com \
--cc=thomas@undata.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox