Hello ALSA users, I've recently been playing with a n-Vidia NVS 510 (GK107) which has four display port outputs. The idea is to connect each output to a different monitor with potentially different resolutions and just run a fullscreen mplayer instance over them. By using the propietary nvidia driver with a stock Ubuntu 12.04.3 it is possible to create four independent screens on the same display. However, the audio is not working completely. The setup is the following, relevant packages and versions: linux-image-3.2.0-56-lowlatency 3.2.0-56.58 libasound2 1.0.25-1ubuntu10.2 nvidia-319-updates 319.32-0ubuntu0.0.1 PCI information: 01:00.0 VGA compatible controller: NVIDIA Corporation Device 0ffd (rev a1) (prog-if 00 [VGA controller]) Subsystem: Hewlett-Packard Company Device 0967 Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at f6000000 (32-bit, non-prefetchable) [size=16M] Memory at e0000000 (64-bit, prefetchable) [size=256M] Memory at f0000000 (64-bit, prefetchable) [size=32M] I/O ports at e000 [size=128] [virtual] Expansion ROM at f7000000 [disabled] [size=512K] Capabilities: <access denied> Kernel driver in use: nvidia Kernel modules: nvidia_319_updates, nouveau, nvidiafb 01:00.1 Audio device: NVIDIA Corporation Device 0e1b (rev a1) Subsystem: Hewlett-Packard Company Device 0967 Flags: bus master, fast devsel, latency 0, IRQ 17 Memory at f7080000 (32-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: snd_hda_intel Kernel modules: snd-hda-intel Contents of /proc/asound/cards while running the X server: 0 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0xf7630000 irq 73 1 [NVidia ]: HDA-Intel - HDA NVidia HDA NVidia at 0xf7080000 irq 17 2 [NVidia_1 ]: HDA-Intel - HDA NVidia HDA NVidia at 0xf5080000 irq 18 Note that there are two PCIe cards. But now I'm focusing only on the first one. The reported ALSA devices for the first card (aplay -L) are: hdmi:CARD=NVidia,DEV=0 HDA NVidia, HDMI 0 HDMI Audio Output hdmi:CARD=NVidia,DEV=1 HDA NVidia, HDMI 1 HDMI Audio Output hdmi:CARD=NVidia,DEV=2 HDA NVidia, HDMI 2 HDMI Audio Output hdmi:CARD=NVidia,DEV=3 HDA NVidia, HDMI 3 HDMI Audio Output dmix:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct sample mixing device dmix:CARD=NVidia,DEV=7 HDA NVidia, HDMI 1 Direct sample mixing device dmix:CARD=NVidia,DEV=8 HDA NVidia, HDMI 2 Direct sample mixing device dmix:CARD=NVidia,DEV=9 HDA NVidia, HDMI 3 Direct sample mixing device dsnoop:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct sample snooping device dsnoop:CARD=NVidia,DEV=7 HDA NVidia, HDMI 1 Direct sample snooping device dsnoop:CARD=NVidia,DEV=8 HDA NVidia, HDMI 2 Direct sample snooping device dsnoop:CARD=NVidia,DEV=9 HDA NVidia, HDMI 3 Direct sample snooping device hw:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct hardware device without any conversions hw:CARD=NVidia,DEV=7 HDA NVidia, HDMI 1 Direct hardware device without any conversions hw:CARD=NVidia,DEV=8 HDA NVidia, HDMI 2 Direct hardware device without any conversions hw:CARD=NVidia,DEV=9 HDA NVidia, HDMI 3 Direct hardware device without any conversions plughw:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Hardware device with all software conversions plughw:CARD=NVidia,DEV=7 HDA NVidia, HDMI 1 Hardware device with all software conversions plughw:CARD=NVidia,DEV=8 HDA NVidia, HDMI 2 Hardware device with all software conversions plughw:CARD=NVidia,DEV=9 HDA NVidia, HDMI 3 Hardware device with all software conversions According to the official NVidia documentation [1], this card can reproduce as many concurrent audio streams as active (i.e. connected) outputs. And, theroetically, I can use hw:1,3 hw:1,7 hw:1,8 and hw:1,9 as outputs. [1] http://http.download.nvidia.com/XFree86/gpu-hdmi-audio-document/gpu-hdmi-audio.html Now the fun part. I have two displays connected so Xorg creates two screens 0.0 and 0.1. And I try all audio outputs to find the correct one: mplayer -display :0.1 -vo vdpau -ao alsa:device=hw=1.3 sample.mp4 mplayer -display :0.1 -vo vdpau -ao alsa:device=hw=1.7 sample.mp4 mplayer -display :0.1 -vo vdpau -ao alsa:device=hw=1.8 sample.mp4 mplayer -display :0.1 -vo vdpau -ao alsa:device=hw=1.9 sample.mp4 All of the above commands have the same result: video displaying on the TV attached to display 0.1 and audio sounding on the TV connected to display 0.0. After some other experiments, I noticed that there is a correspondence in physical outputs between the Xorg and ALSA points of view. The "port_id" field in /proc/asound/card1/eld#0.? matches the information reported by the nvidia-settings utility: $ grep port_id /proc/asound/card1/eld#0.? /proc/asound/card1/eld#0.0:port_id 0x80000 /proc/asound/card1/eld#0.1:port_id 0x10000 /proc/asound/card1/eld#0.2:port_id 0x20000 /proc/asound/card1/eld#0.3:port_id 0x40000 $ nvidia-settings -n -c :0 -q EnabledDisplays Attribute 'EnabledDisplays' (avgw1:0.0): 0x00010000. 'EnabledDisplays' is a bitmask attribute. 'EnabledDisplays' is a read-only attribute. 'EnabledDisplays' can use the following target types: X Screen, GPU. Attribute 'EnabledDisplays' (avgw1:0.1): 0x00020000. 'EnabledDisplays' is a bitmask attribute. 'EnabledDisplays' is a read-only attribute. 'EnabledDisplays' can use the following target types: X Screen, GPU. When I add more simultaneous videos to the other screens, other weird things may happen. But listening different audio streams over different outputs is possible. Therefore I have two questions: 1. Is it possible to create an alias or somehow "virtual" audio device where I can configure the output using the "port_id" information previously mentioned? There is a PCM route plugin, but I'm not sure about its possibilities or if appropriate. 2. Otherwise, is it an ALSA configuration at all or is more related to the nvidia propietary driver? My apologies for the lengthy message and thank you for reading up to this point. Best regards. -- Isaac Jurado OmniAccess S.L. Parque Tecnológico ParcBit Edificio W, 2ª planta 07121, Palma de Mallorca Baleares, Spain Phone +34 971 221 979 Fax +34 971 221 978 http://www.omniaccess.com ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user