Author Topic: Testers needed: Preferably people with multiple sound cards (including onboard)  (Read 3888 times)

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
I have attached a script that should blow open all mixer channels on all cards. This is meant to occur before AVWizard eventually.

It works for my onboard sound... but as AVWizard is doing its own switching magic, I intend to unmute and raise volume on everything (onboard, 1 card, 2 cards, whatever...) and then mute unneeded channels after AVWiz does its thing.

In order to use this script, please download onto your core someplace
then cd into the directory it lives in
Code: [Select]
sudo su
alsamixer
Mute everything and exit (esc).
Code: [Select]
chmod +x amix.sh
./amix.sh

Then please check your alsamixer and make sure everything is unmuted and report success or failure here. Then feel free to mute everything you normally do. Also let me know if the levels are all pegged, or if they (as intended) are at 60%. I will handle the re-muting after AVWizard.

Please then paste the output of a file which is created in the same directory named amix.log
This is mine:
Code: [Select]
cat amix.log

umamix.sh generated script
#!/bin/bash
amixer set -c 0 "Master Front,0" 60 unmute
amixer set -c 0 "Headphone,0" 60 unmute
amixer set -c 0 "PCM,0" 60 unmute
amixer set -c 0 "Front,0" 60 unmute
amixer set -c 0 "Front Mic,0" 60 unmute
amixer set -c 0 "Surround,0" 60 unmute
amixer set -c 0 "Center,0" 60 unmute
amixer set -c 0 "LFE,0" 60 unmute
amixer set -c 0 "Side,0" 60 unmute
amixer set -c 0 "Line,0" 60 unmute
amixer set -c 0 "CD,0" 60 unmute
amixer set -c 0 "Mic,0" 60 unmute
amixer set -c 0 "IEC958,0" 60 unmute
amixer set -c 0 "IEC958 Default PCM,0" 60 unmute
amixer set -c 0 "IEC958,1" 60 unmute
amixer set -c 0 "Capture,0" 60 unmute
amixer set -c 0 "Capture,1" 60 unmute
amixer set -c 0 "Independent HP,0" 60 unmute
amixer set -c 0 "Input Source,0" 60 unmute
amixer set -c 0 "Smart 5.1,0" 60 unmute
Mixer settings
Simple mixer control 'Master Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [14.00dB] [on]
  Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 27
  Mono:
  Front Left: Playback 27 [100%] [0.00dB] [on]
  Front Right: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 60 [24%] [-39.00dB]
  Front Right: Playback 60 [24%] [-39.00dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 27
  Mono:
  Front Left: Playback 27 [100%] [0.00dB] [on]
  Front Right: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [14.00dB] [on]
  Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 27
  Mono:
  Front Left: Playback 27 [100%] [0.00dB] [on]
  Front Right: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 27
  Mono: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 27
  Mono: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 27
  Mono:
  Front Left: Playback 27 [100%] [0.00dB] [on]
  Front Right: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [14.00dB] [on]
  Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'CD',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [14.00dB] [on]
  Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [14.00dB] [on]
  Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 20
  Front Left: Capture 20 [100%] [35.00dB] [on]
  Front Right: Capture 20 [100%] [35.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 20
  Front Left: Capture 20 [100%] [35.00dB] [on]
  Front Right: Capture 20 [100%] [35.00dB] [on]
Simple mixer control 'Independent HP',0
  Capabilities: enum
  Items: 'OFF' 'ON'
  Item0: 'OFF'
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Stereo Mixer' 'Mic' 'Front Mic' 'Line' 'CD'
  Item0: 'Mic'
Simple mixer control 'Smart 5.1',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

To run on an md, as root, where XX is your moon number:
Code: [Select]
cp /wherever/exists/on/core/amix.sh /usr/pluto/diskless/XX/usr/pluto/bin   
ssh moonXX
/usr/pluto/bin/amix.sh
Then
Code: [Select]
cat /usr/pluto/bin/amix.logand paste here...

Thanks for those who help.
« Last Edit: June 11, 2011, 05:42:13 am by l3mce »
I never quit... I just ping out.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
My nVidia GT210 w/HDMI also has IEC958,2 & ,3.

Code: [Select]
amixer set -c 0 "IEC958,2" 60 unmute
amixer set -c 0 "IEC958,3" 60 unmute

This is currently handled by the script: '/usr/pluto/bin/SetupAudioVideo.sh', which runs before AVWizard. 

The current script is only affecting a couple of the possible devices. 

SPDIF devices do not have an associated 'volume' level unless a software mixer has been manually created for them in asound.conf.  App_Server cannot adjust the output (volume) level of digital (spdif) outputs without a mixer.  Audio is typically passed at the stored level of the sound file through spdif devices.

J.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Yes... this is all correct. The problem with the current script is that it only affects a couple of devices, as you said, and does not take into account multiple cards. While I am sending commands that cannot be used by certain devices, it causes no problems. Many things cannot be muted/unmuted or levels set. For everything else... there's this.

A lot of people report HDMI sound is not working simply because the proper channels are not unmuted. My idea was to blow everything open that can be open, and then after AVWizard sets device data in the DB, to mute everything except Master* and the used channels. Everything has different nomenclature for Alsa by manufacturer, so this seemed the best way to me to ensure that whatever is chosen is available... then on AVWizard close, rewrite the unmute script to mute save those listed as necessary.

Your help and insight is always appreciated.
I never quit... I just ping out.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Sorry l3me, I didn't mean to sound like I was suggesting what you were doing was incorrect.  On the contrary!

I was simply putting the information out there 'in case' you (or others following) were not aware.  It's impossible to tell what others do or do not know.

I think this is an important bug to tackle!  The work you're doing is very necessary and you should keep it up! 

J.

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Maybe stupid question.
But why not leave everything unmuted?

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Maybe stupid question.
But why not leave everything unmuted?

In my past experience, leaving channels open that are not used causes some low level cross hum. I haven't had that experience in linux... but old habits die hard. I also assume that some level of energy is being used unnecessarily, no matter how minute. I also have a superstition that multiple cards compound this issue. Just leaving everything open felt like a cheap hack not worthy of LMCE.

In truth there is probably no issue doing it... it just felt weak... with theoretical downsides, and a clear solution using the existing elements to eliminate it.
I never quit... I just ping out.