• Virtual Surround Sound with USB Headsets on GNU/Linux

    From Berki Yenigüun@1:103/705 to All on Saturday, November 19, 2022 14:28:00
    Hi all,

    I have two USB headsets, one is an HP Pavilion Gaming 600 and the other one is a cheap headset from a JMTek LLC. Both claim to support virtual 7.1
    surround sound, only on Windows 10 for the former, on GNU/Linux too for the latter.

    The latter is shown as the following with lsusb:
    Bus 003 Device 117: ID 0c76:161f JMTek, LLC. USB PnP Audio Device
    and according to the linux-hardware database, it's rather common.

    My problem is that no matter how hard I tried under Ubuntu 24.04.1 and Fedora 36, I couldn't get the surround sound to work. Stereo and mic do work fine,
    but I can't enjoy my movies in AC-3. Pavucontrol and alsamixer only show two channels.

    Has anyone faced a similar problem? What was your solution? At worst, do you know a reasonably priced USB headset that can support at least 5.1 on GNU/Linux? Thanks in advance.

    ... MultiMail, the new multi-platform, multi-format offline reader!
    --- MultiMail/Linux v0.52
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Maurice Kinal@1:153/7001.2989 to Berki Yenigüun on Saturday, November 19, 2022 16:36:06
    Hey Berki!

    I couldn't get the surround sound to work.
    Stereo and mic do work fine, but I can't enjoy my movies in AC-3.

    AC-3 is a problem for some apps due to licensing issues. Best to avoid it if possible. Best of luck with that.

    Life is good,
    Maurice

    ... Fidonet 4K - Sweet Sixteen Penguins of the Apocalypse.
    --- GNU bash, version 5.2.2(1)-release (x86_64-pc-linux-gnu)
    * Origin: One of us @ (1:153/7001.2989)
  • From Berki Yenigüun@1:103/705 to Maurice Kinal on Saturday, November 19, 2022 22:26:00
    Maurice Kinal wrote to Berki Yenig}'un <=-

    @MSGID: <63790C88.48984.linux@vert.synchro.net>
    Hey Berki!

    Hey Maurice!

    AC-3 is a problem for some apps due to licensing issues. Best to avoid
    it if possible. Best of luck with that.

    Thanks, and I have some good news: all the AC-3 patents expired. It's now a free format, just like the MP3. See: https://blogs.gnome.org/uraeus/2017/03/22/another-media-codec-on-the-way/
    -- and on December 7th, Xvid will likely become free as well (IANAL of course but a simple search with Xvid patent expiration can bring up a Wikimedia
    page, even with the possibility of getting notified of the event).

    Well, now back to fiddling with my headsets... It kinda feels like the good
    old winmodem days :/

    ... MultiMail, the new multi-platform, multi-format offline reader!
    --- MultiMail/Linux v0.52
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Maurice Kinal@1:153/7001.2989 to Berki Yenigüun on Saturday, November 19, 2022 23:12:30
    Hey Berki!

    Thanks, and I have some good news: all the AC-3 patents expired.

    I haven't heard about that ... yet. I'll check later and see what the ffmpeg - and the like - people think about it.

    Well, now back to fiddling with my headsets... It kinda feels
    like the good old winmodem days :/

    OUCH!!! If that is true then I'd say abanodon it now before it's too late.

    Just out of curiousity, given you only have two ears ... errrr you do have two no? ... why surround sound at all on headphones? Is it that much better that it is worth the extra hoops one has to jump through?

    Life is good,
    Maurice

    ... Fidonet 4K - Sweet Sixteen Penguins of the Apocalypse.
    --- GNU bash, version 5.2.2(1)-release (x86_64-pc-linux-gnu)
    * Origin: One of us @ (1:153/7001.2989)
  • From Berki Yenigüun@1:103/705 to Maurice Kinal on Sunday, November 20, 2022 20:59:00
    Maurice Kinal wrote to Berki Yenig}'un <=-

    @MSGID: <637965D8.48986.linux@vert.synchro.net>
    Hey Berki!

    Hi Maurice!

    I haven't heard about that ... yet. I'll check later and see what the ffmpeg - and the like - people think about it.

    See https://web.archive.org/web/20170401170436/https://ac3freedomday.org/ for more information.

    Just out of curiousity, given you only have two ears ... errrr you do
    have two no? ... why surround sound at all on headphones? Is it that
    much better that it is worth the extra hoops one has to jump through?

    In fact a friend of mine had shown me his surround sound system like 10
    years ago. I was doubtful but after hearing it, it really made a difference. Out of curiosity, I wanted to give it another try. As I don't want to bother neighbors and prefer headsets anyway, I opted for one that supports virtual surround. I hope the result will be worth it, but I couldn't manage to listen to a file with surround sound so far so I can't tell (yet?). As for the extra hoops, I can only say I find it interesting and funny to try and make stuff work. So far, no success though.

    ... MultiMail, the new multi-platform, multi-format offline reader!
    --- MultiMail/Linux v0.52
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Maurice Kinal@1:153/7001.2989 to Berki Yenigüun on Sunday, November 20, 2022 19:01:53
    Hey Berki!

    I checked out the site and noted (reformatted quote);

    The following open source libraries implement AC-3:

    * libavcodec in ffmpeg (LGPLv2.1+) and libav (LGPLv2.1+)

    * Decoder and encoder for AC-3
    * To compile only the AC-3 decoder: --disable-everything
    --enable-decoder=ac3
    --enable-demuxer=ac3
    --enable-parser=ac3
    (then enable other parsers, demuxers, muxers, decoders, and
    encoders that you need)
    * To compile the AC-3 decoder and the AC-3 encoder:
    --disable-everything
    --enable-encoder=ac3
    --enable-decoder=ac3
    --enable-muxer=ac3
    --enable-demuxer=ac3
    --enable-parser=ac3
    (then enable other parsers, demuxers, muxers, decoders, and
    encoders that you need)
    * Warning: When preparing to use libavcodec in any product,
    you should always start by disabling all encoders, decoders,
    parsers, muxers, demuxers, bitstream filters, protocols,
    filters, and hwaccels, then selectively enabling the
    ones that your product absolutely needs. To do this, use
    --disable-everything as your first ./configure option. This
    will help protect your product from unnecessary intellectual
    property disputes as well as some security vulnerabilities.
    If you have not added --disable-everything as your first
    option, you should at least manually disable the encoders,
    decoders, muxers, demuxers, and parsers for eac3, mlp, and
    truehd.
    * liba52 (GPLv2) used by VLC and others

    * Decoder only for AC-3

    * valib from AC3Filter (GPLv2)

    * Decoder and encoder for AC-3. Note: Build process does not
    allow easy removal of patented E-AC-3 code.

    Of the above three listed above I have /usr/lib/liba52.so.0.0.0 and /usr/lib/libavcodec.so.59.37.100.

    $ ffmpeg -version
    ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
    built with gcc 12.2.0 (GCC)
    configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --disable-debug --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-openssl --docdir=/usr/share/doc/ffmpeg-5.1.2
    libavutil 57. 28.100 / 57. 28.100
    libavcodec 59. 37.100 / 59. 37.100
    libavformat 59. 27.100 / 59. 27.100
    libavdevice 59. 7.100 / 59. 7.100
    libavfilter 8. 44.100 / 8. 44.100
    libswscale 6. 7.100 / 6. 7.100
    libswresample 4. 7.100 / 4. 7.100
    libpostproc 56. 6.100 / 56. 6.100

    Note that none of the --enables mention anything about ac3 as per the recommendation for both the encoder or decoder. So far it has never been an issue.

    I was doubtful but after hearing it, it really made a difference.

    I'll take your word for it. I used to like in the good ol' days when they had sound rooms in stores that sold audio equipment so one could listen to before buying.

    As I don't want to bother neighbors and prefer headsets anyway, I
    opted for one that supports virtual surround.

    Understood. If you're getting 2 channel stereo at least that is better than nothing which is what Winmodems (your analogy) true value was. You're probably far ahead of the game already, comparitively speaking.

    Life is good,
    Maurice

    ... Fidonet 4K - Sweet Sixteen Penguins of the Apocalypse.
    --- GNU bash, version 5.2.2(1)-release (x86_64-pc-linux-gnu)
    * Origin: One of us @ (1:153/7001.2989)