Kodi Community Forum

Full Version: Dharma beta 3 and 04-configNVIDIAasoundrc.sh
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
updated today to Dharma beta 3, im running lucid 10.04 with installed xbmc-live.

i found the 04-configNVIDIAasoundrc.sh and would like to know if its supposed to run on startup of xbmc-live? i don't have an ~/.asoundrc and as far as i understand the script the script will check my audio devices with "aplay -l" and grep functions to auto-generate an ~/.soundrc config file to be used with xbmc

i tried running the script manually, so i "chmod +x" and run the script but nothing happend. Oo

my understanding of scripting is limited. maybe im under the wrong impression and this script is not supposed to produce that out?
Remove "noalsaconfig" from kernel parameters (/etc/default/grub), run update-grub and the script will do something meaningful.
hi l.capriotti ! thanks for helping me out on this.

i checked my /etc/default/grub and there is no kernel parameter "noalsaconfig"
when i run the script manually "sudo /etc/xbmc/live.d/04-configNVIDIAasoundrc.sh" no ~/.asoundrc gets created

my /etc/default/grub looks like this:

Code:
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=1 xbmc=autostart,nodiskmount,setvolume loglevel=0 video=uvesafb:mode_option=1280x720-32@60,mtrr=3,scroll=ywrap"
GRUB_CMDLINE_LINUX="acpi_enforce_resources=lax"

note: i don't use the xbmcfreak-livecd but i do have xbmc with live script installed.

im using nvidia ion gen1
Probably we don't have your "fingerprints" already Smile

Pls post the the output of:
Code:
lspci -nn | grep '0403'

If you are comfortable with editing the script add a "set -x" at the beginning and you will see the commands being executed, you will see what's going on and why it quits before creating the asoundrc.
well the "fingerprint" is actually in the script that was the main reason why i was wondering why it didn't work on my box Smile
Code:
xbmc@xbmc:~$ lspci -nn | grep '0403'
00:08.0 Audio device [0403]: nVidia Corporation MCP79 High Definition Audio [10de:0ac0] (rev b1)

here is the scripts "output"
xbmc@xbmc:~$ sudo /etc/xbmc/live.d/04-configNVIDIAasoundrc.sh
Code:
++ lspci -nn
++ grep 10de:0ac0
++ grep 0403
+ NvidiaHDMIFirstGen='00:08.0 Audio device [0403]: nVidia Corporation MCP79 High Definition Audio [10de:0ac0] (rev b1)'
++ lspci -nn
++ grep 0403
++ grep 10de:0be3
+ NvidiaHDMISecondGen=
+ '[' '!' -n '' ']'
+ '[' '!' -n '00:08.0 Audio device [0403]: nVidia Corporation MCP79 High Definition Audio [10de:0ac0] (rev b1)' ']'
++ cat /proc/cmdline
+ kernelParams='BOOT_IMAGE=/vmlinuz-2.6.32-25-generic root=UUID=018e97df-f7e6-4bb9-af17-a7af4aa7deda ro acpi_enforce_resources=lax quiet splash usbcore.autosuspend=1 xbmc=autostart,nodiskmount,setvolume loglevel=0 video=uvesafb:mode_option=1280x720-32@60,mtrr=3,scroll=ywrap'
+ subString='autostart,nodiskmount,setvolume loglevel=0 video=uvesafb:mode_option=1280x720-32@60,mtrr=3,scroll=ywrap'
+ xbmcParams=autostart,nodiskmount,setvolume
+ activationToken=noalsaconfig
+ '[' autostart,nodiskmount,setvolume '!=' autostart,nodiskmount,setvolume ']'
++ aplay -l
++ grep 'NVIDIA HDMI' -m1
++ awk '{ print $2 }'
++ awk -F: '{ print $1 }'
+ HDMICARD=
++ aplay -l
++ grep 'NVIDIA HDMI' -m1
++ awk -F: '{ print $2 }'
++ awk '{ print $5 }'
+ HDMIDEVICE=
+ '[' -n '00:08.0 Audio device [0403]: nVidia Corporation MCP79 High Definition Audio [10de:0ac0] (rev b1)' ']'
+ DIGITALCONTROL='VT1708S Digital\|ALC662 rev1 Digital\|ALC1200 Digital\|ALC662 Digital\|ALC889A Digital\|ALC888 Digital\|ALC887 Digital'
+ '[' -n '' ']'
++ aplay -l
++ grep 'VT1708S Digital\|ALC662 rev1 Digital\|ALC1200 Digital\|ALC662 Digital\|ALC889A Digital\|ALC888 Digital\|ALC887 Digital'
++ awk -F: '{ print $1 }'
++ awk '{ print $2 }'
+ DIGITALCARD=0
++ aplay -l
++ grep 'VT1708S Digital\|ALC662 rev1 Digital\|ALC1200 Digital\|ALC662 Digital\|ALC889A Digital\|ALC888 Digital\|ALC887 Digital'
++ awk -F: '{ print $2 }'
++ awk '{ print $5 }'
+ DIGITALDEVICE=1
++ aplay -l
++ grep Analog -m1
++ awk -F: '{ print $1 }'
++ awk '{ print $2 }'
+ ANALOGCARD=0
++ aplay -l
++ grep Analog -m1
++ awk -F: '{ print $2 }'
++ awk '{ print $5 }'
+ ANALOGDEVICE=0
+ '[' -z ']'
+ exit 0

it looks fine to me except no ~/asoundrc is created Sad
what exactly does this script do?



-=Jason=-
celox: output of "aplay -l" please.
Flomaster: it builds a asoundrc file so that you have all sounds on all outputs: hdmi, spdif, analogue.
l.capriotti Wrote:celox: output of "aplay -l" please.
Flomaster: it builds a asoundrc file so that you have all sounds on all outputs: hdmi, spdif, analogue.

ZOMG......

sounds magical, does this profile allow for HDMI and analog at the same time?

as of now I have to switch from audio output of default using HDMI to custom plughw:0,0 to get sound to my zone 2 backyard channels

-=Jason=-
l.capriotti Wrote:celox: output of "aplay -l" please.
Flomaster: it builds a asoundrc file so that you have all sounds on all outputs: hdmi, spdif, analogue.

sry, of course i forgot aplay -l Smile

xbmc@xbmc:~$ aplay -l
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
l.capriotti Wrote:Flomaster: it builds a asoundrc file so that you have all sounds on all outputs: hdmi, spdif, analogue.

Is it supposed to add navigation sounds as well? Cause I have sound in videos just fine, but no navigation sounds. Had to revert back to my old .asoundrc to get it back.
bump... I am now on beta3 I have menu sounds I have no sound for anything digital. where can one acquire this magical script

-=Jason=-
EDIT:a fresh install had my HDMI output muted *palmface* I had to go into alsamixer and unmute those two channels
Flomaster Wrote:where can one acquire this magical script
Code:
/etc/xbmc/live.d/04-configNVIDIAasoundrc.sh
I have B3 installed I ran the script now to test when I get home.

what settings need be used in the audio section of the GUI.

audio output: HDMI, Default, Custom
passthrough: HDMI, Decault, Custom?

-=Jason=-

my newly created file looks like so
Code:
xbmc@XBMCLive:/etc/xbmc/live.d$ cat ~/.asoundrc

pcm.both {
        type route
        slave {
                pcm multi
                channels 6
        }
        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.0.2 1.0
        ttable.1.3 1.0
        ttable.0.4 1.0
        ttable.1.5 1.0
}

pcm.multi {
        type multi
        slaves.a {
                pcm "hdmi_hw"
                channels 2
        }
        slaves.b {
                pcm "digital_hw"
                channels 2
        }
        slaves.c {
                pcm "analog_hw"
                channels 2
        }
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave b
        bindings.2.channel 0
        bindings.3.slave b
        bindings.3.channel 1
        bindings.4.slave c
        bindings.4.channel 0
        bindings.5.slave c
        bindings.5.channel 1
}

pcm.hdmi_hw {
        type hw
        card 0
        device 3
        channels 2
}

pcm.hdmi_formatted {
        type plug
        slave {
                pcm hdmi_hw
                rate 48000
                channels 2
        }
}

pcm.hdmi_complete {
        type softvol
        slave.pcm hdmi_formatted
        control.name hdmi_volume
        control.card 0
}

pcm.digital_hw {
        type hw
        card 0
        device 1
        channels 2
}

pcm.analog_hw {
        type hw
        card 0
        device 0
        channels 2
}

having a look at the script it looks like I might need to change to this or the script will automatically make the changes for me

Code:
<settings>
    <audiooutput>
        <audiodevice>custom</audiodevice>
        <channellayout>0</channellayout>
        <customdevice>plug:both</customdevice>
        <mode>2</mode>
        <passthroughdevice>alsa:hdmi</passthroughdevice>
    </audiooutput>
</settings>
well running the 04 script did generate an asoundrc file for me, however I am not able to get it working...

from the script settings I "THINK" I was to use the following settings

audio ouput= plug:both
passthrough= alsa:hdmi

well I got menu sounds just fine, but any digital audio source Dts or DD 5.1 told me I had a sound error of some sort. sorry no debug log at the moment im to frustrated to change it all back. I just want to watch my damn movie in peace.

-=Jason=-
Dharma beta 3 broke my pass-through audio as well. Using a Viewsonic VOT132 (ION-powered) and my old settings (.asoundrc) no longer work.

Can't seem to get the pass-through back, but menu sounds work (they didn't before).

EDIT: OK, figured it out using this link that I should just remove .asoundrc and set PulseAudio for the HDMI passthrough. No menu sound, but passthrough works fine.

EDIT 2: After a reboot, it stopped working again. Took me an hour to figure out what was going wrong. Got the .asoundrc back from this link and it looks like it's working now (but no menu sounds).
Pages: 1 2