On Tuesday 08 January 2019 13:44:24 Luiz Augusto von Dentz wrote: > On Sat, Dec 29, 2018 at 10:08 AM Pali Rohár <pali.rohar@xxxxxxxxx> wrote: > > And forth thing, people lot of times listen music and their music is > > stored in some lossy compression codecs (MP3, AAC, ...). A2DP supports > > of these codecs and pulseaudio has already support for pass-through > > different codec payloads to sound card (if sound card driver support > > is). So this would allow us to e.g. pass-through MP3 or AAC data to > > supported headset without need to decode and encode again. Pulseaudio in > > this case can take care for switching from "better A2DP codec" to AAC > > when input application source is already in AAC; and then back to that > > previous "better A2DP codec" after AAC playback file finish. > > > > I think that similar technique is already used in Apple products which > > propagates AAC format. > > > > Therefore I do not think switching codec is some king of workaround or > > hack, but fully valid use case. > > Except that we can't do that because we cannot garanteed there wont be > other sources active e.g. system notifications, etc, so in practice > complex/expensive codecs such as MP3 and AAC are hard to use since > that would mean we would have to encode on the fly. Perhaps there we > could have a setting for these type of codecs so the user would have > to opt-in if he want to just listen to those files, though if they are > using streaming services they normally decode on their own so AAC and > MP3 endpoint are not that useful with the likes of youtube, spotify, > etc. IIRC pulseaudio has already API for pass-through of MP3 and AAC and at one time can only one application send stream, so there are no system notifications. You can also see checkboxes for codecs which can be enabled for pass-through for digital sound cards (e.g. HDMI output) in pavucontrol. So I do not think that this is a problem. Bluetooth "A2DP card" in pulseaudio can behave in exactly same way like existing HDMI AAC output, which is already working. -- Pali Rohár pali.rohar@xxxxxxxxx
Attachment:
signature.asc
Description: PGP signature