Re: no .asoundrc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





17 aug 2012 kl. 04:44 skrev Doug <dmcgarrett@xxxxxxxxxxxxx>:

On 08/16/2012 07:53 PM, Doug wrote:
On 08/16/2012 04:29 PM, Anders Genell wrote:

16 aug 2012 kl. 19:07 skrev Doug <dmcgarrett@xxxxxxxxxxxxx
<mailto:dmcgarrett@xxxxxxxxxxxxx>>:

I'm running PCLinuxOS, and it does not come with .asoundrc.  Some time
ago I asked here for some help to get
sound to come out of BOTH the Intel on-board sound decoder and the
GeForce NVidia HDMI port at the same
time all the time. (The NVidia card has its own sound decoder.)  If I
had .asoundrc, would that help, and if so, what
should the script be?

--Thanx--doug
Dear Doug!

Below are the hints I could manage to scramble together during your
last troubleshooting,
- I don't know if they are still useful?

Regards,
Anders


I found a version of it here:
http://wiki.linuxquestions.org/wiki/M-Audio_Quattro
although it mentions /root/.asoundrc as proper placement which I
would not recommend.

The idea is to create a "multi" device from your two hardware devices
(e.g. hw:0,0 and hw:1,0) as described for the Quattro. Then create a
"plug" device for handling automatic conversion (your software might
not support the precise format needed by the "multi" device). In the
example there is a routing table for the "plug" device consisting of
expressions like "ttable.0.0 1;"
Those _expression_ mean something like "route input nr 0 to output nr 0
with level 1". Channels are numbered from 0. By doing something like
ttable.0.0 1;
ttable.1.1 1;
ttable.0.2 1;
ttable.1.3 1;
you duplicate what is coming on the first two channels from your
software to the two output channel pairs. If you have setup the
"multi" device properly that would mean sound out on both devices.
There are a number of pitfalls that may need to be avoided, but give
it a go and shout back if you get stuck!

Regards,
/A

/snip/

I am still kind of snowed by all this, as I have been all along.  Do you
suggest that I just copy the M-Audio_Quattro file, just modifying the
ttable lines iaw with your suggestion?  And call it .asoundrc? Or do
something else?
Do I need to do anything about a jack input, and if so, do I need a
script for that?
I'm not sure what Quattro is/was--I found some kind of usb audio box on
Google, but I don't think that's involved, and some other reference to
some Quattro hw or sw that runs on a Mac.

I will try and add an /etc/.asoundrc with the ttables modified as you
indicate, and see what happens.  If things get worse I can always rename
the file to something innocuous.

If it is of any use to you, here is my aplay -l output:

doug@Linux1 ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1
Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Sorry that I'm such a dunce.  OTOH, I can't be the only one who ever
wanted to do this.  It ought to be built in to the kernel!
Since it's child's play to get two video screens, why is it so hard to
get two audio outputs? (Granted, the two videos come
out of the same card.)

Thank you for your patience!  --doug


Did what I said--it hasn't blown up the local sound, but there's still
no sound
on the HDMI channel.  No way to know if the machine has even looked at
the /etc/.asoundrc file, but it's definitely there. I'm listening to an
Internet
radio station on realplayer, and it's coming out my local speakers, but
no sound from the TV. Of course, the file refers to quattro, which I don't
have.  I didn't do anything with jack, since I don't understand it at all.
There is no q4 device, that I know of.

--doug



Hi again, Doug!

Sorry to confuse you, I'll see if I can make amends.

First, I found this about Nvidia HDA and alsa.
ftp://download.nvidia.com/XFree86/gpu-hdmi-audio-document/gpu-hdmi-audio.html

I don't know what device out of the four that should be used, but for the instructions below I'll assume it's card 1, device 7, and has 7.1 channels out and we'll combine it with the Intel analog out which is card 0, device 0 which I assume has stereo output. I also assume you want to duplicate the front channels of the surround-capable Nvidia-card to the Intel card. If you need other devices just change those numbers in the asoundrc/asound.conf file. 

I will also assume you want system wide settings, since you say you put something in /etc. If that is the case the file name should be asound.conf as alsa only looks for .asoundrc in your home directory (e.g. /home/doug/.asoundrc). You could start by renaming the file you have to /etc/asound.conf and try to play something.

The Quattro is as you guessed the M-Audio USB Quattro sound card, which shows up as a pair of dual channel devices, and that is of course not what you have, but the instructions for setting up a "multi" device works for any two sound cards. The naming in asound.conf can be chosen  arbitrarily, so we don't need to call the pcm's (i.e. 'virtual sound cards', more or less) q4 or quattro.

In short this is what we'll do:

We link the Nvidia and Intel sound cards using the "multi" pcm, so that they become one single virtual sound card.
We add a "plug" pcm on top of the "multi" so that we can rout incoming channels to arbitrary output channels, and so that alsa automatically converts incoming audio to a format the "multi" virtual sound card understands.
Using the routing abilities, we duplicate the first two incoming channels and send them to the Intel stereo outs as well as the Nvidia front outputs. 
I copied the asoundrc-file from the M-Audio Quattro example, removed what was not needed and altered the rest according to my assumptions above. Here is the result, which you should put in a file that you name asound.conf and put in /etc: 

#
# compose 8 channels from a stereo device and a 7.1 device, hw:0,0 (Intel) and 
# hw:1,7 (Nvidia)
#

pcm.dougs_multi {
        type multi;

        slaves.a.pcm "hw:0,0"; # This is the Intel card
        slaves.a.channels 2; # It is a stereo card
        slaves.b.pcm "hw:1,7"; # This is the Nvidia card
        slaves.b.channels 8; # It is a 7.1 card

# Bind channels of the new virtual sound card (dougs_multi) to physical channels on the two real sound cards. 
        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 b;
        bindings.4.channel 2;
        bindings.5.slave b;
        bindings.5.channel 3;
        bindings.6.slave b;
        bindings.6.channel 4;
        bindings.7.slave b;
        bindings.7.channel 5;
        bindings.8.slave b;
        bindings.8.channel 6;
        bindings.9.slave b;
        bindings.9.channel 7;

}

#This is a "control device" adhering to the virtual sound card, which is mostly not needed, but we may as well create it while hacking. 
ctl.dougs_multi{
        type hw;
        card 1;
}


#
# Remap 4 channels as interleaved.
# Use "plug" to make alsa automatically convert the format of the incoming sound from your software to something the multi understands. 

pcm.dougplug {
        type plug;
        slave.pcm "dougs_multi";
        slave.channels 10;

#Here we route channels. The first number is incoming channel and the second is outgoing channel. The third is level, so you can choose to reduce the level for som channels by choosing a number between 0 and 1. 
# If you have som program playing stereo sound that will mean incoming channels 0 and 1. Those will be routed to channels 0 and 1 as well as 2 and 3 of the multi device. That corresponds to the Intel card (channels 0 and 1) and the first two channels of the Nvidia card (channels 2 and 3). 
        ttable.0.0 1; # In-channel 0 to out-channel 0 - Intel
        ttable.1.1 1; # In-channel 1 to out-channel 1 - Intel
        ttable.0.2 1; # In-channel 0 (again) to out-channel 2 - Nvidia
        ttable.1.3 1; # In-channel 1 (again) to out-channel 3 - Nvidia
        ttable.2.4 1;
        ttable.3.5 1;
        ttable.4.6 1;
        ttable.5.7 1;
        ttable.6.8 1;
        ttable.7.9 1;
 
}


# This will not be needed either, but we're on a roll here so why stop?
ctl.dougplug {
        type hw;
        card 1;
}

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux