Showing posts with label surround sound. Show all posts
Showing posts with label surround sound. Show all posts

Tuesday, December 5, 2023

Audio Pop/Click on Roku Express 4K+ Plex AAC 5.1/7.1 Surround

This is just a quick post about a dumb problem that I had a lot of trouble pinning down: audio popping on my Roku. The tl;dr is: set "direct play" to "auto" instead of "forced." If you'd like to understand why, keep reading.

Background

I got a new TV recently--a Hisense U7H--to replace my crappy, ultra-budget TCL 4-series Roku TV. I was planning to use the built-in Android OS to run the Plex app to stream media from my local server but the app apparently sucks in a number of strange ways, especially when it comes to music and playlists, so I bought a cheap Roku Express 4K+.

The Problem

Some of my videos started having an annoying popping/clicking in the audio. I tried the same videos with the native Android app and that resolved the clicking, so I was pretty sure it was Roku-specific. From there, I did some googling and came up with some possibilities: apparently Roku OS 10 has some sort of issue with AAC and AC3 streams, and there are some issues with Roku's "audio leveling" feature. I tried reencoding the audio on a persistently popping video from AAC to AC3 and the popping went away, so I don't think it was the OS 10 issue, and I didn't have the audio leveling enabled in the first place, so it didn't seem to be that one either.

Additionally, I tried playing the offending video on Jellyfin to rule out any Plex-specific issue and popped/crackled there, too.

One of the posts in the audio leveling thread caught my eye, though:

With a little more searching, I learned that Roku devices apparently cannot playback AAC via hardware at all(?) and will, at best, convert them to something else, but they apparently don't have the grunt to decode multi-stream audio--like 5.1 or 7.1 surround--at full speed, which results in the popping.

The Solution

The solution appears to be changing the "direct play" setting in the player/client from "force," which I had selected to minimize the CPU load on my server, to "auto." Your server will have to reencode the audio more often, but it should get rid of the pops.

Monday, August 25, 2008

How to Enable Surround Sound in Ubuntu Linux

Update (04/21/10): The information in this original post is no longer applicable since Ubuntu switched to the PulseAudio sound infrastructure. I'm leaving it all here for reference, but here's how to do it now:

Step 1: open up a terminal (Applications > Accessories > Terminal or Alt+F2 and type 'gnome-terminal' into the command applet)

Step 2: at the command prompt, type alsamixer

Your prompt should change to something like this:

Step 3: Scroll all the way to the right (using the arrow keys) until you reach a section labeled "Channel." It will most likely say "2ch" over it. Press the 'up' arrow key until it says 6ch (for 5.1 surround) or 8ch (for 7.1 surround).

Exit the alsamixer program by pressing ctrl+C. You should be all set. You may have to go into your Sound Preferences and change either the 'Profile' setting on the 'Hardware' tab or fiddle with the devices in the 'Output' tab. I didn't have to do this, but you might.

If you have any problems, leave me a note in the comments and I'll try to help.

Update (10/08/08): I was using Gutsy when I wrote this post, but I have since upgraded to Intrepid Ibex (8.10) and it still works for me. YMMV

I've been hard at work lately trying to get my motherboard's (an Asus M2V-MX SE socket AM2) 6-channel surround sound working with Linux and it's been a surprisingly stubborn pain in my ass. However, I finally succeeded this past weekend and decided to document my process here for others to hopefully benefit from.

The first complication I ran into when trying to get surround sound working is that my mobo does not have the normal multichannel output jacks. That is, instead of having the blue, orange, and black plugs that are in most multichannel setups, it instead just has what appears to be standard blue, pink, and green jacks that are usually used for stereo output, mic-input, and line-in, respectively.

What is poorly documented, though, is that the pink and green jacks can double as the orange and black plugs when enabled by software. It's a stupid way of doing things, IMHO, but low-end mobo manufacturers apparently do it to save costs.

Anyway, in Windows, enabling this hidden functionality was accomplished using the Realtek Sound Manager program that was installed with my sound driver. However, as with damn-near all driver utilities, it does not have a Linux equivalent.

Instead, open the Alsa-mixer GUI by double-clicking on the speaker icon in the upper-right of the screen (a.k.a., the Volume Control applet):

Then select 'Preferences' from the 'Edit' pull-down menu:

From here, you'll want to scroll down a bit and check the 'Channel Mode' box, and you'll probably want to check the 'Surround,' 'Front,' 'LFE,' and 'Center' boxes as well:

When you go back to the main applet, click on the 'Options' tab, which should now have an option to choose the number of channels:

Select '6ch' for a 5.1 setup or '8ch' in a 7.1 setup. This should unlock the hidden functionality of those pink and green jacks. On my system, the pink jack converts to the orange function and the green converts to the black function, but YMMV.

You could stop here, but I suggest doing one more step to make sure everything is configured properly. Open up a terminal and type:
speaker-test -Dplug:surround51 -c6 -twav
This will make a creepy disembodied voice play through each channel in succession so you can be sure your speakers are plugged into the right jacks.

Btw, this command is for a 5.1 / 6-channel surround card. A 7.1 system will use this command instead:
speaker-test -Dplug:surround71 -c8 -twav
For some people (like me), the system automatically duplicates the front channels' sound to the back channels for listening to stereo sources, such as mp3s, normal non-DVD video files, etc. Other people, however, will need to do a bit more to make this happen. If you're one of these people, open up a terminal and type:
gedit ~/.asoundrc
Whether this file is blank or already has some stuff in it, just skip down to the bottom and copypasta this in (courtesy of the Gentoo wiki):
pcm.!dmix {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
channels 6
period_size 512
buffer_size 1024
}
}
pcm.!default {
type plug
slave.pcm "dmix"
slave.channels 6
route_policy duplicate
}
You may have to change "hw:0,0" to something else, depending on your sound card's location. When you restart, surround signals will still work like before, but stereo signals should be duplicated. If, on the other hand, you have no sound or your sound is weird, just reopen the ~/.asoundrc file and delete the part you added (or try one of the other configurations from the aforementioned Gentoo wiki). No big deal.

Let me know in the comments if this works for you or not or if you have any questions.

Analytics Tracking Footer