public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] a2dpd patch
@ 2006-09-22 16:45 Frédéric DALLEAU
  2006-09-25 18:10 ` Brad Midgley
  0 siblings, 1 reply; 3+ messages in thread
From: Frédéric DALLEAU @ 2006-09-22 16:45 UTC (permalink / raw)
  To: BlueZ development

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

Hi,

This is a small patch to correct the left sound only. It also integrate 
the underrun fix we talked about last day.

Fred.

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

? .deps
? .libs
? Doxyfile
? Makefile
? Makefile.in
? a2play
? a2recv
? aclocal.m4
? autom4te.cache
? avrecv
? avsnd
? btsco
? btsco.kdevelop
? btsco.kdevelop.pcs
? btsco.kdevses
? btsco2
? compile
? config.guess
? config.h
? config.h.in
? config.log
? config.status
? config.sub
? configure
? depcomp
? install-sh
? libtool
? missing
? stamp-h1
? alsa-plugins/.deps
? alsa-plugins/.libs
? alsa-plugins/Makefile
? alsa-plugins/Makefile.in
? alsa-plugins/a2dp_ipc.lo
? alsa-plugins/a2dp_timer.lo
? alsa-plugins/a2dpd
? alsa-plugins/ctl_a2dpd.lo
? alsa-plugins/ctl_sco.lo
? alsa-plugins/libasound_module_ctl_a2dpd.la
? alsa-plugins/libasound_module_ctl_sco.la
? alsa-plugins/libasound_module_pcm_a2dp.la
? alsa-plugins/libasound_module_pcm_a2dpd.la
? alsa-plugins/libasound_module_pcm_sco.la
? alsa-plugins/pcm_a2dp.lo
? alsa-plugins/pcm_a2dpd.lo
? alsa-plugins/pcm_sco.lo
? avdtp/.deps
? avdtp/.libs
? avdtp/Makefile
? avdtp/Makefile.in
? avdtp/avtest
? sbc/.deps
? sbc/.libs
? sbc/Makefile
? sbc/Makefile.in
? sbc/rcplay
? sbc/sbcdec
? sbc/sbcenc
? sbc/sbcinfo
Index: alsa-plugins/a2dpd.c
===================================================================
RCS file: /cvsroot/bluetooth-alsa/btsco/alsa-plugins/a2dpd.c,v
retrieving revision 1.8
diff -u -r1.8 a2dpd.c
--- alsa-plugins/a2dpd.c	6 Sep 2006 02:59:43 -0000	1.8
+++ alsa-plugins/a2dpd.c	22 Sep 2006 15:47:45 -0000
@@ -580,9 +580,8 @@
 			pBuffer[j] = (((channel_1 & 0x0000FFFF) << 16) | (channel_2 & 0x0000FFFF));
 		} else {
 			//FIXME We have a reverse stereo I don't know why
-			// The following line corrects the problem but I miss the cause so
-			pBuffer[j] = (((channel_2&0x0000FFFF)<<16)|(channel_1&0x0000FFFF));
-			pBuffer[j] = ( (channel_1 & 0xFFFF0000) | (channel_2 & 0x0000FFFF) );
+			// The following line corrects the problem but I miss the cause so be aware
+			pBuffer[j] = (((channel_2 & 0x0000FFFF) << 16) | (channel_1 & 0x0000FFFF));
 		}
 	}
 	return pcm_buffer_filed_size;
Index: alsa-plugins/alsalib.c
===================================================================
RCS file: /cvsroot/bluetooth-alsa/btsco/alsa-plugins/alsalib.c,v
retrieving revision 1.1
diff -u -r1.1 alsalib.c
--- alsa-plugins/alsalib.c	7 Sep 2006 19:46:02 -0000	1.1
+++ alsa-plugins/alsalib.c	22 Sep 2006 15:47:45 -0000
@@ -70,7 +70,7 @@
 		err = snd_pcm_prepare(handle);
 		if (err < 0)
 			printf("Can't recovery from underrun, prepare failed: %s\n", snd_strerror(err));
-		return 0;
+		return err;
 	} else if (err == -ESTRPIPE) {
 		while ((err = snd_pcm_resume(handle)) == -EAGAIN)
 			sleep(1);	/* wait until the suspend flag is released */
@@ -79,7 +79,7 @@
 			if (err < 0)
 				printf("Can't recovery from suspend, prepare failed: %s\n", snd_strerror(err));
 		}
-		return 0;
+		return err;
 	}
 	return err;
 }
@@ -95,13 +95,13 @@
 		break;
 	case -EPIPE:
 		// To manage underrun, we will try to ignore
-		xrun_recovery(alsa->playback_handle, result);
-		//result = 0;
+		if(xrun_recovery(alsa->playback_handle, result) == 0)
+			result = 0;
 		DBG("EPIPE(%d)", result);
 		break;
 	case -ESTRPIPE:
-		xrun_recovery(alsa->playback_handle, result);
-		//result=0;
+		if(xrun_recovery(alsa->playback_handle, result) == 0)
+			result=0;
 		DBG("ESTRPIPE(%d)", result);
 		break;
 	}

[-- Attachment #3: Type: text/plain, Size: 348 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] a2dpd patch
  2006-09-22 16:45 [Bluez-devel] a2dpd patch Frédéric DALLEAU
@ 2006-09-25 18:10 ` Brad Midgley
  2006-09-26 16:25   ` Frédéric DALLEAU
  0 siblings, 1 reply; 3+ messages in thread
From: Brad Midgley @ 2006-09-25 18:10 UTC (permalink / raw)
  To: BlueZ development

Fr=E9d=E9ric

> This is a small patch to correct the left sound only. It also integrate
> the underrun fix we talked about last day.

merged

Brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] a2dpd patch
  2006-09-25 18:10 ` Brad Midgley
@ 2006-09-26 16:25   ` Frédéric DALLEAU
  0 siblings, 0 replies; 3+ messages in thread
From: Frédéric DALLEAU @ 2006-09-26 16:25 UTC (permalink / raw)
  To: BlueZ development

Hi Brad,

Brad Midgley a =E9crit :
> Fr=E9d=E9ric
>
>   =

>> This is a small patch to correct the left sound only. It also integrate
>> the underrun fix we talked about last day.
>>     =

> merged
>   =


Thank you,
Bluetooth UPF will take place in malta next month, do you plan to go there?

Fr=E9d=E9ric.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2006-09-26 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 16:45 [Bluez-devel] a2dpd patch Frédéric DALLEAU
2006-09-25 18:10 ` Brad Midgley
2006-09-26 16:25   ` Frédéric DALLEAU

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