Summary: | Pulseaudio does not create a separate source for each input subdevice on a card | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | rorzer |
Component: | alsa | Assignee: | pulseaudio-bugs |
Status: | RESOLVED MOVED | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
rorzer
2016-06-07 04:58:33 UTC
do it really work since pulseaudio use jack detect to determine the availabilty of input source , the three inputs jacks are plugged when you are recording ? how do you map three capture volume controls to the three capture devices ? Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In Control: name="Capture Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Capture Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Device: name="ALC889A Analog", type="Audio", device=0 Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1 Amp-In vals: [0x11 0x11] Converter: stream=4, channel=0 SDI-Select: 0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Connection: 1 0x24 Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In Control: name="Capture Volume", index=1, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Capture Switch", index=1, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Device: name="ALC889A Alt Analog", type="Audio", device=2 Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1 Amp-In vals: [0x80 0x80] Converter: stream=0, channel=0 SDI-Select: 0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Connection: 1 0x23 Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In Control: name="Capture Volume", index=2, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Capture Switch", index=2, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1 Amp-In vals: [0x80 0x80] Converter: stream=0, channel=0 SDI-Select: 0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Connection: 1 0x22 (In reply to rorzer from comment #0) > > I wish to use pulseaudio as a mixer for three loopback sources on my HTPC: a > Chromecast audio, my TV, and a phono amp. how do you connect chromecast audio, TV and phono amp since desktop only have rear mic, front mic and line in ? http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=28&Level=5&Conn=4&ProdID=173 do you mean "Supports legacy analog mixer architecture" ? (In reply to Raymond from comment #1) > do it really work since pulseaudio use jack detect to determine the > availabilty of input source , the three inputs jacks are plugged when you > are recording ? Hi, thanks for your prompt replies :) I'm not sure what you are asking here. Is it: a) Does recording/loopback work from all three input jacks if you have three sources plugged in? answer: no. When I plug the first device in, the dropdown menu on the input tab of pavucontrol automatically re-routes to the correct, plugged in jack. When I plug the second device in, pulse switches to the new input. The first input is disconnected. or; b) Is it theoretically possible for pulse to behave as I wish, when pulse uses hot switching? answer: yes, it should be possible. If pulse created a separate input source for each subdevice present on the card, then when one jack is plugged in, it could grab the first available source, and flag the jack as unavailable. When a second jack is plugged in, it could grab the next avialable source, and flag a second jack as unavailable. I'm not a programmer, but this is simple logic analogous to locking files when in use. (In reply to Raymond from comment #3) > (In reply to rorzer from comment #0) > > > > I wish to use pulseaudio as a mixer for three loopback sources on my HTPC: a > > Chromecast audio, my TV, and a phono amp. > > how do you connect chromecast audio, TV and phono amp since desktop only > have rear mic, front mic and line in ? > > http://www.realtek.com.tw/products/productsView. > aspx?Langid=1&PFid=28&Level=5&Conn=4&ProdID=173 > > do you mean "Supports legacy analog mixer architecture" ? There is a stereo input jack for each of rear mic, front mic and line in. Each of these has a separate hardware subdevice that is recognised by ALSA. I want to be able to plug, for example, Chromecast into Front mic, phono amp into rear mic, and TV into line in. This is possible in hardware, it should be possible in software. One solution would be to have a mixer source for all three subdevices, another (preferred for me) solution would be to create a separate input source for each hardware subdevice. This would allow me to use default.pa to route particular inputs to particular outputs via particular loopback modules. the hardware analog mixer of your alc889a has low latency than the module loopback if you just want to route the input to line out the "xxx playback volume" and "xxx playback switch" of the analog mixer affect the output volume of the input source to the line out jacks Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In Control: name="Rear Mic Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Rear Mic Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Front Mic Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=1, ofs=0 Control: name="Front Mic Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=1, ofs=0 Control: name="Line Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=2, ofs=0 Control: name="Line Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=2, ofs=0 Control: name="CD Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=4, ofs=0 Control: name="CD Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=4, ofs=0 Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] Connection: 10 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 only one ADC can select input from the audio mixer 0x0b ( mix of the input sources) https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio.txt - add_stereo_mix_input (bool): add the stereo mix (analog-loopback mix) to the input mux if available Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In Control: name="Capture Volume", index=2, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Capture Switch", index=2, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1 Amp-In vals: [0x80 0x80] Converter: stream=0, channel=0 SDI-Select: 0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Connection: 1 0x22 Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] Connection: 11 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b (In reply to rorzer from comment #4) > (In reply to Raymond from comment #1) > > a) Does recording/loopback work from all three input jacks if you have three > sources plugged in? > answer: no. When I plug the first device in, the dropdown menu on the input > tab of pavucontrol automatically re-routes to the correct, plugged in jack. > When I plug the second device in, pulse switches to the new input. The > first input is disconnected. not all input source of the sound card are supported by pulseaudio (e.g. CD , mix) https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input.conf.common it switch off other port 's element when the port is selected https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input-front-mic.conf https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input-rear-mic.conf https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input-linein.conf (In reply to Raymond from comment #6) > the hardware analog mixer of your alc889a has low latency than the module > loopback if you just want to route the input to line out How do I achieve this? > > the "xxx playback volume" and "xxx playback switch" of the analog mixer > affect the output volume of the input source to the line out jacks > I do not see "xxx playback switch" in alsamixer > > Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In > Control: name="Rear Mic Playback Volume", index=0, device=0 > ControlAmp: chs=3, dir=In, idx=0, ofs=0 > Control: name="Rear Mic Playback Switch", index=0, device=0 > ControlAmp: chs=3, dir=In, idx=0, ofs=0 > Control: name="Front Mic Playback Volume", index=0, device=0 > ControlAmp: chs=3, dir=In, idx=1, ofs=0 > Control: name="Front Mic Playback Switch", index=0, device=0 > ControlAmp: chs=3, dir=In, idx=1, ofs=0 > Control: name="Line Playback Volume", index=0, device=0 > ControlAmp: chs=3, dir=In, idx=2, ofs=0 > Control: name="Line Playback Switch", index=0, device=0 > ControlAmp: chs=3, dir=In, idx=2, ofs=0 > Control: name="CD Playback Volume", index=0, device=0 > ControlAmp: chs=3, dir=In, idx=4, ofs=0 > Control: name="CD Playback Switch", index=0, device=0 > ControlAmp: chs=3, dir=In, idx=4, ofs=0 > Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 > Amp-In vals: [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] > [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] > Connection: 10 > 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 you have to enable loopback mixing https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=e7fdd52779a6c2b49d457f452296a77c8cffef6a -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/26. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.