[PATCH] bluetooth: Don't abort on SBC decoding error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2014-01-18 at 20:14 +1100, James Bunton wrote:
> Hi Tanu,
> 
> Thanks for the quick review! :)
> 
> My mobile phone (Nokia E7 running Symbian Belle Refresh) is connecting
> to pulseaudio/bluez running on my Arch Linux on my Raspberry Pi. Without
> this patch every few minutes pulseaudio will disconnect the stream and
> log "SBC decoding error (-3)". As you can imagine this is quite
> annoying! :)

Yes, I can believe that :) Please add this information to the commit
message too. The commit message should always answer the question "why
is this needed". Here's some more wisdom about commit messages:
http://who-t.blogspot.de/2009/12/on-commit-messages.html

> I see what you mean about the timing code being wrong. What does
> pulseaudio use this for? Should I expect to hear some audio glitches
> with the current incorrect code, or is it just for display in a GUI?

It's used for latency reporting. I don't think the latency information
is used much when recording, it's more important for playback
(lip-sync), but of course we still should strive for correct values in
the latency reports. I don't expect that you would hear glitches even if
the latency information is wrong.

> I've modified it to use the number of bytes that sbc_decode reports it
> wrote to the output buffer. Both versions seem to work equally well for
> me.

The read_index update is still not quite in the right place.
sbc_decode() is called in a loop, and if it fails at any iteration, then
read_index should not be updated. So, the update should happen after the
loop.

> You can see them here:
> Repo URL: http://delx.net.au/git/pulseaudio
> Patch1:
> http://delx.net.au/git/pulseaudio/commitdiff/f66bec680d5a78778ef44910807020724ba4ebae
> Patch2:
> http://delx.net.au/git/pulseaudio/commitdiff/ba134901487a30633beafe335a5670a6586a65d4
> 
> I can submit these as patch files with git-send-email if that's
> preferable for review.

I prefer git send-email.

> Thanks again :)

Thanks for the patches!

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux