ALSA issues: Channel mapping and volume
#1
Question 
Hi there,


I'm cross posting here and with a thread I've created on the ubuntu forums as I'm hoping that wider exposure might net me some answers. Whilst I realise that this isn't totally an XBMC specific question, it may well be something others have come across .. though a few searches have revealed that where they have there is little in the way of posted answers Sad


I'm having some sound issues with my HTPC XBMCbuntu build (specs at end of post) and was hoping for some community advice. I've done some reading around and think that I have a solution to most of the issues I'm having, but basically this project was started with sound quality as a goal, so if anyone can suggest a better solution I'm all ears.

Basically I have the following issues:

  1. Volume is extremely loud. Right now in alsamixer I have the volume set to -38dB (1%) of gain and it is what I would term "normal" listening level. The next step down is off. I've actually blown the front grill off a test speaker whilst playing around with sound on the card;
  2. The centre and LFE speakers are mapped to the wrong channels; and
  3. I can only get output from the rear speakers when I use pcm.surround71, any of the others (surround40, surround51) and nothing comes out.

So, I figure the solution lies in editing the ~/.asoundrc as I can do the following:

  1. Address the volume issues by lowing the output for each speaker in the ttable mappings;
  2. Swap the mixed up speakers/channels over again in the ttable mappings; and
  3. Change the surround51 to be an 8 channel mapping with the side channels set to a volume of 0.

So basically does anyone have a better solution or can they confirm that this would be the approach to fix this? Also could they confirm that if I were to play an Dolby Digital or DTS movie that the sound card would decode these correctly?

Thanks in advance,
~Dan

Setup:
Alsa version 1.0.23 (comes with Ubuntu)

Ubuntu x64 server 10.10 "Maverick Meerkat" Minimal (2.6.35-24-generic)
XBMC 10.0 r35648 (Compiled : Dec 17 2010)
Asus AT3N7A-I ION Motherboard, Intel Atom 330, 2GB Kingston EEC DDR2 PC2-6400 (800), GeForce 9400 mGPU (Built-in), Auzentech X-Merridian 7.1 (Oxygen HD, CMI8788), 32 GB OCZ SSD 2.5" SATA, LG GGC-H20L Blu-Ray & HD-ROM, PicoPSU 120W Red
Please ignore the specs in my sig, just noticed how out of date they are :oo:

XBMC 10.5 r31718 (Compiled) + Transparency! 3.06, Ubuntu Minimal Server 9.11 Karmic (2.6.31-22-generic)

Asus AT3N7A-I ION Motherboard, Intel Atom 330, 4GB (2x2GB) Corsair TwinX XMS2 DDR2 PC2-6400 (800), GeForce 8300 mGPU (Built-in), 320 GB Fujitsu MHZ2320BH Notebook 2.5" SATA, LG GGC-H20L Blu-Ray & HD-ROM, PicoPSU 120W Red
Reply
#2
I can't help with the high output volume - that's a bit weird, and may be a issue with the Auzentech, but a ttable solution would be a workaround.

Linux uses a different channel mapping 'standard' than Windows. 6 or 8 channel FLAC or WAVS (or any other format that is decoded to LPCM) will be incorrectly mapped unless you uses a route and ttable in your asound.conf or .asoundrc. The same will occur with AC3, DTS & AAC if it's sent as LPCM. If you bitstream DTS & AC3 you should be OK.

When I was using a analogue solution, I had several workarounds - one involved using DVDPlayer (maps differently than PAPlayer) to play audio with some outputs swapped at the sound card. I use HDMI only now and all my 6ch FLAC's have the channels re-mapped and I use MPD to play audio and XBMC for video and DTS/AC3. I have multiple outputs in ALSA configured to let MPD and XBMC output correctly.

The new Audio Engine for XBMC may fix all these issues, but it is some time in the (hopefully near) future.
Reply
#3
Balthazaar Wrote:I can't help with the high output volume - that's a bit weird, and may be a issue with the Auzentech, but a ttable solution would be a workaround.

I've submitted a support request to Auzentech asking about the high output volume. Apparently its a feature of the card ... though with a 5V output I'd hate to ever make the mistake of plugging some headphones in the back, that could likely be bye-bye headphones and bye-bye ears Shocked

Interestingly enough though I don't have so much of a volume issue when watching video, in fact almost the opposite Sad So, with music and especially the menu sounds I have to keep XBMC's volume as low as possible and for movies I have to throw it up to near 100%. I'm not sure I'm going to be able to explain that one to the wife Oo For now I've disabled menu sounds (the reset to 100% bug is way to risky) and will have to make sure she understand the volume needs to be low for music ... maybe I'll try your DVDplayer suggestion and see if that affects the music volume. At least if I could have a consistent level for *loud* it would be easier.

Balthazaar Wrote:When I was using a analogue solution, I had several workarounds - one involved using DVDPlayer (maps differently than PAPlayer) to play audio with some outputs swapped at the sound card. I use HDMI only now and all my 6ch FLAC's have the channels re-mapped and I use MPD to play audio and XBMC for video and DTS/AC3. I have multiple outputs in ALSA configured to let MPD and XBMC output correctly.

The new Audio Engine for XBMC may fix all these issues, but it is some time in the (hopefully near) future.

Yea, I'm looking forward to AE ... and quite a few other up-coming features. That sounds like some serious time investing in getting sound right. I've implemented the ttable routing so sound is coming out of the right places now. I also discovered that the Auzentech card changes the ports depending on whether you are using 5.1 or 7.1. The side channels become the rear channels in 5.1. Why I don't know, but basically I'm forced into upmixing 5.1 to 7.1 or down mixing everything to 5.1 Oo

I'm also convinced that the Auzentech card is applying a low-pass filter to my centre channel, the sound seems muddy and slightly muffled.

I'd love to know if there is a neater solution to this though (beyond buying a completely new card that is Wink)
Please ignore the specs in my sig, just noticed how out of date they are :oo:

XBMC 10.5 r31718 (Compiled) + Transparency! 3.06, Ubuntu Minimal Server 9.11 Karmic (2.6.31-22-generic)

Asus AT3N7A-I ION Motherboard, Intel Atom 330, 4GB (2x2GB) Corsair TwinX XMS2 DDR2 PC2-6400 (800), GeForce 8300 mGPU (Built-in), 320 GB Fujitsu MHZ2320BH Notebook 2.5" SATA, LG GGC-H20L Blu-Ray & HD-ROM, PicoPSU 120W Red
Reply

Logout Mark Read Team Forum Stats Members Help
ALSA issues: Channel mapping and volume0