module-udev-detect appears not to work with alsa and iec958. This problem can be avoided by using module-detect. The kernel is sys-kernel/gentoo-sources-2.6.31-r6 (2.6.31-r6). ALSA is media-plugins/alsa-plugins-1.0.20. Only the analog driver is loaded with NVIDIA ALC888 and module-udev-detect. D: alsa-mixer.c: Looking at profile output:analog-mono+input:iec958-stereo D: alsa-mixer.c: Checking for playback on Analog Mono (analog-mono) D: alsa-util.c: Trying hw:0 with SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open hw:0 D: alsa-util.c: snd_pcm_hw_params_set_channels(1) failed: Invalid argument D: alsa-util.c: Trying hw:0 without SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open hw:0 D: alsa-util.c: snd_pcm_hw_params_set_channels(1) failed: Invalid argument D: alsa-util.c: Trying plug:hw:0 with SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open plug:hw:0 D: alsa-util.c: snd_pcm_hw_params_set_channels(1) failed: Invalid argument D: alsa-util.c: Trying plug:hw:0 without SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open plug:hw:0 D: alsa-util.c: snd_pcm_hw_params_set_channels(1) failed: Invalid argument I: alsa-util.c: Failed to set hardware parameters on plug:hw:0: Invalid argument D: alsa-mixer.c: Looking at profile output:analog-mono+input:iec958-surround-40 D: alsa-mixer.c: Checking for playback on Analog Mono (analog-mono) D: alsa-util.c: Trying hw:0 with SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open hw:0 D: alsa-util.c: snd_pcm_hw_params_set_channels(1) failed: Invalid argument D: alsa-util.c: Trying hw:0 without SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open hw:0 D: alsa-util.c: snd_pcm_hw_params_set_channels(1) failed: Invalid argument D: alsa-util.c: Trying plug:hw:0 with SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open plug:hw:0 D: alsa-util.c: snd_pcm_hw_params_set_channels(1) failed: Invalid argument D: alsa-util.c: Trying plug:hw:0 without SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open plug:hw:0 D: alsa-util.c: snd_pcm_hw_params_set_channels(1) failed: Invalid argument I: alsa-util.c: Failed to set hardware parameters on plug:hw:0: Invalid argument D: alsa-mixer.c: Looking at profile output:analog-stereo D: alsa-mixer.c: Checking for playback on Analog Stereo (analog-stereo) ... Reproducible: Always Steps to Reproduce: 1. default.pa has load-module module-udev-detect 2. pulseaudio -vvv 3. No sound with aplay -Dpulse on iec958
More likely it's a problem with alsa-lib (though pugins may matter too) Try at least 1.0.21a.
I moved up as you requested. I rebooted just to be safe. No difference. equery list alsa [ Searching for package 'alsa' in all categories among: ] * installed packages [I--] [ ~] media-libs/alsa-lib-1.0.21a (0) [I--] [ ] media-libs/alsa-oss-1.0.17 (0) [I--] [ ~] media-plugins/alsa-plugins-1.0.21 (0) [I--] [ ] media-plugins/gst-plugins-alsa-0.10.24 (0.10) [I--] [ ~] media-sound/alsa-headers-1.0.21 (0) [I--] [ ~] media-sound/alsa-utils-1.0.21-r1 (0.9)
Created attachment 214458 [details] Trace files I have included the pulseaudio -vvv output from using module-udev-detect, and the expected iec958 sink using module-detect and pacmd/list-sinks. This was all done with alsa-lib-1.0.21a and alsa-plugins-1.0.21.
Is this still a problem with recent PulseAudio, alsa-lib and kernel?
Same problem is still there with the following software levels: sys-kernel/gentoo-sources-2.6.34-r12 media-libs/alsa-lib-1.0.23 (0) media-sound/pulseaudio-0.9.21.1 (0) I still do not get any digital sink (iec958) with module-udev-detect. The errors are the same. Problem is avoided by using deprecated module-detect
Forgot to mention alsa-lib. I am at 1.0.23 media-libs/alsa-lib-1.0.23
Attach your /etc/asound.conf, .asoundrc and your pulseaudio configuration files. Post useflags pulseaudio was built with.
Created attachment 258236 [details] asound.conf and pulse files I have no .asoundrc file. The file baddefault.pa is used to verify that pulseaudio cannot find iec958 with module-udev-detect.
$ equery uses -a media-sound/pulseaudio-0.9.21.1 [ Searching for packages matching media-sound/pulseaudio-0.9.21.1... ] [ Colour Code : set unset ] [ Legend : Left column (U) - USE flags from make.conf ] [ : Right column (I) - USE flags packages was installed with ] [ Found these USE variables for media-sound/pulseaudio-0.9.21.1 ] U I + + X : Adds support for X11 + + alsa : Adds support for media-libs/alsa-lib (Advanced Linux Sound Architecture) - + asyncns : Use libasyncns for asynchronous name resolution. + + avahi : Add avahi/Zeroconf support - - bluetooth : Enables Bluetooth Support + + caps : Use Linux capabilities library to control privilege + + dbus : Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc) - - doc : Adds extra documentation (API, Javadoc, etc) - + glib : Enable glib eventloop support + + gnome : Adds GNOME support + + hal : Enable Hardware Abstraction Layer (HAL) support + + ipv6 : Adds support for IP version 6 - - jack : Adds support for the JACK Audio Connection Kit + + libsamplerate : Build with support for converting sample rates using libsamplerate + + lirc : Adds support for lirc (Linux's Infra-Red Remote Control) - - oss : Adds support for OSS (Open Sound System) - - system-wide : Allow preparation and installation of the system-wide init script for PulseAudio. Since this support is only supported for embedded situations, do not enable without reading the upstream instructions at http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode . + + tcpd : Adds support for TCP wrappers - - test : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore - + udev : Enable sys-fs/udev integration (device discovery, power and storage device support, etc)
Try again with the one you claim isn't working, but with set-default-{sink, source} commented out.
Created attachment 258300 [details] Pulseaudio output with defaults removed from default.pa Once again, I only have analog sinks with the following two lines commented out: #set-default-sink alsa_output.iec958 #set-default-source alsa_input.iec958
Those messages are most likely just capabilities tests. Daemon seems to start correctly and I suspect that SIGINT is just you pressing ^C. Two sinks and two sources are set up: "alsa_output.pci-0000_00_07.0.analog-stereo", "alsa_output.pci-0000_00_07.0.analog-stereo.monitor", "alsa_input.pci-0000_00_07.0.analog-stereo" and "alsa_input.pci-0000_01_08.1.analog-stereo". There's "Profile output:iec958-stereo+input:iec958-stereo supported." message, among other. Does paplay work ?
pacmd / list-sinks does not list an iec958 sink (with module-udev-detect). Using the Alsa provided files for tests ... $ paplay -d iec958-stereo Front_Left.wav Stream error: No such entity Without a device paplay hangs. With module-detect, and set-default-sink alsa_output.iec958 the following works: $ aplay Front_Left.wav Playing WAVE 'Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono $ aplay -dpulse Front_Left.wav Playing WAVE 'Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono paplay hangs as before. I have never used it before.
Honestly, I'm getting a feeling you're trying to pick your teeth with a pickaxe. I'm not saying it can't be done, but it demands skill, which can only be gained by training, which may be very painful. Make sure alsa-plugins is built with pulseaudio useflag. With pacmd, see list-cards first, then use set-card-profile. How do you run the daemon anyway ? Use only module-udev-detect and set neither module-alsa-sink nor module-alsa-source (regarding attached default.pa). Try 'paplay --raw /dev/urandom' for tests (perhaps add -v for more output).
Since I was told to comment out the default source/sink, I have not used a default source/sink with module-udev-detect. With module-detect, paplay --raw /dev/urandom creates sound. With module-udev-detect, it does not. Here is the output using module-udev-detect with no default source or sink specified. There is no sound (as would be expected, as nothing is connected to the analog output, and that is the only sink): paplay -v --raw /dev/urandom Opening a playback stream with sample specification 's16le 2ch 44100Hz' and channel map 'front-left,front-right'. Connection established.[K Stream successfully created. Buffer metrics: maxlength=4194304, tlength=352800, prebuf=349276, minreq=3528 Using sample spec 's16le 2ch 44100Hz', channel map 'front-left,front-right'. Connected to device alsa_output.pci-0000_00_07.0.analog-stereo (0, not suspended). Stream started.[K Time: 0.000 sec; Latency: 2351519 usec. Time: 0.029 sec; Latency: 2322157 usec.
So, the point is: everything *is* working correctly. Now, just use pacmd to switch profile to iec958-stereo and if that works, check the docs on how to pass that via config file.
Created attachment 258794 [details] Working module-udev-detect with iec958 The only thing that doesn't look right here is that I had to use a card index of 0. I thought card index numbers were supposed to have been eliminated a long time ago. Also, pacmd help is incorrect: set-card-profile Change the profile of a card (args: index, name) Notice it says index [comma] name This is incorrect. It should be a space. Also the man page for pulse-client.conf does not mention set-card-profile, but does mention default-sink.
That help text just lists the args, not shows format. Well, technically you probably could have used default-{sink,source} with alsa_{output,input}.pci-0000_00_07.0.iec958-stereo. Anyway, it was a configuration problem, so not a bug. Oh, and a hint, drop hal useflag from pulseaudio, obviously it's not really used anymore.
I verified that this works in my default.pa (I removed set-card-profile): set-default-sink alsa_output.pci-0000_00_07.0.iec958-stereo