Emulators (NES, SNES, etc) in XBMC Live?
#16
Both I and Harry forgot to mention that it is hw dependent.

Quote:pcm "hw:0,3"

the 3 is often hdmi.
0 is the first sound card.
Reply
#17
cool yeah plughw:0,3 is the correct config for me.. Nvidia Ion mobo...

my .asoundrc now looks like this. I added my /etc/asound.conf to the end of it so I get correct AAC channel mapping I hope it doesn't mess things up.

Code:
pcm.dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0660
slave {
pcm "hw:0,3"
rate 48000
channels 2
period_time 0
period_size 1024
buffer_time 0
buffer_size 4096
}
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.!hdmi-remap {
type asym
playback.pcm {
type plug
slave.pcm "remap-surround71"
}
}

pcm.!remap-surround71 {
  type route
  slave.pcm "hw:0,3"
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.2= 1
    5.3= 1
    6.6= 1
    7.7= 1
  }
}

-=Jason=-

just to confirm..

Code:
xbmc@XBMCLive:~$ aplay -
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
aplay: main:654: audio open error: Device or resource busy
xbmc@XBMCLive:~$ aplay -l
**** 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: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

EDIT: GREAT SUCCESS.....

my .asoundrc now looks like this. I added my /etc/asound.conf to the end of it so I get correct AAC channel mapping I hope it doesn't mess things up.

Code:
pcm.dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0660
slave {
pcm "hw:0,3"
rate 48000
channels 2
period_time 0
period_size 1024
buffer_time 0
buffer_size 4096
}
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.!hdmi-remap {
type asym
playback.pcm {
type plug
slave.pcm "remap-surround71"
}
}

pcm.!remap-surround71 {
  type route
  slave.pcm "hw:0,3"
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.2= 1
    5.3= 1
    6.6= 1
    7.7= 1
  }
}


this .asoundrc file fixed my Zsnes but Mendafen was still fubar with a google searched I found out that possibly adding -sounddriver OSS to my arg MIGHT work I guess it forces ALSA to use DEFAULT settings or some thing. well I had -sounddriver SDL or some thing before and it didn't work.

so I have working audio every where, only downside is which really isn't even a big deal at all is to get audio to my ZONE2 aka Backyard I have to switch my audio output from Default to Custom plughw:0,0

im really F*ing stoked to have sound working in my emulators I just wish it wasn't like fining a needle in a haystack for each configuration.
Reply
#18
sorry to startup an old thread but the .asoundrc stuff above doesn't work for me. mednafen seems to think it's starting sound, but i get no sound through hdmi (sound works fine in general xbmc).

i'm in xmbc 10 (dharma)

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Code:
Initializing sound...
  Using "ALSA" audio driver with device "default":
   Bits: 16
   Rate: 48000
   Channels: 2
   Byte order: CPU Native
   Buffer size: 1536 sample frames(32.000000 ms)

i've tried -sounddriver with OSS, ALSA, etc all with no effect.

ideas? logs to check? (i don't see anything modified recently in /var/log)
thanks!
Reply
#19
i looked into /proc/asound/devices which should reflect aplay -l:
Code:
2:        : timer
  3:        : sequencer
  4: [ 0- 3]: digital audio playback
  5: [ 0- 0]: digital audio playback
  6: [ 0- 0]: digital audio capture
  7: [ 0- 3]: hardware dependent
  8: [ 0- 0]: hardware dependent
  9: [ 0]   : control

so maybe i can/have-to use -sounddevice with mednafen. here are my devs:
Code:
erict@XBMCLive:~$ ls /dev/snd/
by-path/  controlC0  hwC0D0  hwC0D3  pcmC0D0c  pcmC0D0p  pcmC0D3p  seq  timer
i guess i'll go try pcmC0D3p when i get a chance.
pcm card 0, device 3, playback
c is for capture.

edit: solved the sound issue! -sounddevice /dev/pcmC0D3p did NOT work. i get something about device not found.
but if i use:
Code:
/usr/games/mednafen -fs 1 -sounddriver alsa -sounddevice "sexyal-literal-default"
the sound works, albeit with a nasty pop when mednafen launches.
for dharma my "launchers.xml" is in:
.xbmc/userdata/addon_data/plugin.program.launcher

i used the launcher context menus to create it, and add the <roms> lines, but i edited the application and args lines so i could get sound working and send mednafen's stdout and stderr to a logfile.

thanks all! this should go on the wiki, no?
Reply

Logout Mark Read Team Forum Stats Members Help
Emulators (NES, SNES, etc) in XBMC Live?1