Discussion:
[pulseaudio-discuss] Weak bass in stereo mode – possibility of virtual 2.1 sound profiles
Karl Ove Hufthammer
2018-10-04 19:34:09 UTC
Permalink
Hi!

I use my NVIDIA graphics card as a combined graphics and sound card,
connected to my 5.1 home theatre system via an HDMI cable (something
which works surprisingly well). Using the default audio profiles in
‘pavucontrol’, I can easily switch between 5.1 sound (e.g. for DVDs) and
stereo sound, which is great.

The 5.1 profile (‘hdmi-surround-extra1’) also work fine for *some*
stereo material, mainly music. But for *most* stereo material, the
upmixing makes everything sound too echoey (this is typically a problem
for movies with just stereo sound and for vocal-heavy music), so I
usually just use the stereo profile (‘hdmi-stereo-extra1’) for stereo
material.

But I have noticed than when playing music or videos using the stereo
profile, the sound is missing quite some oomph, i.e. the bass is *much*
weaker (compared to the same material played using the 5.1 profile).

I guess the reason is that PulseAudio outputs a pure stereo sound, and
my home theatre system doesn’t redirect enough of the low-frequency
sound to my subwoofer. And unfortunately, my (not too expensive) home
theatre system doesn’t have any options for increasing this (for HDMI
audio).

To summarise, when listening to stereo material, I can currently choose
between echoey 5.1 audio with nice/powerful subwoofer sound or
non-echoey stereo audio with very weak subwoofer sound.

My question is, is it possible to have my cake and eat it too? A virtual
2.1 speaker option/profile, where the left/right *rear* speakers are
silent, and where PulseAudio redirects some LFE audio to the subwoofer,
just like it does for the 5.1 profile? (Or perhaps even a 3.1 speaker
option, if that sounds better – front left + centre + front right +
subwoofer?)

Is this possible using some PulseAudio config magic? Currently, I use
the following settings in my config file:

  enable-remixing = yes
  enable-lfe-remixing = yes

  default-sample-channels = 6
  default-channel-map =
front-left,front-right,rear-left,rear-right,front-center,lfe

I don’t have a problem with having to *manually* choose between a 5.1
and and a 2.1 profile (I use ‘pactl’ aliases to quickly switch between
profiles). But of course the *best* solution would be that PulseAudio
automatically sent stereo material as 2.1 audio output (i.e. really 5.1
data with the rear channels (and centre channel?) silent) and 5.1
material as normal 5.1 audio output.

Any suggestions?

Thanks in advance,

Karl
Alexander E. Patrakov
2018-10-05 12:41:38 UTC
Permalink
Post by Karl Ove Hufthammer
Hi!
I use my NVIDIA graphics card as a combined graphics and sound card,
connected to my 5.1 home theatre system via an HDMI cable (something
which works surprisingly well). Using the default audio profiles in
‘pavucontrol’, I can easily switch between 5.1 sound (e.g. for DVDs) and
stereo sound, which is great.
Hello!

I think you forgot to specify the version of PulseAudio...
Post by Karl Ove Hufthammer
The 5.1 profile (‘hdmi-surround-extra1’) also work fine for *some*
stereo material, mainly music. But for *most* stereo material, the
upmixing makes everything sound too echoey (this is typically a problem
for movies with just stereo sound and for vocal-heavy music), so I
usually just use the stereo profile (‘hdmi-stereo-extra1’) for stereo
material.
There is a setting that prohibits upmixing (i.e. filling the rear channels
with a copy of front). It is called remixing-use-all-sink-channels=false.
But it is a relatively recent addition. It does exist in Ubuntu 18.04.
Post by Karl Ove Hufthammer
But I have noticed than when playing music or videos using the stereo
profile, the sound is missing quite some oomph, i.e. the bass is *much*
weaker (compared to the same material played using the 5.1 profile).
I guess the reason is that PulseAudio outputs a pure stereo sound, and
my home theatre system doesn’t redirect enough of the low-frequency
sound to my subwoofer. And unfortunately, my (not too expensive) home
theatre system doesn’t have any options for increasing this (for HDMI
audio).
Are you sure that the subwoofer gets anything at all in this mode?

Anyway the suggestion is to try the 5.1 profile
and remixing-use-all-sink-channels=false.
--
Alexander E. Patrakov
Karl Ove Hufthammer
2018-10-05 16:53:57 UTC
Permalink
Post by Karl Ove Hufthammer
I use my NVIDIA graphics card as a combined graphics and sound card,
connected to my 5.1 home theatre system via an HDMI cable (something
which works surprisingly well). […]
Hello!
I think you forgot to specify the version of PulseAudio...
Yes, sorry. I use PulseAudio 12.2 (on openSUSE Tumbleweed).
Post by Karl Ove Hufthammer
The 5.1 profile (‘hdmi-surround-extra1’) also work fine for *some*
stereo material, mainly music. But for *most* stereo material, the
upmixing makes everything sound too echoey (this is typically a problem
for movies with just stereo sound and for vocal-heavy music), so I
usually just use the stereo profile (‘hdmi-stereo-extra1’) for stereo
material.
There is a setting that prohibits upmixing (i.e. filling the rear
channels with a copy of front). It is
called remixing-use-all-sink-channels=false. But it is a relatively
recent addition. It does exist in Ubuntu 18.04.
Thank you! That almost did the trick! With

  remixing-use-all-sink-channels = no

and the ‘Digital Surround 5.1’ profile, stereo material now sound much
richer, i.e. with proper bass effects, and without any echo effect. The
audio is coming from just my front left/right speakers and subwoofer.
Perfect!

But, strangely, real 5.1 material are now somewhat messed up. I use the
wonderful

  hd_dts_hd_master_audio_sound_check_5_1_lossless.m2ts

video file (available several places on the Web – I’m not sure what its
original Web site is) as a test file. The front left/right/centre sounds
are OK. But when the rear right sound is played, the sound is mainly
coming from my *front* right speaker (though *some* sound is also coming
from my rear right speaker). And the sound volume is much when playing
the sound is much lower than for the front left/right/centre sounds. For
the rear left sound, a similar thing happens; i.e. the sound is mainly
coming from my *front* left speaker.

I don’t understand why this is happening. Shouldn’t
‘remixing-use-all-sink-channels = no’ just affect *upmixing* of sound,
and leave 5.1 material alone?

(When I use ‘remixing-use-all-sink-channels = yes’, the 5.1 sound is
correct, i.e. all the sounds come from the speakers they are supposed to.)
Post by Karl Ove Hufthammer
But I have noticed than when playing music or videos using the stereo
profile, the sound is missing quite some oomph, i.e. the bass is *much*
weaker (compared to the same material played using the 5.1 profile).
I guess the reason is that PulseAudio outputs a pure stereo sound, and
my home theatre system doesn’t redirect enough of the low-frequency
sound to my subwoofer. And unfortunately, my (not too expensive) home
theatre system doesn’t have any options for increasing this (for HDMI
audio).
Are you sure that the subwoofer gets anything at all in this mode?
Yes, it gets *some* sound. But I guess that’s just my home theatre
system redistributing some of the 2.0 sound.

-- Karl Ove Hufthammer
Alexander E. Patrakov
2018-10-07 07:44:28 UTC
Permalink
Post by Karl Ove Hufthammer
But, strangely, real 5.1 material are now somewhat messed up. I use the
wonderful
hd_dts_hd_master_audio_sound_check_5_1_lossless.m2ts
video file (available several places on the Web – I’m not sure what its
original Web site is) as a test file. The front left/right/centre sounds
are OK. But when the rear right sound is played, the sound is mainly
coming from my *front* right speaker (though *some* sound is also coming
from my rear right speaker). And the sound volume is much when playing
the sound is much lower than for the front left/right/centre sounds. For
the rear left sound, a similar thing happens; i.e. the sound is mainly
coming from my *front* left speaker.
I don’t understand why this is happening. Shouldn’t
‘remixing-use-all-sink-channels = no’ just affect *upmixing* of sound,
and leave 5.1 material alone?
This is a known bug that appears because there are two 5.1 standards:
proper 5.1 and 5.1 Side. The video player (I guess you use mpv) says: the
extra two channels have to come from the side. But your system does not
have speakers there, it has them on the rear. So PulseAudio attempts to
remix. In fact, sound both with and without remixing-use-all-sink-channels
is wrong. Solutions: either upgrade to a 7.1 system or use a different
player that doesn't care about Side and Rear. Totem or anything other
GStreamer-based should work fine.

But in reality this should be fixed in PulseAudio code. Maybe I will work
on it next week.
--
Alexander E. Patrakov
Karl Ove Hufthammer
2018-10-07 11:41:47 UTC
Permalink
Post by Karl Ove Hufthammer
I don’t understand why this is happening. Shouldn’t
‘remixing-use-all-sink-channels = no’ just affect *upmixing* of sound,
and leave 5.1 material alone?
the extra two channels have to come from the side.
Looks like you’re right. If I run ‘ffprobe’ on my 5.1 test file, it returns:

  Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] /
0x0086), 48000 Hz, 5.1(side), s32p (24 bit)

So the video file (and mpv) seems to  use the ‘5.1(side)’ standard.
(Which is a bit strange, since this is supposed to be a video file to
test a normal 5.1 setup, AFAICS.)
Post by Karl Ove Hufthammer
But your system does not have speakers there, it has them on the rear.
So PulseAudio attempts to remix. In fact, sound both with and without
remixing-use-all-sink-channels is wrong.
What’s wrong about the remixing when one uses
‘remixing-use-all-sink-channels = yes’?
Post by Karl Ove Hufthammer
Solutions: either upgrade to a 7.1 system or use a different player
that doesn't care about Side and Rear. Totem or anything other
GStreamer-based should work fine.
I found another solution. In ‘.config/mpv/mpv.conf’, add the following:

  audio-channels=5.1,stereo

Now both 5.1 and stereo material use the correct channel mapping (if I
use ‘remixing-use-all-sink-channels = no’ and the 5.1 ouput profile in
pavucontrol).

With VLC, I had the same channel mapping problem as in mpv. In the
preferences dialogue, there is an ‘Advanced | Audio | Filters | Remap’
setting where I can remap the side audio to the rear speakers. But
unfortunately, it doesn’t seem to have any effect (I *have* enabled the
‘remap’ filer in ‘Advanced | Audio | Filters’, and even restarted VLC).
But no worries; I prefer mpv anyway, and with the additional config
option, everything seems to work fine.

For anyone else who has a similar system (computer connected to a 5.1
receiver / home theatre system using HDMI), here’s all the config file
changes I have made to get both stereo and 5.1 sound working perfectly
(with PulseAudio 12.2):

In /etc/pulse/daemon.conf, change the default options to
  remixing-use-all-sink-channels = no
  enable-lfe-remixing = yes
  default-sample-channels = 6
  default-channel-map =
front-left,front-right,rear-left,rear-right,front-center,lfe

In /etc/pulse/default.pa and /etc/pulse/system.pa, comment out the line
(e.g. prefix it with a #)
  load-module module-suspend-on-idle

In .config/mpv/mpv.conf, add
  audio-channels=5.1,stereo
Post by Karl Ove Hufthammer
But in reality this should be fixed in PulseAudio code. Maybe I will
work on it next week.
That would be great. More stuff *automatically* working correctly is
always a good thing! :)
--
Karl Ove Hufthammer
Alexander E. Patrakov
2018-10-07 13:27:04 UTC
Permalink
Post by Karl Ove Hufthammer
I don’t understand why this is happening. Shouldn’t
‘remixing-use-all-sink-channels = no’ just affect *upmixing* of
sound,
and leave 5.1 material alone?
the extra two channels have to come from the side.
Looks like you’re right. If I run ‘ffprobe’ on my 5.1 test file, it
Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] /
0x0086), 48000 Hz, 5.1(side), s32p (24 bit)
So the video file (and mpv) seems to use the ‘5.1(side)’ standard.
(Which is a bit strange, since this is supposed to be a video file to
test a normal 5.1 setup, AFAICS.)
(speaking with my "DTS encoder author" hat on)

The issue is that it is a DTS file. DTS uses completely different channel
names than what's found in PulseAudio source. The proper normative
reference is:

https://www.etsi.org/deliver/etsi_ts/102100_102199/102114/01.03.01_60/ts_102114v010301p.pdf
page 19, table 5.4 (note that the presence of the LFE channel is
transmitted separately).

Your file uses AMODE=0b001001=9, so the list of channels is: "Center",
"Left", "Right", "Surround Left", "Surround Right". And there is also a 64x
downsampled LFE channel. FFMmpeg-based decoders map "Surround" to "Side"
because "Rear" also exists in other channel layouts and means something
different. There is no way in DTS to express a layout with "Rear" but no
"Surround" channels.
Post by Karl Ove Hufthammer
But your system does not have speakers there, it has them on the rear.
So PulseAudio attempts to remix. In fact, sound both with and without
remixing-use-all-sink-channels is wrong.
What’s wrong about the remixing when one uses
‘remixing-use-all-sink-channels = yes’?
The rear channels will get not a copy of the side, but an average of front
and side.
--
Alexander E. Patrakov
Alexander E. Patrakov
2018-10-13 17:29:33 UTC
Permalink
     I don’t understand why this is happening. Shouldn’t
     ‘remixing-use-all-sink-channels = no’ just affect *upmixing* of
     sound,
     and leave 5.1 material alone?
This is a known bug that appears because there are two 5.1
proper 5.1 and 5.1 Side. The video player (I guess you use mpv)
the extra two channels have to come from the side.
Looks like you’re right. If I run ‘ffprobe’ on my 5.1 test file, it
   Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] /
0x0086), 48000 Hz, 5.1(side), s32p (24 bit)
So the video file (and mpv) seems to  use the ‘5.1(side)’ standard.
(Which is a bit strange, since this is supposed to be a video file to
test a normal 5.1 setup, AFAICS.)
(speaking with my "DTS encoder author" hat on)
The issue is that it is a DTS file. DTS uses completely different
channel names than what's found in PulseAudio source. The proper
https://www.etsi.org/deliver/etsi_ts/102100_102199/102114/01.03.01_60/ts_102114v010301p.pdf
page 19, table 5.4 (note that the presence of the LFE channel is
transmitted separately).
Your file uses AMODE=0b001001=9, so the list of channels is: "Center",
"Left", "Right", "Surround Left", "Surround Right". And there is also a
64x downsampled LFE channel. FFMmpeg-based decoders map "Surround" to
"Side" because "Rear" also exists in other channel layouts and means
something different. There is no way in DTS to express a layout with
"Rear" but no "Surround" channels.
But your system does not have speakers there, it has them on the
rear.
So PulseAudio attempts to remix. In fact, sound both with and
without
remixing-use-all-sink-channels is wrong.
What’s wrong about the remixing when one uses
‘remixing-use-all-sink-channels = yes’?
The rear channels will get not a copy of the side, but an average of
front and side.
As promised, here is a patch.

Note that I am unhappy with it, because it fixes only a particular
common problem case, while other related issues stay unfixed. E.g. if
one tries to play 5.1 audio on 7.1 system, with or without this patch:

- Front, Center and LFE channels are mapped 1:1, which is correct
- Rear (or what mpv calls "Side") source channels are mapped to Side,
which is also correct, because it's the Side speakers in the ITU-T 7.1
layout, not Rear, which have the nearest position to what Dolby
specifies for Surround AC3 speakers.
- The true rear channels get a mix between Front and Side, which is
clearly incorrect. ITU R-REC-BS.775-3-201208 says that both sets of
surround channels should be fed the same signal.

But the needed refactoring (e.g. choosing what to mix where based on
speaker azimuths) is way too big, so I decided to postpone it.
--
Alexander E. Patrakov
Tanu Kaskinen
2018-11-15 08:03:39 UTC
Permalink
Post by Alexander E. Patrakov
Post by Karl Ove Hufthammer
Post by Karl Ove Hufthammer
I don’t understand why this is happening. Shouldn’t
‘remixing-use-all-sink-channels = no’ just affect *upmixing* of
sound,
and leave 5.1 material alone?
This is a known bug that appears because there are two 5.1
proper 5.1 and 5.1 Side. The video player (I guess you use mpv)
the extra two channels have to come from the side.
Looks like you’re right. If I run ‘ffprobe’ on my 5.1 test file, it
Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] /
0x0086), 48000 Hz, 5.1(side), s32p (24 bit)
So the video file (and mpv) seems to use the ‘5.1(side)’ standard.
(Which is a bit strange, since this is supposed to be a video file to
test a normal 5.1 setup, AFAICS.)
(speaking with my "DTS encoder author" hat on)
The issue is that it is a DTS file. DTS uses completely different
channel names than what's found in PulseAudio source. The proper
https://www.etsi.org/deliver/etsi_ts/102100_102199/102114/01.03.01_60/ts_102114v010301p.pdf
page 19, table 5.4 (note that the presence of the LFE channel is
transmitted separately).
Your file uses AMODE=0b001001=9, so the list of channels is: "Center",
"Left", "Right", "Surround Left", "Surround Right". And there is also a
64x downsampled LFE channel. FFMmpeg-based decoders map "Surround" to
"Side" because "Rear" also exists in other channel layouts and means
something different. There is no way in DTS to express a layout with
"Rear" but no "Surround" channels.
Post by Karl Ove Hufthammer
But your system does not have speakers there, it has them on the
rear.
Post by Karl Ove Hufthammer
So PulseAudio attempts to remix. In fact, sound both with and
without
Post by Karl Ove Hufthammer
remixing-use-all-sink-channels is wrong.
What’s wrong about the remixing when one uses
‘remixing-use-all-sink-channels = yes’?
The rear channels will get not a copy of the side, but an average of
front and side.
As promised, here is a patch.
Thanks a lot! Very nice fix for a common problem, I applied it now. I
expect to look into the big remixing rework patch soon.
Post by Alexander E. Patrakov
Note that I am unhappy with it, because it fixes only a particular
common problem case, while other related issues stay unfixed. E.g. if
- Front, Center and LFE channels are mapped 1:1, which is correct
- Rear (or what mpv calls "Side") source channels are mapped to Side,
which is also correct, because it's the Side speakers in the ITU-T 7.1
layout, not Rear, which have the nearest position to what Dolby
specifies for Surround AC3 speakers.
- The true rear channels get a mix between Front and Side, which is
clearly incorrect. ITU R-REC-BS.775-3-201208 says that both sets of
surround channels should be fed the same signal.
Regarding that last point, do I understand correctly that the
recommendation is to duplicate the 5.1 rear(/side) channels to both the
side and rear channels in 7.1? Doesn't that cause imbalance by
amplifying the rear channels? Or is it compensated by attenuating the
signal?
--
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk
Alexander E. Patrakov
2018-11-15 10:43:33 UTC
Permalink
Post by Tanu Kaskinen
Post by Alexander E. Patrakov
Post by Karl Ove Hufthammer
Post by Karl Ove Hufthammer
I don’t understand why this is happening. Shouldn’t
‘remixing-use-all-sink-channels = no’ just affect *upmixing* of
sound,
and leave 5.1 material alone?
This is a known bug that appears because there are two 5.1
proper 5.1 and 5.1 Side. The video player (I guess you use mpv)
the extra two channels have to come from the side.
Looks like you’re right. If I run ‘ffprobe’ on my 5.1 test file, it
Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] /
0x0086), 48000 Hz, 5.1(side), s32p (24 bit)
So the video file (and mpv) seems to use the ‘5.1(side)’ standard.
(Which is a bit strange, since this is supposed to be a video file to
test a normal 5.1 setup, AFAICS.)
(speaking with my "DTS encoder author" hat on)
The issue is that it is a DTS file. DTS uses completely different
channel names than what's found in PulseAudio source. The proper
https://www.etsi.org/deliver/etsi_ts/102100_102199/102114/01.03.01_60/ts_102114v010301p.pdf
page 19, table 5.4 (note that the presence of the LFE channel is
transmitted separately).
Your file uses AMODE=0b001001=9, so the list of channels is: "Center",
"Left", "Right", "Surround Left", "Surround Right". And there is also a
64x downsampled LFE channel. FFMmpeg-based decoders map "Surround" to
"Side" because "Rear" also exists in other channel layouts and means
something different. There is no way in DTS to express a layout with
"Rear" but no "Surround" channels.
Post by Karl Ove Hufthammer
But your system does not have speakers there, it has them on the
rear.
Post by Karl Ove Hufthammer
So PulseAudio attempts to remix. In fact, sound both with and
without
Post by Karl Ove Hufthammer
remixing-use-all-sink-channels is wrong.
What’s wrong about the remixing when one uses
‘remixing-use-all-sink-channels = yes’?
The rear channels will get not a copy of the side, but an average of
front and side.
As promised, here is a patch.
Thanks a lot! Very nice fix for a common problem, I applied it now. I
expect to look into the big remixing rework patch soon.
Post by Alexander E. Patrakov
Note that I am unhappy with it, because it fixes only a particular
common problem case, while other related issues stay unfixed. E.g. if
- Front, Center and LFE channels are mapped 1:1, which is correct
- Rear (or what mpv calls "Side") source channels are mapped to Side,
which is also correct, because it's the Side speakers in the ITU-T 7.1
layout, not Rear, which have the nearest position to what Dolby
specifies for Surround AC3 speakers.
- The true rear channels get a mix between Front and Side, which is
clearly incorrect. ITU R-REC-BS.775-3-201208 says that both sets of
surround channels should be fed the same signal.
Regarding that last point, do I understand correctly that the
recommendation is to duplicate the 5.1 rear(/side) channels to both the
side and rear channels in 7.1? Doesn't that cause imbalance by
amplifying the rear channels? Or is it compensated by attenuating the
signal?
You understood correctly. In my big patch, it is compensated by
attenuating the signal. Anyway, I am going to resubmit it later today
without the half-baked change about the LFE volume.
--
Alexander E. Patrakov
Alexander E. Patrakov
2018-11-15 18:50:31 UTC
Permalink
Post by Alexander E. Patrakov
Post by Tanu Kaskinen
Post by Alexander E. Patrakov
Post by Karl Ove Hufthammer
Post by Karl Ove Hufthammer
I don’t understand why this is happening. Shouldn’t
‘remixing-use-all-sink-channels = no’ just affect *upmixing* of
sound,
and leave 5.1 material alone?
This is a known bug that appears because there are two 5.1
proper 5.1 and 5.1 Side. The video player (I guess you use mpv)
the extra two channels have to come from the side.
Looks like you’re right. If I run ‘ffprobe’ on my 5.1 test file, it
Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] /
0x0086), 48000 Hz, 5.1(side), s32p (24 bit)
So the video file (and mpv) seems to use the ‘5.1(side)’ standard.
(Which is a bit strange, since this is supposed to be a video file to
test a normal 5.1 setup, AFAICS.)
(speaking with my "DTS encoder author" hat on)
The issue is that it is a DTS file. DTS uses completely different
channel names than what's found in PulseAudio source. The proper
https://www.etsi.org/deliver/etsi_ts/102100_102199/102114/01.03.01_60/ts_102114v010301p.pdf
page 19, table 5.4 (note that the presence of the LFE channel is
transmitted separately).
Your file uses AMODE=0b001001=9, so the list of channels is: "Center",
"Left", "Right", "Surround Left", "Surround Right". And there is also a
64x downsampled LFE channel. FFMmpeg-based decoders map "Surround" to
"Side" because "Rear" also exists in other channel layouts and means
something different. There is no way in DTS to express a layout with
"Rear" but no "Surround" channels.
Post by Karl Ove Hufthammer
But your system does not have speakers there, it has them on the
rear.
Post by Karl Ove Hufthammer
So PulseAudio attempts to remix. In fact, sound both with and
without
Post by Karl Ove Hufthammer
remixing-use-all-sink-channels is wrong.
What’s wrong about the remixing when one uses
‘remixing-use-all-sink-channels = yes’?
The rear channels will get not a copy of the side, but an average of
front and side.
As promised, here is a patch.
Thanks a lot! Very nice fix for a common problem, I applied it now. I
expect to look into the big remixing rework patch soon.
Post by Alexander E. Patrakov
Note that I am unhappy with it, because it fixes only a particular
common problem case, while other related issues stay unfixed. E.g. if
- Front, Center and LFE channels are mapped 1:1, which is correct
- Rear (or what mpv calls "Side") source channels are mapped to Side,
which is also correct, because it's the Side speakers in the ITU-T 7.1
layout, not Rear, which have the nearest position to what Dolby
specifies for Surround AC3 speakers.
- The true rear channels get a mix between Front and Side, which is
clearly incorrect. ITU R-REC-BS.775-3-201208 says that both sets of
surround channels should be fed the same signal.
Regarding that last point, do I understand correctly that the
recommendation is to duplicate the 5.1 rear(/side) channels to both the
side and rear channels in 7.1? Doesn't that cause imbalance by
amplifying the rear channels? Or is it compensated by attenuating the
signal?
You understood correctly. In my big patch, it is compensated by
attenuating the signal. Anyway, I am going to resubmit it later today
without the half-baked change about the LFE volume.
Sorry, I have to do it later. I have too much non-PulseAudio work to do :(
--
Alexander E. Patrakov
Tanu Kaskinen
2018-11-16 06:13:09 UTC
Permalink
Post by Alexander E. Patrakov
Post by Alexander E. Patrakov
Post by Tanu Kaskinen
Post by Alexander E. Patrakov
Note that I am unhappy with it, because it fixes only a particular
common problem case, while other related issues stay unfixed. E.g. if
- Front, Center and LFE channels are mapped 1:1, which is correct
- Rear (or what mpv calls "Side") source channels are mapped to Side,
which is also correct, because it's the Side speakers in the ITU-T 7.1
layout, not Rear, which have the nearest position to what Dolby
specifies for Surround AC3 speakers.
- The true rear channels get a mix between Front and Side, which is
clearly incorrect. ITU R-REC-BS.775-3-201208 says that both sets of
surround channels should be fed the same signal.
Regarding that last point, do I understand correctly that the
recommendation is to duplicate the 5.1 rear(/side) channels to both the
side and rear channels in 7.1? Doesn't that cause imbalance by
amplifying the rear channels? Or is it compensated by attenuating the
signal?
You understood correctly. In my big patch, it is compensated by
attenuating the signal. Anyway, I am going to resubmit it later today
without the half-baked change about the LFE volume.
Sorry, I have to do it later. I have too much non-PulseAudio work to do :(
No problem, I'll postpone reviewing the patch until you've submitted
the new version. From what I already saw, the general idea behind the
patch seems good.
--
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk
Alexander E. Patrakov
2018-11-25 19:17:53 UTC
Permalink
Post by Tanu Kaskinen
Post by Alexander E. Patrakov
Post by Alexander E. Patrakov
Post by Tanu Kaskinen
Post by Alexander E. Patrakov
Note that I am unhappy with it, because it fixes only a particular
common problem case, while other related issues stay unfixed. E.g. if
- Front, Center and LFE channels are mapped 1:1, which is correct
- Rear (or what mpv calls "Side") source channels are mapped to Side,
which is also correct, because it's the Side speakers in the ITU-T 7.1
layout, not Rear, which have the nearest position to what Dolby
specifies for Surround AC3 speakers.
- The true rear channels get a mix between Front and Side, which is
clearly incorrect. ITU R-REC-BS.775-3-201208 says that both sets of
surround channels should be fed the same signal.
Regarding that last point, do I understand correctly that the
recommendation is to duplicate the 5.1 rear(/side) channels to both the
side and rear channels in 7.1? Doesn't that cause imbalance by
amplifying the rear channels? Or is it compensated by attenuating the
signal?
You understood correctly. In my big patch, it is compensated by
attenuating the signal. Anyway, I am going to resubmit it later today
without the half-baked change about the LFE volume.
Sorry, I have to do it later. I have too much non-PulseAudio work to do :(
No problem, I'll postpone reviewing the patch until you've submitted
the new version. From what I already saw, the general idea behind the
patch seems good.
Hello Tanu,

thanks for your patience. I have tried to undo the half-baked LFE change
today, but found two more bugs in my patch that I would rather fix
before resubmitting it:

1. AUX input channels get sometimes routed to non-AUX output channels
rather than being dropped. Fixing this right how.

2. Some inconsistencies if either input or output channel map contains
duplicates. Cannot really fix, because I don't know what's expected.

Could you please help with (2)? In particular, what would be the
expected channel matrix in the following two cases?

Case A:

front-left, front-right, front-center ->
front-left, front-right, front-center, front-center

I would guess that we should generate two identical front-center output
channels, both duplicating the front-center input channel with the
coefficient being 1.0.

Case B:

front-left, front-right, front-left, front-right -> front-left, front-right

Would it be OK if I drop the redundant input channels, i.e. use only the
first copy of each channel name? Or should I average the redundant
inputs, or take a sum?

Is there any spec?
--
Alexander E. Patrakov
Tanu Kaskinen
2018-11-26 15:38:25 UTC
Permalink
Post by Alexander E. Patrakov
Post by Tanu Kaskinen
Post by Alexander E. Patrakov
Post by Alexander E. Patrakov
Post by Tanu Kaskinen
Post by Alexander E. Patrakov
Note that I am unhappy with it, because it fixes only a particular
common problem case, while other related issues stay unfixed. E.g. if
- Front, Center and LFE channels are mapped 1:1, which is correct
- Rear (or what mpv calls "Side") source channels are mapped to Side,
which is also correct, because it's the Side speakers in the ITU-T 7.1
layout, not Rear, which have the nearest position to what Dolby
specifies for Surround AC3 speakers.
- The true rear channels get a mix between Front and Side, which is
clearly incorrect. ITU R-REC-BS.775-3-201208 says that both sets of
surround channels should be fed the same signal.
Regarding that last point, do I understand correctly that the
recommendation is to duplicate the 5.1 rear(/side) channels to both the
side and rear channels in 7.1? Doesn't that cause imbalance by
amplifying the rear channels? Or is it compensated by attenuating the
signal?
You understood correctly. In my big patch, it is compensated by
attenuating the signal. Anyway, I am going to resubmit it later today
without the half-baked change about the LFE volume.
Sorry, I have to do it later. I have too much non-PulseAudio work to do :(
No problem, I'll postpone reviewing the patch until you've submitted
the new version. From what I already saw, the general idea behind the
patch seems good.
Hello Tanu,
thanks for your patience. I have tried to undo the half-baked LFE change
today, but found two more bugs in my patch that I would rather fix
1. AUX input channels get sometimes routed to non-AUX output channels
rather than being dropped. Fixing this right how.
2. Some inconsistencies if either input or output channel map contains
duplicates. Cannot really fix, because I don't know what's expected.
Could you please help with (2)? In particular, what would be the
expected channel matrix in the following two cases?
front-left, front-right, front-center ->
front-left, front-right, front-center, front-center
I would guess that we should generate two identical front-center output
channels, both duplicating the front-center input channel with the
coefficient being 1.0.
front-left, front-right, front-left, front-right -> front-left, front-right
Would it be OK if I drop the redundant input channels, i.e. use only the
first copy of each channel name? Or should I average the redundant
inputs, or take a sum?
Is there any spec?
I'm not aware of any valid use cases for duplicated channels (except
mono, which can be interpreted as a channel without defined position),
so there's no spec and at least I don't have expectations of any
particular behaviour. Your suggestion for case A seems reasonable, and
for case B I think we should do whatever is easiest to implement.
--
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk
Loading...