public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] TEST of patch proposed for i810 audio
@ 2001-12-17 21:14 Samir Saidani
  0 siblings, 0 replies; 4+ messages in thread
From: Samir Saidani @ 2001-12-17 21:14 UTC (permalink / raw)
  To: linux-kernel

Salut,

I sum up the different thread about i810_audio
(i'm only a user testing this driver)

Doug Ledford : release 0.11 in his site
(http://people.redhat.com/dledford/i810_audio.c.gz)
don't work : cat /vmlinuz > /dev/dsp freezes the kernel,
no sound played
No possibility to Alt-SysRq


Nathan Bryant : patch for 0.11
not tested

Andris Pavenis : other patch for 0.11 (seems to be better)
not tested

Doug Ledford : patch for 0.11, 0.11 becomes 0.12
don't work, see 0.11


Andris Pavenis : patch for 0.12, 0.12 becomes 0.12a
don't work, see 0.11, one difference : sound played
and then freeze.


My system
---------
Kernel : 2.4.16
Debian unstable

++
Samir Saidani


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

* Re: [PATCH] TEST of patch proposed for i810 audio
@ 2001-12-26 23:01 Nathan Bryant
  2001-12-26 23:37 ` Nathan Bryant
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Bryant @ 2001-12-26 23:01 UTC (permalink / raw)
  To: saidani, dledford; +Cc: linux-kernel

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


maybe this patch will solve your problem, samir, maybe it won't; 
regardless, it should fix at least one corner case and is either 
obviously correct or start_*c is not ;-)

patch is against doug's 0.12.

[-- Attachment #2: new.diff --]
[-- Type: text/plain, Size: 794 bytes --]

--- i810_audio.c.12	Wed Dec 19 02:04:06 2001
+++ linux/drivers/sound/i810_audio.c	Wed Dec 26 17:31:22 2001
@@ -952,12 +952,12 @@
 	 * the CIV value to the next sg segment to be played so that when
 	 * we call start_{dac,adc}, things will operate properly
 	 */
-	if (!dmabuf->enable && dmabuf->trigger) {
-		if(rec && dmabuf->count != dmabuf->dmasize) {
+	if (!dmabuf->enable && dmabuf->trigger && dmabuf->ready) {
+		if(rec && dmabuf->count < dmabuf->dmasize) {
 			outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI);
 			__start_adc(state);
 			while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;
-		} else if(dmabuf->count) {
+		} else if(!rec && dmabuf->count) {
 			outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI);
 			__start_dac(state);
 			while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;

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

* Re: [PATCH] TEST of patch proposed for i810 audio
  2001-12-26 23:01 [PATCH] TEST of patch proposed for i810 audio Nathan Bryant
@ 2001-12-26 23:37 ` Nathan Bryant
  2001-12-27  5:35   ` Doug Ledford
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Bryant @ 2001-12-26 23:37 UTC (permalink / raw)
  To: saidani, dledford; +Cc: linux-kernel

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

Nathan Bryant wrote:

>
> maybe this patch will solve your problem, samir, maybe it won't; 
> regardless, it should fix at least one corner case and is either 
> obviously correct or start_*c is not ;-)
>
> patch is against doug's 0.12.

[snip]

attached is a slightly more anal retentive version of my previous patch. 
as in the previous patch, the goal is to make update_lvi completely 
self-contained, ie resistant to changes in higher-level code, ie not 
deadlock even if somebody really sets it up with bad state, also 
eliminates one if/then/else thinko in 0.12 that could theoretically 
cause dac to be started when you're trying to record, which would cause 
a deadlock.

[-- Attachment #2: new.diff --]
[-- Type: text/plain, Size: 876 bytes --]

--- i810_audio.c.12	Wed Dec 19 02:04:06 2001
+++ linux/drivers/sound/i810_audio.c	Wed Dec 26 18:22:37 2001
@@ -952,12 +952,16 @@
 	 * the CIV value to the next sg segment to be played so that when
 	 * we call start_{dac,adc}, things will operate properly
 	 */
-	if (!dmabuf->enable && dmabuf->trigger) {
-		if(rec && dmabuf->count != dmabuf->dmasize) {
+	if (!dmabuf->enable && dmabuf->ready) {
+		if(rec && dmabuf->count < dmabuf->dmasize &&
+		   (dmabuf->trigger & PCM_ENABLE_INPUT))
+		{
 			outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI);
 			__start_adc(state);
 			while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;
-		} else if(dmabuf->count) {
+		} else if (!rec && dmabuf->count &&
+			   (dmabuf->trigger & PCM_ENABLE_OUTPUT))
+		{
 			outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI);
 			__start_dac(state);
 			while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;

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

* Re: [PATCH] TEST of patch proposed for i810 audio
  2001-12-26 23:37 ` Nathan Bryant
@ 2001-12-27  5:35   ` Doug Ledford
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Ledford @ 2001-12-27  5:35 UTC (permalink / raw)
  To: Nathan Bryant; +Cc: saidani, linux-kernel

Nathan Bryant wrote:

> Nathan Bryant wrote:
> 
>>
>> maybe this patch will solve your problem, samir, maybe it won't; 
>> regardless, it should fix at least one corner case and is either 
>> obviously correct or start_*c is not ;-)
>>
>> patch is against doug's 0.12.
> 
> 
> [snip]
> 
> attached is a slightly more anal retentive version of my previous patch. 
> as in the previous patch, the goal is to make update_lvi completely 
> self-contained, ie resistant to changes in higher-level code, ie not 
> deadlock even if somebody really sets it up with bad state, also 
> eliminates one if/then/else thinko in 0.12 that could theoretically 
> cause dac to be started when you're trying to record, which would cause 
> a deadlock.
> 
> 
> ------------------------------------------------------------------------
> 
> --- i810_audio.c.12	Wed Dec 19 02:04:06 2001
> +++ linux/drivers/sound/i810_audio.c	Wed Dec 26 18:22:37 2001
> @@ -952,12 +952,16 @@
>  	 * the CIV value to the next sg segment to be played so that when
>  	 * we call start_{dac,adc}, things will operate properly
>  	 */
> -	if (!dmabuf->enable && dmabuf->trigger) {
> -		if(rec && dmabuf->count != dmabuf->dmasize) {
> +	if (!dmabuf->enable && dmabuf->ready) {
> +		if(rec && dmabuf->count < dmabuf->dmasize &&
> +		   (dmabuf->trigger & PCM_ENABLE_INPUT))
> +		{
>  			outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI);
>  			__start_adc(state);
>  			while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;
> -		} else if(dmabuf->count) {
> +		} else if (!rec && dmabuf->count &&
> +			   (dmabuf->trigger & PCM_ENABLE_OUTPUT))
> +		{
>  			outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI);
>  			__start_dac(state);
>  			while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;
> 

This looks fine to me.  I've added it to my 0.12 driver, bumped the number 
to 0.13, put it up on my web site 
(http://people.redhat.com/dledford/i810_audio.c.gz) and if that solves 
people's problems then that's what I'll send to Marcello in a day or so.

Thanks Nathan, I've been to busy to look into it the last little bit :-(

-- 

  Doug Ledford <dledford@redhat.com>  http://people.redhat.com/dledford
       Please check my web site for aic7xxx updates/answers before
                       e-mailing me about problems


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

end of thread, other threads:[~2001-12-27  5:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-26 23:01 [PATCH] TEST of patch proposed for i810 audio Nathan Bryant
2001-12-26 23:37 ` Nathan Bryant
2001-12-27  5:35   ` Doug Ledford
  -- strict thread matches above, loose matches on Subject: below --
2001-12-17 21:14 Samir Saidani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox