You are not logged in.

#1 2010-07-09 21:29:52

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

[SOLVED]XBMC > Alsa > Nvidia HDMI cant get dmix working with plughw:1,

With 2.6.34 i'm able to get audio through my Asus (Nvidia chipset) GF210. 

The issue is that in order to get audio in XBMC, i have to specify a custom audio device as plughw:1,7 and that seems to disable dmix -- ergo, no more two sounds at once (so no crossfade during music playback).

this is the only card description that works; it basically tells XBMC to output to the raw hardware directly on card 1 device 7 skipping all layers of abstraction (including dmix). 

this method is only recommended for applications that will do all their own mixing (think jackd).  so the behavior is to be expected.

some online docs say dmix will only work with the "default" device, others say it might work if i don't use the hw descriptor, but omitting the "hw" --> no sound at all.

the only other way i can get sound at all is to redefine pcm.!default as the plughw:1,7 device in /etc/asound.conf and then specify "default" in XBMC (this makes sense) but this still seems to mean no dmix.

obviously, resetting everything and using the normal VGA + Headphone-out mixes and crossfades just fine.

So, does anyone know:

  * a way to get dmix going with a custom plughw card/device
  * a way to tell XBMC to do the mixing on its own before sending the sound to plughw -- is this possible?

any help appreciated, it's more of a want than a need right now.

up to date 64bit, stock 2.6.34.1-1 kernel, and xbmc 9.11-17 if that matters.

Last edited by brisbin33 (2010-07-10 01:16:54)

Offline

#2 2010-07-09 21:52:08

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: [SOLVED]XBMC > Alsa > Nvidia HDMI cant get dmix working with plughw:1,

Getting dmix to run through a custom device is easy:

pcm.dmixer {
  type dmix
  ipc_key 2048
  slave {
    pcm "hw:1,7" # Always use pure hw. dmix will reformat/resample audio.
    period_size 512 # If you get stuttering/or non-working audio, fiddle around with these
    buffer_size 4096
    rate 48000 # HDMI, I'll assume 48kHz
    format S16_LE # Should be default for pretty much any soundcard.
  }
  bindings {
    0 0
    1 1
  }
}

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

Using this approach, everything will pass through dmix, which passes to hw:1,7.

Last edited by Themaister (2010-07-09 21:58:01)

Offline

#3 2010-07-10 01:06:20

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED]XBMC > Alsa > Nvidia HDMI cant get dmix working with plughw:1,

you are awesome.  testing this right now...

/edit -- wow; most of that is greek to me. i copied the dmixer part verbatim, added pcm.!default and pcm:iec958 (for passthrough) entries to use that and... IT WORKS.

if you're ever in the states, i owe you a beer... or a few.

Last edited by brisbin33 (2010-07-10 01:16:16)

Offline

#4 2010-10-31 12:00:08

delcypher
Member
Registered: 2010-04-17
Posts: 42

Re: [SOLVED]XBMC > Alsa > Nvidia HDMI cant get dmix working with plughw:1,

Just incase this is helpful to anyone. The above setup didn't work for me on my Acer Revo R3610 but the following .asoundrc did....

pcm.!default {
  type plug
  slave.pcm "dmix:0,3"
}

Where dmix:0,3 is with card 0 device 3. Use aplay -l to see which numbers are relevant for you.

Last edited by delcypher (2010-10-31 12:01:31)

Offline

#5 2010-10-31 12:13:46

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,074
Website

Re: [SOLVED]XBMC > Alsa > Nvidia HDMI cant get dmix working with plughw:1,

Great thread, thanks for the posts.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB