Re: [pulseaudio-discuss] [PATCH pavucontrol] mainwindow: Show the availability of the ports and profiles.
The ports variable contains all ports of a card. Here I think you add all output ports of a card to all sinks of the card and all input ports to all sources. That's not right, a sink may have only a subset of the card's output ports assigned to it. The plugged in and unplugged strings should probably be translatable. (Same for the profile code.) Good catch. I got myself thinking that I could generalize the solution a little bit but it seems that we can't figure out which port belongs where just from pa_card_port_info. I think profiles should be plugged in if any port is available. i have doubt about it the profile is not available when the jack available state of the port is NO but all profiles have passed the open pcm test. this mean that some port does not have jack detect capability (e.g. some nvidia hdmi , spdif, all pci sound cards and onboard ac97 sound card, ) ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] jackdbus module, pulse fails to conform on device reservation API
On 10 November 2012 05:25, Ian Malone ibmal...@gmail.com wrote: On 9 November 2012 17:34, Tanu Kaskinen ta...@iki.fi wrote: On Tue, 2012-11-06 at 15:58 -0500, Ian Malone wrote: method call sender=:1.110 - dest=org.freedesktop.ReserveDevice1.Audio1 serial=6 path=/org/freedesktop/ReserveDevice1/Audio1; interface=org.freedesktop.ReserveDevice1; member=RequestRelease int32 2147483647 error sender=:1.35 - dest=:1.110 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=6 string Method RequestRelease with signature i on interface org.freedesktop.ReserveDevice1 doesn't exist If I hadn't seen it before I would say that that's exactly the message I expect a message framework (d-bus here) to generate when the method wasn't present. And indeed it is: $ dbus-send --session --print-reply --reply-timeout=2000 --type=method_call --dest=org.freedesktop.ReserveDevice1.Audio1 /org/freedesktop/ReserveDevice1/Audio1 org.freedesktop.ReserveDevice1.RequestRelease int32:5 Error org.freedesktop.DBus.Error.UnknownMethod: Method RequestRelease with signature i on interface org.freedesktop.ReserveDevice1 doesn't exist I don't know how to capture this at the command line, so please see the d-feet shot of this: https://picasaweb.google.com/lh/photo/Mnty0Ul3ilCN_pB-ctJoD9MTjNZETYmyPJy0liipFm0?feat=directlink Audio1 is reserved (the service exists), but the object to request a release for Audio1 doesn't exist. Getting to this state was actually quite easy: 1. Start into KDE (pulse is set up as normal for Fedora and autostarted). 2. Start d-feet, you may catch the ReserveDevice1 services before they disappear, but wait till they do. 3. Open the KDE audio setup dialogue and test playback, this causes pulse to lock the capture device (hw:0 here) and the playback device (hw:1). 4. Look at the 'reserved' services. Audio1 is reserved, but can't be released because there's no object to provide the method. === --- a/src/modules/reserve.c +++ b/src/modules/reserve.c @@ -409,6 +409,11 @@ int rd_acquire( goto fail; } + if (k == DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER) { + // Potential leak? + goto success; + } + if (k == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) goto success; === It seems rd_acquire can get called while pulse still has the service name (how? don't know. I've tried a return 0 there, but the object path has already been unregistered at that point). Currently that means it unregisters the filter handler and the object path for releasedevice1, turning the service into a zombie until pulse is killed. I've tried fixing this by changing the way d-owning is used, but anything but the current setup seems to get stuck in a loop between rd_callback, the filter_handler in reserve.c and rd_release, possibly because unregistering the service triggers the filter_handler with namelost somehow. Anyway, thou shalt check for possible return values. -- imalone http://ibmalone.blogspot.co.uk ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] How to modify (source) port priorities?
Hi Raymond, David. On 11/07/2012 09:32 PM, Raymond Yau wrote: available state of mic jack should be yes after the mic is plugged Agreed, but on this model it feels like there's a mix-up between both mics: Internal Microphone is basically unusable and full of noise (like an unplugged non-internal microphone), and Microphone works fine as if always plugged (like an internal microphone), though pulse reports the contrary. System info: Dell XPS1635, under Ubuntu 12.10 x64 / pulseaudio 2.1. are your model xps1645 ? post the output of alsa-info.sh Yes! I mistyped it, sorry. Here is my alsa-info.sh, feel free to ask for more info: http://hastebin.com/kaleqeqibo.vhdl --- On 11/07/2012 06:42 PM, David Henningsson wrote: However, even though the priorities look fine, the behavior at startup is still the same: Internal Microphone is still preferred to Microphone. -- Could it be due to the fact that Microphone is flagged available: no? This means that you have not plugged your microphone in. If it's still available: no when your mic is plugged in, it is very likely an ALSA bug. module-switch-on-port-available is the module that switches away from unavailable ports. Okay, following up with Raymond Yau, who asks me my alsa-info.sh -- If yes, how can I work around this? If no, any other idea? Any solution putting Microphone first will do, I don't care the least about Internal Microphone. In the same files you just edited, you can also comment out the Jack sections to stop PulseAudio from picking up any detection. Commenting didn't work, but I added 'state.plugged = yes' and 'state.unplugged = yes' to the [Jack Mic] section for the input I want. Now it is always detected as plugged and the priority thing works :) Thanks! -- Ronan Jouchet ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Low latency
Not sure what you mean with sink and ring buffer. When mixing, data goes from the sink-input / client-server buffer into the DMA buffer directly. Please look at protocol-native.c. I am not sure why there is this division of latency in two, for low-latency you can probably decrease the client buffer some. /* So, the user asked us to adjust the latency of the stream * buffer according to the what the sink can provide. The * tlength passed in shall be the overall latency. Roughly * half the latency will be spent on the hw buffer, the other * half of it in the async buffer queue we maintain for each * client. In between we'll have a safety space of size * 2*minreq. Why the 2*minreq? When the hw buffer is completely * empty and needs to be filled, then our buffer must have * enough data to fulfill this request immediately and thus * have at least the same tlength as the size of the hw * buffer. It additionally needs space for 2 times minreq * because if the buffer ran empty and a partial fillup * happens immediately on the next iteration we need to be * able to fulfill it and give the application also minreq * time to fill it up again for the next request Makes 2 times * minreq in plus.. */ if (tlength_usec minreq_usec*2) sink_usec = (tlength_usec - minreq_usec*2)/2; else sink_usec = 0; pa_log_debug(Adjust latency mode enabled, configuring sink latency to half of overall latency.); and events up to 4ms apart. Has anyone tried the changes we pushed recently at the kernel level to properly handle the ring buffer pointer and delay? I believe some of the underruns may be due to the ~1ms inaccuracy that we had before these changes. If your driver is already giving you a 25% precision error no wonder things are broken? Right now we have bigger issues, such as why nobody is responding to messages such as this one [1] :-( Quite frankly I did not understand the problem you are facing and what these measurements show. Maybe you're on to something but it's hard to provide feedback here. ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] How to modify (source) port priorities?
Hi Raymond, David. available state of mic jack should be yes after the mic is plugged Agreed, but on this model it feels like there's a mix-up between both mics: Internal Microphone is basically unusable and full of noise (like an unplugged non-internal microphone), and Microphone works fine as if always plugged (like an internal microphone), though pulse reports the contrary. do you mean this patch still don't fix the internal mic ? http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commit;h=ffe535edb9a9c5b4d5fe03dfa3d89a1495580f1b do the value of mic jack kcontrol become true after you plug the mic ? Node 0x0e [Pin Complex] wcaps 0x400183: Stereo Amp-In Control: name=Mic Jack Mode, index=0, device=0 ControlAmp: chs=0, dir=In, idx=0, ofs=0 Control: name=Mic Capture Volume, index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name=Mic Jack, index=0, device=0 Amp-In caps: N/A Amp-In vals: [0x03 0x03] Pincap 0x1737: IN OUT Detect Trigger ImpSense Vref caps: HIZ 50 GRD 80 Pin Default 0x03a11020: [Jack] Mic at Ext Left Conn = 1/8, Color = Black DefAssociation = 0x2, Sequence = 0x0 Pin-ctls: 0x24: IN VREF_80 Unsolicited: tag=03, enabled=1 Connection: 4 0x15* 0x16 0x17 0x1e System info: Dell XPS1635, under Ubuntu 12.10 x64 / pulseaudio 2.1. are your model xps1645 ? post the output of alsa-info.sh Yes! I mistyped it, sorry. Here is my alsa-info.sh, feel free to ask for more info: http://hastebin.com/kaleqeqibo.vhdl dell m6 model seem support surround51 hda: Add 5.1 support for second headphone jack Several 92hd7xxx and STAC9228 laptops have multiple headphone jacks, the second headphone jack should be used for the 5.1 surround sound. Add support for 'Headphone as Line Out' switch, which allows it be used in 5.1 surround sound. http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commitdiff;h=7c2ba97b8a99c857758fd03513350b39a8b242d6;hp=0a08478c0f7548211b492b578a67dacca5aea1a8 dell m6 model change the pin default of node 0x0f from line out to second headphone to support 5.1 Pin Default 0x03011050: [Jack] Line Out at Ext Left Conn = 1/8, Color = Black DefAssociation = 0x5, Sequence = 0x0 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/795823 /sys/class/sound/hwC0D0/init_pin_configs: 0x0a 0x0321101f 0x0b 0x4f0f 0x0c 0x4f0f 0x0d 0x90170110 0x0e 0x03a11020 0x0f 0x03011050 0x10 0x4f0f 0x11 0x4f0f 0x12 0x4f0f 0x13 0x90a60160 0x14 0x4f0f 0x22 0x4f0f 0x23 0x4f0f 0x24 0x4f0f /sys/class/sound/hwC0D0/driver_pin_configs: 0x0a 0x0321101f 0x0b 0x4f0f 0x0c 0x4ff0 0x0d 0x90170110 0x0e 0x03a11020 0x0f 0x0321101f 0x10 0x4ff0 0x11 0x4ff0 0x12 0x4ff0 0x13 0x90a60160 0x14 0x4ff0 0x22 0x4ff0 0x23 0x4ff0 if mic jack can be retasked as output and the driver also need to disable auto mic switch http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commitdiff;h=b5895dc8b467a2457f4d33bef51f9879cf780a07;hp=628ed1333a9d2a7c7d3dc53641ea59af511e5fe5 ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss