All of lore.kernel.org
 help / color / mirror / Atom feed
* Intel8x0 problems with rc1
@ 2003-12-01 18:15 Thomas Charbonnel
  2003-12-01 18:30 ` Takashi Iwai
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Charbonnel @ 2003-12-01 18:15 UTC (permalink / raw)
  To: alsa-devel

Hi,

I'm testing rc1, and I have problems with my laptop's internal intel8x0
soundcard :
* Using OSS emulation, after between 19 and 20 seconds of playing the
sound gets garbled for a few seconds and then comes back to normal. This
happens each time I stop and start playback again.
* Using alsa natively there is a performance problem : running jack with 
the card (-p 1024) I get 3 or 4 xruns per second (I used to run this 
card with -p 64 with previous alsa versions !). With -p 4096 I get c.a. 
1 xrun/second, so there seems to be a constant ratio, like 1 xrun every 
10 buffers.

No problem in the same conditions using the hdsp.

Thomas





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  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-01 19:09   ` Thomas Charbonnel
  0 siblings, 2 replies; 16+ messages in thread
From: Takashi Iwai @ 2003-12-01 18:30 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel

At Mon, 01 Dec 2003 19:15:59 +0100,
Thomas Charbonnel wrote:
> 
> Hi,
> 
> I'm testing rc1, and I have problems with my laptop's internal intel8x0
> soundcard :
> * Using OSS emulation, after between 19 and 20 seconds of playing the
> sound gets garbled for a few seconds and then comes back to normal. This
> happens each time I stop and start playback again.
> * Using alsa natively there is a performance problem : running jack with 
> the card (-p 1024) I get 3 or 4 xruns per second (I used to run this 
> card with -p 64 with previous alsa versions !).

could you give the specific version which ran properly?


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-01 18:30 ` Takashi Iwai
@ 2003-12-01 18:50   ` Takashi Iwai
  2003-12-02 12:00     ` Thomas Charbonnel
  2003-12-01 19:09   ` Thomas Charbonnel
  1 sibling, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2003-12-01 18:50 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

At Mon, 01 Dec 2003 19:30:07 +0100,
I wrote:
> 
> At Mon, 01 Dec 2003 19:15:59 +0100,
> Thomas Charbonnel wrote:
> > 
> > Hi,
> > 
> > I'm testing rc1, and I have problems with my laptop's internal intel8x0
> > soundcard :
> > * Using OSS emulation, after between 19 and 20 seconds of playing the
> > sound gets garbled for a few seconds and then comes back to normal. This
> > happens each time I stop and start playback again.
> > * Using alsa natively there is a performance problem : running jack with 
> > the card (-p 1024) I get 3 or 4 xruns per second (I used to run this 
> > card with -p 64 with previous alsa versions !).
> 
> could you give the specific version which ran properly?

does the attached patch make difference (if you give use_civ=0 option)
?


Takashi

[-- Attachment #2: Type: text/plain, Size: 1939 bytes --]

Index: alsa-kernel/pci/intel8x0.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/intel8x0.c,v
retrieving revision 1.102
diff -u -r1.102 intel8x0.c
--- alsa-kernel/pci/intel8x0.c	20 Nov 2003 15:57:50 -0000	1.102
+++ alsa-kernel/pci/intel8x0.c	1 Dec 2003 18:48:41 -0000
@@ -75,6 +75,7 @@
 #ifdef SUPPORT_MIDI
 static int mpu_port[SNDRV_CARDS]; /* disabled */
 #endif
+static int use_civ[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
 
 MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(index, "Index value for Intel i8x0 soundcard.");
@@ -98,6 +99,9 @@
 MODULE_PARM_DESC(mpu_port, "MPU401 port # for Intel i8x0 driver.");
 MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0},{0x330},{0x300}},dialog:list");
 #endif
+MODULE_PARM(use_civ, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(use_civ, "Read CIV register for updating the stream position.");
+MODULE_PARM_SYNTAX(use_civ, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
 
 /*
  *  Direct registers
@@ -401,6 +405,7 @@
 	    smp20bit: 1;
 	int in_ac97_init: 1,
 	    in_sdin_init: 1;
+	int use_civ: 1;
 
 	ac97_bus_t *ac97_bus;
 	ac97_t *ac97[3];
@@ -728,9 +733,10 @@
 static inline void snd_intel8x0_update(intel8x0_t *chip, ichdev_t *ichdev)
 {
 	unsigned long port = ichdev->reg_offset;
-	int civ, i, step;
+	int civ, i, step = 1;
 	int ack = 0;
 
+	if (chip->use_civ) {
 	civ = igetbyte(chip, port + ICH_REG_OFF_CIV);
 	if (civ == ichdev->civ) {
 		// snd_printd("civ same %d\n", civ);
@@ -745,6 +751,7 @@
 		//	snd_printd("step = %d, %d -> %d\n", step, ichdev->civ, civ);
 		ichdev->civ = civ;
 	}
+	}
 
 	ichdev->position += step * ichdev->fragsize1;
 	ichdev->position %= ichdev->size;
@@ -2546,6 +2553,8 @@
 	} else
 		mpu_port[dev] = 0;
 
+	chip->use_civ = use_civ[dev];
+
 	sprintf(card->longname, "%s at 0x%lx, irq %i",
 		card->shortname, chip->addr, chip->irq);
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-01 18:30 ` Takashi Iwai
  2003-12-01 18:50   ` Takashi Iwai
@ 2003-12-01 19:09   ` Thomas Charbonnel
  1 sibling, 0 replies; 16+ messages in thread
From: Thomas Charbonnel @ 2003-12-01 19:09 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai a écrit :
> At Mon, 01 Dec 2003 19:15:59 +0100,
> Thomas Charbonnel wrote:
> 
>>Hi,
>>
>>I'm testing rc1, and I have problems with my laptop's internal intel8x0
>>soundcard :
>>* Using OSS emulation, after between 19 and 20 seconds of playing the
>>sound gets garbled for a few seconds and then comes back to normal. This
>>happens each time I stop and start playback again.
>>* Using alsa natively there is a performance problem : running jack with 
>>the card (-p 1024) I get 3 or 4 xruns per second (I used to run this 
>>card with -p 64 with previous alsa versions !).
> 
> 
> could you give the specific version which ran properly?
> 

0.9.8 did run ok.

Thomas





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-01 18:50   ` Takashi Iwai
@ 2003-12-02 12:00     ` Thomas Charbonnel
  2003-12-02 12:12       ` Takashi Iwai
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Charbonnel @ 2003-12-02 12:00 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote :
> At Mon, 01 Dec 2003 19:30:07 +0100,
> I wrote:
> 
>>At Mon, 01 Dec 2003 19:15:59 +0100,
>>Thomas Charbonnel wrote:
>>
>>>Hi,
>>>
>>>I'm testing rc1, and I have problems with my laptop's internal intel8x0
>>>soundcard :
>>>* Using OSS emulation, after between 19 and 20 seconds of playing the
>>>sound gets garbled for a few seconds and then comes back to normal. This
>>>happens each time I stop and start playback again.
>>>* Using alsa natively there is a performance problem : running jack with 
>>>the card (-p 1024) I get 3 or 4 xruns per second (I used to run this 
>>>card with -p 64 with previous alsa versions !).
>>
>>could you give the specific version which ran properly?
> 
> 
> does the attached patch make difference (if you give use_civ=0 option)
> ?
> 

Sorry, it does not make a difference. Incidentally I tried to run the 
card at 48000 Hz, and everything works as expected. Running at 44100 Hz 
results in the problems I mentioned above.

Thomas




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-02 12:00     ` Thomas Charbonnel
@ 2003-12-02 12:12       ` Takashi Iwai
  2003-12-02 13:57         ` Thomas Charbonnel
  0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2003-12-02 12:12 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel

At Tue, 02 Dec 2003 13:00:04 +0100,
Thomas Charbonnel wrote:
> 
> Takashi Iwai wrote :
> > At Mon, 01 Dec 2003 19:30:07 +0100,
> > I wrote:
> > 
> >>At Mon, 01 Dec 2003 19:15:59 +0100,
> >>Thomas Charbonnel wrote:
> >>
> >>>Hi,
> >>>
> >>>I'm testing rc1, and I have problems with my laptop's internal intel8x0
> >>>soundcard :
> >>>* Using OSS emulation, after between 19 and 20 seconds of playing the
> >>>sound gets garbled for a few seconds and then comes back to normal. This
> >>>happens each time I stop and start playback again.
> >>>* Using alsa natively there is a performance problem : running jack with 
> >>>the card (-p 1024) I get 3 or 4 xruns per second (I used to run this 
> >>>card with -p 64 with previous alsa versions !).
> >>
> >>could you give the specific version which ran properly?
> > 
> > 
> > does the attached patch make difference (if you give use_civ=0 option)
> > ?
> > 
> 
> Sorry, it does not make a difference. Incidentally I tried to run the 
> card at 48000 Hz, and everything works as expected. Running at 44100 Hz 
> results in the problems I mentioned above.

ok, then please check /proc/asound/card0/codec97#0/* files whether VRA
is properly set to 44100Hz during the playback.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-02 12:12       ` Takashi Iwai
@ 2003-12-02 13:57         ` Thomas Charbonnel
  2003-12-02 15:50           ` Takashi Iwai
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Charbonnel @ 2003-12-02 13:57 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote :

> ok, then please check /proc/asound/card0/codec97#0/* files whether VRA
> is properly set to 44100Hz during the playback.
> 
> 
> Takashi
> 
> 

Bingo, it seems it's not, indeed :

thomas@satellite thomas $ cat /proc/asound/card0/codec97#0/*
0-0/0: Cirrus Logic CS4299 rev 4

Capabilities     : -headphone out-
DAC resolution   : 20-bit
ADC resolution   : 18-bit
3D enhancement   : Crystal Semi 3D Stereo Enhancement

Current setup
Mic gain         : +0dB [+0dB]
POP path         : pre 3D
Sim. stereo      : off
3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1
ADC/DAC loopback : off
Extended ID      : codec=0 rev=0 AMAP DSA=0 VRA
Extended status  : VRA
PCM front DAC    : 48000Hz
PCM ADC          : 44100Hz
SPDIF Control    : Consumer PCM Copyright Category=0x22 Generation=1 
Rate=48kHz

Thomas




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-02 13:57         ` Thomas Charbonnel
@ 2003-12-02 15:50           ` Takashi Iwai
  2003-12-02 22:46             ` Thomas Charbonnel
  0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2003-12-02 15:50 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

At Tue, 02 Dec 2003 14:57:29 +0100,
Thomas Charbonnel wrote:
> 
> Takashi Iwai wrote :
> 
> > ok, then please check /proc/asound/card0/codec97#0/* files whether VRA
> > is properly set to 44100Hz during the playback.
> > 
> > 
> > Takashi
> > 
> > 
> 
> Bingo, it seems it's not, indeed :

please try the attached patch.
possibly this isn't a fix, but it will print debug messages while
probing and opening the pcm.


Takashi

[-- Attachment #2: Type: text/plain, Size: 8128 bytes --]

Index: alsa-kernel/include/ac97_codec.h
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/include/ac97_codec.h,v
retrieving revision 1.35
diff -u -r1.35 ac97_codec.h
--- alsa-kernel/include/ac97_codec.h	20 Nov 2003 15:57:50 -0000	1.35
+++ alsa-kernel/include/ac97_codec.h	2 Dec 2003 15:38:37 -0000
@@ -345,7 +345,8 @@
 	ac97_bus_t *bus;
 	unsigned int stream: 1,	   	   /* stream type: 1 = capture */
 		     exclusive: 1,	   /* exclusive mode, don't override with other pcms */
-		     copy_flag: 1;	   /* lowlevel driver must fill all entries */
+		     copy_flag: 1,	   /* lowlevel driver must fill all entries */
+		     spdif: 1;		   /* spdif pcm */
 	unsigned short aslots;		   /* active slots */
 	unsigned int rates;		   /* available rates */
 	struct {
Index: alsa-kernel/pci/intel8x0.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/intel8x0.c,v
retrieving revision 1.102
diff -u -r1.102 intel8x0.c
--- alsa-kernel/pci/intel8x0.c	20 Nov 2003 15:57:50 -0000	1.102
+++ alsa-kernel/pci/intel8x0.c	2 Dec 2003 15:39:03 -0000
@@ -886,6 +886,7 @@
 static int snd_intel8x0_hw_params(snd_pcm_substream_t * substream,
 				  snd_pcm_hw_params_t * hw_params)
 {
+	intel8x0_t *chip = snd_pcm_substream_chip(substream);
 	ichdev_t *ichdev = get_ichdev(substream);
 	int err;
 
@@ -899,8 +900,12 @@
 	err = snd_ac97_pcm_open(ichdev->pcm, params_rate(hw_params),
 				params_channels(hw_params),
 				ichdev->pcm->r[0].slots);
-	if (err >= 0)
+	if (err >= 0) {
 		ichdev->pcm_open_flag = 1;
+		/* FIXME: hack to enable spdif support */
+		if (ichdev->ichd == ICHD_PCMOUT && chip->device_type == DEVICE_SIS)
+			snd_ac97_set_rate(ichdev->pcm->r[0].codec[0], AC97_SPDIF, params_rate(hw_params));
+	}
 	return err;
 }
 
@@ -963,9 +968,6 @@
 		snd_intel8x0_setup_multi_channels(chip, runtime->channels);
 		spin_unlock(&chip->reg_lock);
 	}
-	/* FIXME: hack to enable spdif support */
-	if (ichdev->ichd == ICHD_PCMOUT && chip->device_type == DEVICE_SIS)
-		snd_ac97_set_rate(ichdev->pcm->r[0].codec[0], AC97_SPDIF, runtime->rate);
 	snd_intel8x0_setup_periods(chip, ichdev);
 	return 0;
 }
@@ -1590,6 +1592,7 @@
 	/* S/PDIF PCM */
 	{
 		.exclusive = 1,
+		.spdif = 1,
 		.r = {	{
 				.slots = (1 << AC97_SLOT_SPDIF_LEFT2) |
 					 (1 << AC97_SLOT_SPDIF_RIGHT2)
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.7
diff -u -r1.7 ac97_pcm.c
--- alsa-kernel/pci/ac97/ac97_pcm.c	1 Dec 2003 12:52:48 -0000	1.7
+++ alsa-kernel/pci/ac97/ac97_pcm.c	2 Dec 2003 15:44:16 -0000
@@ -165,6 +165,8 @@
 		return 0xff;
 	if (slot > 11)
 		return 0xff;
+	if (pcm->spdif)
+		return AC97_SPDIF; /* pseudo register */
 	if (pcm->stream == SNDRV_PCM_STREAM_PLAYBACK)
 		return rate_reg_tables[dbl][pcm->r[dbl].rate_table[cidx]][slot - 3];
 	else
@@ -230,6 +232,8 @@
  * AC97_PCM_FRONT_DAC_RATE, AC97_PCM_LR_ADC_RATE.
  * AC97_PCM_SURR_DAC_RATE and AC97_PCM_LFE_DAC_RATE are accepted
  * if the codec supports them.
+ * AC97_SPDIF is accepted as a pseudo register to modify the SPDIF
+ * status bits.
  *
  * Returns zero if successful, or a negative error code on failure.
  */
@@ -257,6 +261,9 @@
 		if (! (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC))
 			return -EINVAL;
 		break;
+	case AC97_SPDIF:
+		/* special case */
+		return set_spdif_rate(ac97, rate);
 	default:
 		return -EINVAL;
 	}
@@ -350,8 +357,7 @@
 	if (!ac97_is_audio(ac97))
 		return 0;
 	slots = (1<<AC97_SLOT_PCM_LEFT)|(1<<AC97_SLOT_PCM_RIGHT);
-	if (ac97->ext_id & AC97_EI_VRM)
-		slots |= (1<<AC97_SLOT_MIC);
+	slots |= (1<<AC97_SLOT_MIC);
 	return slots;
 }
 
@@ -412,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 */
@@ -431,6 +440,7 @@
 		}
 		rpcm->stream = pcm->stream;
 		rpcm->exclusive = pcm->exclusive;
+		rpcm->spdif = pcm->spdif;
 		rpcm->private_value = pcm->private_value;
 		rpcm->bus = bus;
 		rpcm->rates = ~0;
@@ -438,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 {
@@ -467,6 +481,7 @@
 			rpcm->r[0].slots |= tmp;
 			rpcm->rates &= rates;
 		}
+		printk(KERN_DEBUG "--> slots = 0x%x, rates = 0x%x\n", rpcm->r[0].slots, rpcm->rates);
 	}
 	bus->pcms_count = pcms_count;
 	bus->pcms = rpcms;
@@ -487,9 +502,11 @@
 {
 	ac97_bus_t *bus;
 	int i, cidx, r = 0, ok_flag;
-	unsigned short reg_ok = 0, reg_ok_new;
+	unsigned int reg_ok = 0;
 	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;
@@ -506,27 +523,23 @@
 	for (i = 3; i < 12; i++) {
 		if (!(slots & (1 << i)))
 			continue;
-		for (cidx = 0; cidx < 4; cidx++)
+		ok_flag = 0;
+		for (cidx = 0; cidx < 4; cidx++) {
 			if (bus->used_slots[pcm->stream][cidx] & (1 << i)) {
 				spin_unlock_irq(&pcm->bus->bus_lock);
-				return -EBUSY;
+				err = -EBUSY;
+				goto error;
 			}
-	}
-	for (i = 3; i < 12; i++) {
-		if (!(slots & (1 << i)))
-			continue;
-		ok_flag = 0;
-		for (cidx = 0; cidx < 4; cidx++)
 			if (pcm->r[r].rslots[cidx] & (1 << i)) {
 				bus->used_slots[pcm->stream][cidx] |= (1 << i);
 				ok_flag++;
 			}
+		}
 		if (!ok_flag) {
 			spin_unlock_irq(&pcm->bus->bus_lock);
 			snd_printk(KERN_ERR "cannot find configuration for AC97 slot %i\n", i);
-			pcm->aslots = slots;
-			snd_ac97_pcm_close(pcm);
-			return -EAGAIN;
+			err = -EAGAIN;
+			goto error;
 		}
 	}
 	spin_unlock_irq(&pcm->bus->bus_lock);
@@ -534,23 +547,29 @@
 		if (!(slots & (1 << i)))
 			continue;
 		for (cidx = 0; cidx < 4; cidx++) {
-			reg_ok_new = 0;
 			if (pcm->r[r].rslots[cidx] & (1 << i)) {
-				reg = get_slot_reg(pcm, cidx, i, 0);
+				reg = get_slot_reg(pcm, cidx, i, r);
 				if (reg == 0xff) {
 					snd_printk(KERN_ERR "invalid AC97 slot %i?\n", i);
 					continue;
 				}
 				if (reg_ok & (1 << (reg - AC97_PCM_FRONT_DAC_RATE)))
 					continue;
-				snd_ac97_set_rate(pcm->r[r].codec[cidx], reg, rate);
-				reg_ok_new |= (1 << (reg - AC97_PCM_FRONT_DAC_RATE));
+				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);
+				reg_ok |= (1 << (reg - AC97_PCM_FRONT_DAC_RATE));
 			}
-			reg_ok |= reg_ok_new;
 		}
 	}
 	pcm->aslots = slots;
 	return 0;
+
+ error:
+	pcm->aslots = slots;
+	snd_ac97_pcm_close(pcm);
+	return err;
 }
 
 /**

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-02 15:50           ` Takashi Iwai
@ 2003-12-02 22:46             ` Thomas Charbonnel
  2003-12-03 13:48               ` Takashi Iwai
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Charbonnel @ 2003-12-02 22:46 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote :
> please try the attached patch.
> possibly this isn't a fix, but it will print debug messages while
> probing and opening the pcm.
> 
> 
> Takashi
> 

Takashi, I applied your patch but nothings shows up in my logs.
I even replaced all the KERN_DEBUG by KERN_EMERG, and still nothing.
The only thing I get is this :
ALSA intel8x0.c:568: codec_semaphore: semaphore is not ready [0x1][0x300100]
ALSA intel8x0.c:599: codec_read 0: semaphore is not ready for register 0x56
Is it possible that your code never gets called ? You seem also to be 
investigating about spdif, but my card does not have spdif output.

Thomas




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-02 22:46             ` Thomas Charbonnel
@ 2003-12-03 13:48               ` Takashi Iwai
  2003-12-03 14:47                 ` Thomas Charbonnel
  0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2003-12-03 13:48 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel

At Tue, 02 Dec 2003 23:46:22 +0100,
Thomas Charbonnel wrote:
> 
> Takashi Iwai wrote :
> > please try the attached patch.
> > possibly this isn't a fix, but it will print debug messages while
> > probing and opening the pcm.
> > 
> > 
> > Takashi
> > 
> 
> Takashi, I applied your patch but nothings shows up in my logs.
> I even replaced all the KERN_DEBUG by KERN_EMERG, and still nothing.
> The only thing I get is this :
> ALSA intel8x0.c:568: codec_semaphore: semaphore is not ready [0x1][0x300100]
> ALSA intel8x0.c:599: codec_read 0: semaphore is not ready for register 0x56

and the driver still works somehow?

> Is it possible that your code never gets called ?

if the driver works, it must not happen.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-03 13:48               ` Takashi Iwai
@ 2003-12-03 14:47                 ` Thomas Charbonnel
  2003-12-03 16:00                   ` Takashi Iwai
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Charbonnel @ 2003-12-03 14:47 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote :

>>Takashi, I applied your patch but nothings shows up in my logs.
>>I even replaced all the KERN_DEBUG by KERN_EMERG, and still nothing.
>>The only thing I get is this :
>>ALSA intel8x0.c:568: codec_semaphore: semaphore is not ready [0x1][0x300100]
>>ALSA intel8x0.c:599: codec_read 0: semaphore is not ready for register 0x56
> 
> 
> and the driver still works somehow?
> 
> 
>>Is it possible that your code never gets called ?
> 
> 
> if the driver works, it must not happen.
> 
> 
> Takashi

Ok, my fault, sorry Takashi, I stupidly reloaded only the snd-intel8x0 
module and forgot snd-ac97-codec, here's the log :

ac97_pcm_open: rate = 48000, cfg = 2, slots = 0x198
setting ac97 reg 0x2c to rate 48000
setting ac97 reg 0x2e to rate 48000
ALSA ../../alsa-kernel/pci/ac97/ac97_pcm.c:561: error in 
snd_ac97_set_rate: cidx=0, reg=0x2e, rate=48000
, err=-22<0>ac97_pcm_open: rate = 48000, cfg = 2, slots = 0x198

(The file's rate was 44100 kHz)

Thomas




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-03 14:47                 ` Thomas Charbonnel
@ 2003-12-03 16:00                   ` Takashi Iwai
  2003-12-03 16:41                     ` Jeremy Hall
  2003-12-03 17:17                     ` Thomas Charbonnel
  0 siblings, 2 replies; 16+ messages in thread
From: Takashi Iwai @ 2003-12-03 16:00 UTC (permalink / raw)
  To: Thomas Charbonnel; +Cc: alsa-devel

At Wed, 03 Dec 2003 15:47:23 +0100,
Thomas Charbonnel wrote:
> 
> Takashi Iwai wrote :
> 
> >>Takashi, I applied your patch but nothings shows up in my logs.
> >>I even replaced all the KERN_DEBUG by KERN_EMERG, and still nothing.
> >>The only thing I get is this :
> >>ALSA intel8x0.c:568: codec_semaphore: semaphore is not ready [0x1][0x300100]
> >>ALSA intel8x0.c:599: codec_read 0: semaphore is not ready for register 0x56
> > 
> > 
> > and the driver still works somehow?
> > 
> > 
> >>Is it possible that your code never gets called ?
> > 
> > 
> > if the driver works, it must not happen.
> > 
> > 
> > Takashi
> 
> Ok, my fault, sorry Takashi, I stupidly reloaded only the snd-intel8x0 
> module and forgot snd-ac97-codec, here's the log :
> 
> ac97_pcm_open: rate = 48000, cfg = 2, slots = 0x198
> setting ac97 reg 0x2c to rate 48000
> setting ac97 reg 0x2e to rate 48000
> ALSA ../../alsa-kernel/pci/ac97/ac97_pcm.c:561: error in 
> snd_ac97_set_rate: cidx=0, reg=0x2e, rate=48000
> , err=-22<0>ac97_pcm_open: rate = 48000, cfg = 2, slots = 0x198
> 
> (The file's rate was 44100 kHz)

didn't you get any messages before this?
it should be something like

checking codec 0, slot = 0xxx / 0xxx
probing pcm 0
  ....


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-03 16:00                   ` Takashi Iwai
@ 2003-12-03 16:41                     ` Jeremy Hall
  2003-12-03 16:45                       ` Takashi Iwai
  2003-12-03 17:17                     ` Thomas Charbonnel
  1 sibling, 1 reply; 16+ messages in thread
From: Jeremy Hall @ 2003-12-03 16:41 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Thomas Charbonnel, alsa-devel

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.

_J

In the new year, Takashi Iwai wrote:
> At Wed, 03 Dec 2003 15:47:23 +0100,
> Thomas Charbonnel wrote:
> > 
> > Takashi Iwai wrote :
> > 
> > >>Takashi, I applied your patch but nothings shows up in my logs.
> > >>I even replaced all the KERN_DEBUG by KERN_EMERG, and still nothing.
> > >>The only thing I get is this :
> > >>ALSA intel8x0.c:568: codec_semaphore: semaphore is not ready [0x1][0x300100]
> > >>ALSA intel8x0.c:599: codec_read 0: semaphore is not ready for register 0x56
> > > 
> > > 
> > > and the driver still works somehow?
> > > 
> > > 
> > >>Is it possible that your code never gets called ?
> > > 
> > > 
> > > if the driver works, it must not happen.
> > > 
> > > 
> > > Takashi
> > 
> > Ok, my fault, sorry Takashi, I stupidly reloaded only the snd-intel8x0 
> > module and forgot snd-ac97-codec, here's the log :
> > 
> > ac97_pcm_open: rate = 48000, cfg = 2, slots = 0x198
> > setting ac97 reg 0x2c to rate 48000
> > setting ac97 reg 0x2e to rate 48000
> > ALSA ../../alsa-kernel/pci/ac97/ac97_pcm.c:561: error in 
> > snd_ac97_set_rate: cidx=0, reg=0x2e, rate=48000
> > , err=-22<0>ac97_pcm_open: rate = 48000, cfg = 2, slots = 0x198
> > 
> > (The file's rate was 44100 kHz)
> 
> didn't you get any messages before this?
> it should be something like
> 
> checking codec 0, slot = 0xxx / 0xxx
> probing pcm 0
>   ....
> 
> 
> Takashi
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-03 16:41                     ` Jeremy Hall
@ 2003-12-03 16:45                       ` Takashi Iwai
  2003-12-03 16:54                         ` Jeremy Hall
  0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2003-12-03 16:45 UTC (permalink / raw)
  To: Jeremy Hall; +Cc: Thomas Charbonnel, alsa-devel

[-- 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));
 			}

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-03 16:45                       ` Takashi Iwai
@ 2003-12-03 16:54                         ` Jeremy Hall
  0 siblings, 0 replies; 16+ messages in thread
From: Jeremy Hall @ 2003-12-03 16:54 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Jeremy Hall, Thomas Charbonnel, alsa-devel

ok, applying.

In the new year, Takashi Iwai wrote:
> 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

> 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));
>  			}



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Intel8x0 problems with rc1
  2003-12-03 16:00                   ` Takashi Iwai
  2003-12-03 16:41                     ` Jeremy Hall
@ 2003-12-03 17:17                     ` Thomas Charbonnel
  1 sibling, 0 replies; 16+ messages in thread
From: Thomas Charbonnel @ 2003-12-03 17:17 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai a écrit :
> At Wed, 03 Dec 2003 15:47:23 +0100,
> Thomas Charbonnel wrote:
> 
>>Takashi Iwai wrote :
>>
>>
>>>>Takashi, I applied your patch but nothings shows up in my logs.
>>>>I even replaced all the KERN_DEBUG by KERN_EMERG, and still nothing.
>>>>The only thing I get is this :
>>>>ALSA intel8x0.c:568: codec_semaphore: semaphore is not ready [0x1][0x300100]
>>>>ALSA intel8x0.c:599: codec_read 0: semaphore is not ready for register 0x56
>>>
>>>
>>>and the driver still works somehow?
>>>
>>>
>>>
>>>>Is it possible that your code never gets called ?
>>>
>>>
>>>if the driver works, it must not happen.
>>>
>>>
>>>Takashi
>>
>>Ok, my fault, sorry Takashi, I stupidly reloaded only the snd-intel8x0 
>>module and forgot snd-ac97-codec, here's the log :
>>
>>ac97_pcm_open: rate = 48000, cfg = 2, slots = 0x198
>>setting ac97 reg 0x2c to rate 48000
>>setting ac97 reg 0x2e to rate 48000
>>ALSA ../../alsa-kernel/pci/ac97/ac97_pcm.c:561: error in 
>>snd_ac97_set_rate: cidx=0, reg=0x2e, rate=48000
>>, err=-22<0>ac97_pcm_open: rate = 48000, cfg = 2, slots = 0x198
>>
>>(The file's rate was 44100 kHz)
> 
> 
> didn't you get any messages before this?
> it should be something like
> 
> checking codec 0, slot = 0xxx / 0xxx
> probing pcm 0
>   ....
> 
> 

Here it is :

PCI: Setting latency timer of device 00:1f.5 to 64
checking codec 0, slots = 0x198 / 0x58
-> capture slots = 0x58
probing pcm 0
.. probing codec 0, slots = 0x3d8
.. tmp = 0x198
.. tmp = 0x198
.. rslots = 0x198, rate_table = 0, rates = 0x0
--> slots = 0x198, rates = 0x0
probing pcm 1
.. probing codec 0, slots = 0x18
.. tmp = 0x18
.. tmp = 0x18
.. rslots = 0x18, rate_table = 0, rates = 0xfe
--> slots = 0x18, rates = 0xfe
probing pcm 2
.. probing codec 0, slots = 0x40
.. tmp = 0x40
.. tmp = 0x40
.. rslots = 0x40, rate_table = 0, rates = 0x80
--> slots = 0x40, rates = 0x80
intel8x0: clocking to 48000

Thomas





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-12-03 17:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2003-12-03 16:54                         ` Jeremy Hall
2003-12-03 17:17                     ` Thomas Charbonnel
2003-12-01 19:09   ` Thomas Charbonnel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.