[pulseaudio-discuss] [PATCH] bluetooth: MP3 passthrough over A2DP

Colin Guthrie gmane at colin.guthr.ie
Sun Oct 31 13:37:58 PDT 2010


'Twas brillig, and Pierre-Louis Bossart at 23/10/10 00:48 did gyre and
gimble:
> This patch enables MP3 passthrough over A2DP, with the decoding
> taking place on the headset to reduce power consumption. This was
> only possible if PulseAudio was bypassed before with the a2dpsink
> element in gstreamer.
> 
> This is a simpler version of an earlier patch. The MP3 parsing is
> now supposed to happen in the application, and the BT sink
> expects an IEC61937 format: 8byte header, mp3 frame and zero-padding
> to reach 4608 bytes. This format is a pseudo-PCM stream, which
> is compatible with the existing way of handling latency/timing.
> 
> this patch can be tested with following command:
> 
> gst-launch filesrc location=file.mp3 ! mp3parse ! mpegiec958 ! filesink location=file-be.iec
> dd if=if file-be.iec of=file-le.iec conv=swab
> paplay --raw --passthrough -v --format="s16le" --rate=44100 --device=bluez_sink.00_11_22_33_44_55 file-le.iec
> 
> or more simply
> gst-launch filesrc location=file.mp3 ! mp3parse ! mpegiec958 ! pulsesink device=bluez_sink.00_11_22_33_44_55
> 
> patches for mpegiec958 and pulsesink will be posted separately.
> 
> TODO for later patches:
> - add type for MP3/AC3
> - expose sink capability to apps so that the pipeline can be reconfigured
> - handle dynamic routing
> - set sink sample rate to the rate of the stream

Has anyone (particularly Tanu) got any comments on this patch?

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list