[pulseaudio-discuss] Patch to work around some codec's phase inversion when remap_channels mapping stereo to mono

Lennart Poettering lennart at poettering.net
Fri Dec 25 06:16:10 PST 2009


On Mon, 21.12.09 17:26, Bu, Long (long.bu at intel.com) wrote:

> Hi all, 

> There are some Inel HDA codecs like ALC272 that inverse phase
> of one channel when capturing..  remap_channels remaps stereo to
> mono by simply add one channel to another. the sum is always very
> very close to zero.
> 
> ALSA works around this by using "copy" route policy for all
> Intel-HAD card which is equivalent with PA_RESAMPLER_NO_REMAP set in
> PA's resampler.
> 	
> Attach is a patch that set a REMAP flag for source when its
> underlying H/W is ALC 272. Then set REMAP flag for source-outputs
> associated with this source.

Hmm, I am not convinced this is the right approach. The NO_REMAP flag
simply disables any kind of remapping. That includes disabling
remapping for surround playback and for example if you have a stereo
stream with R and L reversed that this is reorder when you play it
back on a device which has L first and R second.

I think the effect of this patch is way more than you actually need,
right?

Also, I am quite confident that the right place to fix this is
actually ALSA userspace and not PA. I'd prefer not to see
device-specific hacks in PA and also I believe that this problem needs
fixing for all ALSA clients, not just PA?

Could you bring this up on the ALSA ML?

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list