[alsa-devel] Query - ASoC headphone detection stereo vs. mono
I would like to get a better understanding on how to propagate channel mode of inserted headphone through soc-jack framework? I looked at jack.h and I don't see any definition of channel mode. I would assume that user-space needs this information in order to set up the path in the audio CODEC properly such as mixing stereo content into mono stream inside CODEC. How is use case handled on other platform?
Thanks Patrick
On Thu, 2011-03-31 at 11:28 -0700, Patrick Lai wrote:
I would like to get a better understanding on how to propagate channel mode of inserted headphone through soc-jack framework? I looked at jack.h and I don't see any definition of channel mode. I would assume that user-space needs this information in order to set up the path in the audio CODEC properly such as mixing stereo content into mono stream inside CODEC. How is use case handled on other platform?
The Jack detect core doesn't have this sort of functionality yet. We can report insertions and device type (if supported by the hardware) but it does sound like we need to additionally pass this sort of information up if required.
Another agenda topic.
Thanks
Liam
On Thu, Mar 31, 2011 at 11:28:18AM -0700, Patrick Lai wrote:
I would like to get a better understanding on how to propagate channel mode of inserted headphone through soc-jack framework? I looked at jack.h and I don't see any definition of channel mode. I would assume that user-space needs this information in order to set up the path in the audio CODEC properly such as mixing stereo content into mono stream inside CODEC. How is use case handled on other platform?
Generally this is handled by taking advantage of the fact that from the fact that when you connect a mono headphone it shorts left and right channels together so you should get audio out with a combination of the two channels. Quality won't be great and you could save power with mono playback but it should work and probably you're not doing lengthy playback if you only have mono output.
I think most people are working on the basis that mono headphones are so vanishingly rare these days that it's just not worth worrying about them - music playback is so common that even low end devices support it and it's getting hard to find mono headsets out there.
We could slot it in relatively easily, we'd just need to add separate reports for left and right channels inside the kernel and then either ignore it for userspace or come up with some sane way of propagating the information out there too. Like Liam says we can discuss this at the conference if nobody comes up with a patch by then.
participants (3)
-
Liam Girdwood
-
Mark Brown
-
Patrick Lai