On Tue, 19.07.11 10:00, Mauro Carvalho Chehab (mchehab@infradead.org) wrote:
Heya,
The thing is that starting capture on a video device has some side effects, as it will start capturing from a radio or TV station without specifying the desired frequency.
Several video boards have the option of plugging a loop cable between the device output pin and the motherboard line in pin. So, if you start capturing, you'll also enabling the output of such pin, as the kernel driver has no way to know if the user decided to use a wire cable, instead of the ALSA PCM stream.
So, if users with such cables are lucky, it will play something, but, on most cases, it will just tune into a non-existing station, and it will produce a white noise.
The right thing to do is to get rid of capturing on a video device, if you're not sure that the device is properly tuned.
It is easy to detect that an audio device is provided by a v4l device. All you need to do is to look at the parent device via sysfs.
So what we actually support in PA, is that you can disable the probing for specific sound cards if you supply a file that describes what should be exposed in PA for the sound card instead. We use that for a number of pro audio cards, where we want to show nicer human readable strings for specific configurations.
This is configured in /usr/share/pulseaudio/alsa-mixer/paths/, /usr/share/pulseaudio/alsa-mixer/profile-sets/* and /lib/udev/rules.d/90-pulseaudio.rules.
The udev rules files binds a profile set to a specific sound device. The profile set then declares in which combinations a sound card can be opened for input and output, and which mixer paths to expose.
Note that the profile sets/mixer paths are supposed to be user-friendly. Hence instead of exposing all options they are designed to expose only the minimum that is useful in the UI. And the emphasis is on usefulness here, so the options the user can choose should be few, not overwhlemingly many.
https://tango.0pointer.de/pipermail/pulseaudio-discuss/2009-June/004229.html
It might make sense to add that for your TV card to PA as well.
Lennart