Re: [pulseaudio-discuss] specifying ALSA mixer control
On Mon, 30.03.09 12:49, kyle cronan (k...@pbx.org) wrote: > On Fri, Mar 27, 2009 at 7:21 AM, Lennart Poettering > wrote: > >> I tried installing the latest git sources on my Ubuntu Jaunty box but > >> it just broke sound in all my applications. For my own purposes, I'm > >> going to need to start with the Ubuntu-patched 0.9.14. However, if > >> you are willing to accept this patch I will forward port it so that it > >> applies to the latest sources. It's a completely harmless change, so > >> why not apply it? > > > > Yes, I am happy to apply it. Could you please update it for current git? > > > > Great. An updated patch is attached. For symmetry, I added this > option to the alsa source module as well. > > The Ubuntu folks have customized pulse so much that it is difficult > for me to get this version working on my system. For this patch I > have only made sure that it compiles. But it does pretty much the > same thing as the one for 0.9.14, which is working great for me. Thanks, applied. Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Fri, Mar 27, 2009 at 7:21 AM, Lennart Poettering wrote: >> I tried installing the latest git sources on my Ubuntu Jaunty box but >> it just broke sound in all my applications. For my own purposes, I'm >> going to need to start with the Ubuntu-patched 0.9.14. However, if >> you are willing to accept this patch I will forward port it so that it >> applies to the latest sources. It's a completely harmless change, so >> why not apply it? > > Yes, I am happy to apply it. Could you please update it for current git? > Great. An updated patch is attached. For symmetry, I added this option to the alsa source module as well. The Ubuntu folks have customized pulse so much that it is difficult for me to get this version working on my system. For this patch I have only made sure that it compiles. But it does pretty much the same thing as the one for 0.9.14, which is working great for me. Thanks, Kyle > Lennart > > -- > Lennart Poettering Red Hat, Inc. > lennart [at] poettering [dot] net ICQ# 11060553 > http://0pointer.net/lennart/ GnuPG 0x1A015CC4 > ___ > pulseaudio-discuss mailing list > pulseaudio-discuss@mail.0pointer.de > https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss > diff -ur pulseaudio/src/modules/alsa/alsa-sink.c pulseaudio.new/src/modules/alsa/alsa-sink.c --- pulseaudio/src/modules/alsa/alsa-sink.c 2009-03-30 12:07:10.0 -0500 +++ pulseaudio.new/src/modules/alsa/alsa-sink.c 2009-03-30 12:27:32.0 -0500 @@ -1639,7 +1639,7 @@ /* ALSA might tweak the sample spec, so recalculate the frame size */ frame_size = pa_frame_size(&ss); -pa_alsa_find_mixer_and_elem(u->pcm_handle, &u->mixer_handle, &u->mixer_elem); +pa_alsa_find_mixer_and_elem(u->pcm_handle, &u->mixer_handle, &u->mixer_elem, pa_modargs_get_value(ma, "control", NULL)); pa_sink_new_data_init(&data); data.driver = driver; diff -ur pulseaudio/src/modules/alsa/alsa-source.c pulseaudio.new/src/modules/alsa/alsa-source.c --- pulseaudio/src/modules/alsa/alsa-source.c 2009-03-30 12:07:10.0 -0500 +++ pulseaudio.new/src/modules/alsa/alsa-source.c 2009-03-30 12:34:52.0 -0500 @@ -1491,7 +1491,7 @@ /* ALSA might tweak the sample spec, so recalculate the frame size */ frame_size = pa_frame_size(&ss); -pa_alsa_find_mixer_and_elem(u->pcm_handle, &u->mixer_handle, &u->mixer_elem); +pa_alsa_find_mixer_and_elem(u->pcm_handle, &u->mixer_handle, &u->mixer_elem, pa_modargs_get_value(ma, "control", NULL)); pa_source_new_data_init(&data); data.driver = driver; diff -ur pulseaudio/src/modules/alsa/alsa-util.c pulseaudio.new/src/modules/alsa/alsa-util.c --- pulseaudio/src/modules/alsa/alsa-util.c 2009-03-24 11:30:08.0 -0500 +++ pulseaudio.new/src/modules/alsa/alsa-util.c 2009-03-30 12:34:46.0 -0500 @@ -1094,7 +1094,8 @@ int pa_alsa_find_mixer_and_elem( snd_pcm_t *pcm, snd_mixer_t **_m, -snd_mixer_elem_t **_e) { +snd_mixer_elem_t **_e, +const char *control_name) { int err; snd_mixer_t *m; @@ -1146,11 +1147,13 @@ switch (snd_pcm_stream(pcm)) { case SND_PCM_STREAM_PLAYBACK: -e = pa_alsa_find_elem(m, "Master", "PCM", TRUE); +if (control_name) e = pa_alsa_find_elem(m, control_name, NULL, TRUE); +else e = pa_alsa_find_elem(m, "Master", "PCM", TRUE); break; case SND_PCM_STREAM_CAPTURE: -e = pa_alsa_find_elem(m, "Capture", "Mic", FALSE); +if (control_name) e = pa_alsa_find_elem(m, control_name, NULL, FALSE); +else e = pa_alsa_find_elem(m, "Capture", "Mic", FALSE); break; default: diff -ur pulseaudio/src/modules/alsa/alsa-util.h pulseaudio.new/src/modules/alsa/alsa-util.h --- pulseaudio/src/modules/alsa/alsa-util.h 2009-03-24 11:30:08.0 -0500 +++ pulseaudio.new/src/modules/alsa/alsa-util.h 2009-03-30 12:29:32.0 -0500 @@ -54,7 +54,7 @@ int pa_alsa_prepare_mixer(snd_mixer_t *mixer, const char *dev); snd_mixer_elem_t *pa_alsa_find_elem(snd_mixer_t *mixer, const char *name, const char *fallback, pa_bool_t playback); -int pa_alsa_find_mixer_and_elem(snd_pcm_t *pcm, snd_mixer_t **_m, snd_mixer_elem_t **_e); +int pa_alsa_find_mixer_and_elem(snd_pcm_t *pcm, snd_mixer_t **_m, snd_mixer_elem_t **_e, const char *control_name); typedef struct pa_alsa_profile_info { pa_channel_map map; diff -ur pulseaudio/src/modules/alsa/module-alsa-sink.c pulseaudio.new/src/modules/alsa/module-alsa-sink.c --- pulseaudio/src/modules/alsa/module-alsa-sink.c 2009-03-24 11:30:08.0 -0500 +++ pulseaudio.new/src/modules/alsa/module-alsa-sink.c 2009-03-30 12:13:04.0 -0500 @@ -52,7 +52,8 @@ "tsched= " "tsched_buffer_size= " "tsched_buffer_watermark= " -"ignore_dB="); +"ignore_dB= " +"control="); static const char* const va
Re: [pulseaudio-discuss] specifying ALSA mixer control
'Twas brillig, and Lennart Poettering at 27/03/09 12:45 did gyre and gimble: (I) Some hardware/drivers allow you open spdif:0 in app A and front:0 in app B at the same time and it results in having A's stream come out of SPDIF and B's stream coming out Analog. (II) Other hardware/drivers however allow you to open spdif:0 in app A and front:0 in app B at the same time, and audio is mixed and both streams come out of only SPDIF, or only Analog, or even on both. And we wouldn't even know which of the cases it actually would be. We never want to get confused by case II but we cannot distuingish it programmatically from case I. Case I is the one we want to support. Case II we want to ignore. Ahh OK, so the hardware/driver is being too clever then and trying to "fail gracefully", but in doing so, it's impossible work out what the hell is going on. IMO, in the short term, it's possibly worth while still probing for 2-outputs. Yes we may be confused by case 2, but an odd setup (that still works in some capacity) for some people is probably worth it considering that many others will get a working setup automatically. But that's just my opinion. Perhaps we can have some kind of switch to enable how many outputs to probe which is, by default 1, but can be increased? That way we can perhaps expose this via the GUI somehow. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Fri, 27.03.09 08:36, Colin Guthrie (gm...@colin.guthr.ie) wrote: >>> Lennart Poettering wrote: I doubt that it would be so useful to expose this in PA anyway. I mean, how realistic is it wanting to drive both SPDIF and analog audio at the same time from the same sound card? Appears to be a very exotic niche usage to me. >>> Please don't forget the combination of spdif and headphones. I'm >>> quite sure I won't be the only one using spdif for "normal" audio >>> listening and simultaneously a headphone for voip stuff. >> >> This might actually be a valid point. >> >> However, as mentioned it's a bit hard to detect these cases and >> distuingish them from cards that do hw mixing. If ALSA would give us a >> bit of a hint here we could certainly add this. > > So from your original comment, is it possible that some hardware lets > you open the mutually exclusive bits, but only errors out when you try > to write a sample to them at the same time? No. (I) Some hardware/drivers allow you open spdif:0 in app A and front:0 in app B at the same time and it results in having A's stream come out of SPDIF and B's stream coming out Analog. (II) Other hardware/drivers however allow you to open spdif:0 in app A and front:0 in app B at the same time, and audio is mixed and both streams come out of only SPDIF, or only Analog, or even on both. And we wouldn't even know which of the cases it actually would be. We never want to get confused by case II but we cannot distuingish it programmatically from case I. Case I is the one we want to support. Case II we want to ignore. Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Tue, 24.03.09 12:07, kyle cronan (k...@pbx.org) wrote: > > 2009/3/24 Tomasz Torcz : > > AFAIK this really depends on hardware. Above screenshot is from my > > laptop (Centrino 2, Intel HDA on Connexant chip), I once saw this dialog > > on computer with EMU10K card. The list was bigger than screen and there > > were various combinations. > > So, if the card supports simultanous output to SPDIF and analog, there > > will be two ink available. This is how I undestand profiles :) > > The problem is not that I had to manually specify two sinks in the > config file. I don't mind doing that. The problem is that the only > way for me to independently control the volume of the SPDIF was to > create a custom mixer control using softvol. So I needed a way to > select this as the mixer for one of the sinks. Yes. This is actually a real problem. Currently PA selects one mixer element and then just sticks to it regardless which profile is activated. On some cards that works fine. On most cards however SPDIF is not influenced by "Master" and hence the volume control becomes useless. This needs to be fixed in PA. Not sure though if we can do this without getting some support for this from ALSA: > I tried installing the latest git sources on my Ubuntu Jaunty box but > it just broke sound in all my applications. For my own purposes, I'm > going to need to start with the Ubuntu-patched 0.9.14. However, if > you are willing to accept this patch I will forward port it so that it > applies to the latest sources. It's a completely harmless change, so > why not apply it? Yes, I am happy to apply it. Could you please update it for current git? Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
'Twas brillig, and Lennart Poettering at 26/03/09 23:11 did gyre and gimble: On Thu, 26.03.09 20:51, Jens Peters (jpeters7...@gmx.de) wrote: Lennart Poettering wrote: I doubt that it would be so useful to expose this in PA anyway. I mean, how realistic is it wanting to drive both SPDIF and analog audio at the same time from the same sound card? Appears to be a very exotic niche usage to me. Please don't forget the combination of spdif and headphones. I'm quite sure I won't be the only one using spdif for "normal" audio listening and simultaneously a headphone for voip stuff. This might actually be a valid point. However, as mentioned it's a bit hard to detect these cases and distuingish them from cards that do hw mixing. If ALSA would give us a bit of a hint here we could certainly add this. So from your original comment, is it possible that some hardware lets you open the mutually exclusive bits, but only errors out when you try to write a sample to them at the same time? If so, is it possible to try and do a bit more foo where a few samples of silence is written during probing to detect this? You could then up the pulse probing to a 2-in+2-out approach? (or even just a 1-in+2-out) That way it would probably cover 95% of the use cases. Just some thoughts without knowing the complications involved :) -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Thu, 26.03.09 20:51, Jens Peters (jpeters7...@gmx.de) wrote: > > Lennart Poettering wrote: > > I doubt that it would be so useful to expose this in PA anyway. I > > mean, how realistic is it wanting to drive both SPDIF and analog audio > > at the same time from the same sound card? Appears to be a very exotic > > niche usage to me. > > Please don't forget the combination of spdif and headphones. I'm quite sure > I won't be the only one using spdif for "normal" audio listening and > simultaneously a headphone for voip stuff. This might actually be a valid point. However, as mentioned it's a bit hard to detect these cases and distuingish them from cards that do hw mixing. If ALSA would give us a bit of a hint here we could certainly add this. Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
'Twas brillig, and Jens Peters at 26/03/09 19:51 did gyre and gimble: Lennart Poettering wrote: I doubt that it would be so useful to expose this in PA anyway. I mean, how realistic is it wanting to drive both SPDIF and analog audio at the same time from the same sound card? Appears to be a very exotic niche usage to me. Please don't forget the combination of spdif and headphones. I'm quite sure I won't be the only one using spdif for "normal" audio listening and simultaneously a headphone for voip stuff. Good point! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
Lennart Poettering wrote: > I doubt that it would be so useful to expose this in PA anyway. I > mean, how realistic is it wanting to drive both SPDIF and analog audio > at the same time from the same sound card? Appears to be a very exotic > niche usage to me. Please don't forget the combination of spdif and headphones. I'm quite sure I won't be the only one using spdif for "normal" audio listening and simultaneously a headphone for voip stuff. Regards, Jens ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Thu, Mar 26, 2009 at 11:03 AM, Colin Guthrie wrote: > 'Twas brillig, and Lennart Poettering at 26/03/09 14:25 did gyre and gimble: >> >> I doubt that it would be so useful to expose this in PA anyway. I >> mean, how realistic is it wanting to drive both SPDIF and analog audio >> at the same time from the same sound card? Appears to be a very exotic >> niche usage to me. > > I'm not so sure. I've had quite a few people wanting to do this. One user > even has a card where the analog comes out his speakers but the digital is > connected to his HDMI output. For him, he can play a movie on his computer > via HDMI and direct the movie's audio via the digital connector while still > using his computer and wanting to output desktop related sounds there. > > That's not an overly exotic setup IMO. > > (normally HDMI sound comes from a different "card" in the examples I've seen > in the past, so this one was an exception to me). This example was on IRC > just the other day... just search your backlog for STAC and you should find > it! > > That example aside, I have seen several comments from other users wanting to > use both at the same time, so I for one would really like to see this setup > supported in pulse (despite not having the h/w to exploit it myself!). > > Col It would be great if it was supported automatically! But in the meantime, can I get my patch accepted? As I said, I'll forward port it if you just let me know that you'll apply the patch. Thanks, Kyle ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
'Twas brillig, and Lennart Poettering at 26/03/09 14:25 did gyre and gimble: I doubt that it would be so useful to expose this in PA anyway. I mean, how realistic is it wanting to drive both SPDIF and analog audio at the same time from the same sound card? Appears to be a very exotic niche usage to me. I'm not so sure. I've had quite a few people wanting to do this. One user even has a card where the analog comes out his speakers but the digital is connected to his HDMI output. For him, he can play a movie on his computer via HDMI and direct the movie's audio via the digital connector while still using his computer and wanting to output desktop related sounds there. That's not an overly exotic setup IMO. (normally HDMI sound comes from a different "card" in the examples I've seen in the past, so this one was an exception to me). This example was on IRC just the other day... just search your backlog for STAC and you should find it! That example aside, I have seen several comments from other users wanting to use both at the same time, so I for one would really like to see this setup supported in pulse (despite not having the h/w to exploit it myself!). Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Tue, 24.03.09 12:26, Tomasz Torcz (to...@pipebreaker.pl) wrote: > > While I could be wrong (as I don't have much hardware to test despite > > writing the above feature in pavucontrol!), I don't think pulse probes for > > dual simultaneous outputs at present. As you can see in that screenshot the > > analog and digial outputs are exclusive... > > > > So while it's a step towards not requiring custom setups, it's not > > completely there yet. > > AFAIK this really depends on hardware. Above screenshot is from my > laptop (Centrino 2, Intel HDA on Connexant chip), I once saw this dialog > on computer with EMU10K card. The list was bigger than screen and there > were various combinations. But only combinations of 0-1 inputs and 0-1 outputs. No 2 or more outputs and/or 2 or more inputs at the same time. > So, if the card supports simultanous output to SPDIF and analog, there > will be two ink available. This is how I undestand profiles :) Sorry, this is not correct. > Another funny thing, my laptop has only analog jack for headphones. > Somehow chipset capabilities (or non existand dock capabilities) are > exposed, not the physical outputs. This is problematic indeed. It is impossible for the driver to know which connectors of the chips are actually soldered properly to external connectors by the laptop manufacturer and which ones are not -- unless we had an external database which knows this. But honestly I believe that maintaining such a database is doomed to fail. Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Tue, 24.03.09 09:36, Colin Guthrie (gm...@colin.guthr.ie) wrote: > 'Twas brillig, and Tomasz Torcz at 24/03/09 08:09 did gyre and gimble: >> On Tue, Mar 24, 2009 at 01:56:49AM -0500, kyle cronan wrote: >>> --- pulseaudio-0.9.14/src/modules/module-alsa-sink.c2009-01-12 >>> 17:11:38.0 -0600 >> >> Have you tried PA 0.9.15, with device profiles? They look like that: >> http://dżogstaff.fordon.pl.eu.org/2009.03.25-pavc-profiles.png >> and give separate sinks representing configuration you choose. >> > > While I could be wrong (as I don't have much hardware to test despite > writing the above feature in pavucontrol!), I don't think pulse probes > for dual simultaneous outputs at present. As you can see in that > screenshot the analog and digial outputs are exclusive... Yes, right now PA only checks the combinations of 0 or 1 inputs plus 0 or 1 outputs. Combinations of 2 or more outputs are not checked for. And there's actually a reason for this: Some sound cards allow devices to be opened multiple times (as in hw mixing). That way multiple programs may play audio at the same time with their audio being mixed in hw and output on the same connector. Now, it is not really possible right now to distuingish the case "Analog and SPDIF audio can be used completely independantly" and the case "The device may be opened twice but only either SPDIF or Analog can be used at the same time" -- because in both cases for PA it appears that opening the audio device twice works. > So while it's a step towards not requiring custom setups, it's not > completely there yet. I doubt that it would be so useful to expose this in PA anyway. I mean, how realistic is it wanting to drive both SPDIF and analog audio at the same time from the same sound card? Appears to be a very exotic niche usage to me. Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Tue, 24.03.09 13:59, Colin Guthrie (gm...@colin.guthr.ie) wrote: > > 'Twas brillig, and Tomasz Torcz at 24/03/09 11:26 did gyre and gimble: >> Another funny thing, my laptop has only analog jack for headphones. >> Somehow chipset capabilities (or non existand dock capabilities) are >> exposed, not the physical outputs. > > Yeah my laptop seems to say it has digital output too, but I see no > ports for it! :) I guess you sound chip can do it but you have no connector soldered on for this. Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
2009/3/24 Tomasz Torcz : > AFAIK this really depends on hardware. Above screenshot is from my > laptop (Centrino 2, Intel HDA on Connexant chip), I once saw this dialog > on computer with EMU10K card. The list was bigger than screen and there > were various combinations. > So, if the card supports simultanous output to SPDIF and analog, there > will be two ink available. This is how I undestand profiles :) The problem is not that I had to manually specify two sinks in the config file. I don't mind doing that. The problem is that the only way for me to independently control the volume of the SPDIF was to create a custom mixer control using softvol. So I needed a way to select this as the mixer for one of the sinks. I tried installing the latest git sources on my Ubuntu Jaunty box but it just broke sound in all my applications. For my own purposes, I'm going to need to start with the Ubuntu-patched 0.9.14. However, if you are willing to accept this patch I will forward port it so that it applies to the latest sources. It's a completely harmless change, so why not apply it? Thanks, Kyle > Another funny thing, my laptop has only analog jack for headphones. > Somehow chipset capabilities (or non existand dock capabilities) are > exposed, not the physical outputs. > -- > Tomasz Torcz "Never underestimate the bandwidth of a station > xmpp: zdzich...@chrome.pl wagon filled with backup tapes." -- Jim Gray > > ___ > pulseaudio-discuss mailing list > pulseaudio-discuss@mail.0pointer.de > https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss > ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
'Twas brillig, and Tomasz Torcz at 24/03/09 11:26 did gyre and gimble: Another funny thing, my laptop has only analog jack for headphones. Somehow chipset capabilities (or non existand dock capabilities) are exposed, not the physical outputs. Yeah my laptop seems to say it has digital output too, but I see no ports for it! :) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Tue, Mar 24, 2009 at 09:36:32AM +, Colin Guthrie wrote: > 'Twas brillig, and Tomasz Torcz at 24/03/09 08:09 did gyre and gimble: >> On Tue, Mar 24, 2009 at 01:56:49AM -0500, kyle cronan wrote: >>> --- pulseaudio-0.9.14/src/modules/module-alsa-sink.c2009-01-12 >>> 17:11:38.0 -0600 >> >> Have you tried PA 0.9.15, with device profiles? They look like that: >> http://dżogstaff.fordon.pl.eu.org/2009.03.25-pavc-profiles.png >> and give separate sinks representing configuration you choose. >> > > While I could be wrong (as I don't have much hardware to test despite > writing the above feature in pavucontrol!), I don't think pulse probes for > dual simultaneous outputs at present. As you can see in that screenshot the > analog and digial outputs are exclusive... > > So while it's a step towards not requiring custom setups, it's not > completely there yet. AFAIK this really depends on hardware. Above screenshot is from my laptop (Centrino 2, Intel HDA on Connexant chip), I once saw this dialog on computer with EMU10K card. The list was bigger than screen and there were various combinations. So, if the card supports simultanous output to SPDIF and analog, there will be two ink available. This is how I undestand profiles :) Another funny thing, my laptop has only analog jack for headphones. Somehow chipset capabilities (or non existand dock capabilities) are exposed, not the physical outputs. -- Tomasz Torcz "Never underestimate the bandwidth of a station xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
'Twas brillig, and Tomasz Torcz at 24/03/09 08:09 did gyre and gimble: On Tue, Mar 24, 2009 at 01:56:49AM -0500, kyle cronan wrote: --- pulseaudio-0.9.14/src/modules/module-alsa-sink.c2009-01-12 17:11:38.0 -0600 Have you tried PA 0.9.15, with device profiles? They look like that: http://dżogstaff.fordon.pl.eu.org/2009.03.25-pavc-profiles.png and give separate sinks representing configuration you choose. While I could be wrong (as I don't have much hardware to test despite writing the above feature in pavucontrol!), I don't think pulse probes for dual simultaneous outputs at present. As you can see in that screenshot the analog and digial outputs are exclusive... So while it's a step towards not requiring custom setups, it's not completely there yet. (unless I'm wrong!) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] specifying ALSA mixer control
On Tue, Mar 24, 2009 at 01:56:49AM -0500, kyle cronan wrote: > --- pulseaudio-0.9.14/src/modules/module-alsa-sink.c 2009-01-12 > 17:11:38.0 -0600 Have you tried PA 0.9.15, with device profiles? They look like that: http://dżogstaff.fordon.pl.eu.org/2009.03.25-pavc-profiles.png and give separate sinks representing configuration you choose. -- Tomasz Torcz "Never underestimate the bandwidth of a station xmpp: zdzich...@chrome.plwagon filled with backup tapes." -- Jim Gray ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] specifying ALSA mixer control
Hi, My audio device has an IEC958 output as well as analog out. I set up two module-alsa-sink's so that i can direct streams to either output, but I found that I couldn't control the volume of each sink independently. I was able to use asound.conf to create a softvol control for the digital out. However, module-alsa-sink doesn't have any way to select a particular mixer control. Since both pcms are part of the same card they both end up using the Master control. The attached patch adds an argument called "control" to the ALSA sink module. If this argument is specified it tries to use that control. Otherwise it uses the current method of selecting Master, with PCM as a fallback. Best, Kyle --- pulseaudio-0.9.14/src/modules/module-alsa-sink.c 2009-01-12 17:11:38.0 -0600 +++ pulseaudio-0.9.14.new/src/modules/module-alsa-sink.c 2009-03-24 01:20:21.0 -0500 @@ -72,7 +72,8 @@ "mmap= " "tsched= " "tsched_buffer_size= " -"tsched_buffer_watermark="); +"tsched_buffer_watermark= " +"control="); static const char* const valid_modargs[] = { "sink_name", @@ -88,6 +89,7 @@ "tsched", "tsched_buffer_size", "tsched_buffer_watermark", +"control", NULL }; @@ -1251,6 +1253,7 @@ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d; pa_usec_t usec; pa_sink_new_data data; +const char *control_name; snd_pcm_info_alloca(&pcm_info); @@ -1408,9 +1411,15 @@ } } -if (found) -if (!(u->mixer_elem = pa_alsa_find_elem(u->mixer_handle, "Master", "PCM"))) -found = FALSE; +if (found) { +if ((control_name = pa_modargs_get_value(ma, "control", NULL))) { +if (!(u->mixer_elem = pa_alsa_find_elem(u->mixer_handle, control_name, NULL))) +found = FALSE; +} else { +if (!(u->mixer_elem = pa_alsa_find_elem(u->mixer_handle, "Master", "PCM"))) +found = FALSE; +} +} if (!found) { snd_mixer_close(u->mixer_handle); ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss