[pulseaudio-discuss] specifying ALSA mixer control

2009-03-24 Thread kyle cronan
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=enable memory mapping? 
 tsched=enable system timer based scheduling mode? 
 tsched_buffer_size=buffer size when using timer based scheduling 
-tsched_buffer_watermark=lower fill watermark);
+tsched_buffer_watermark=lower fill watermark 
+control=name of mixer 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


Re: [pulseaudio-discuss] specifying ALSA mixer control

2009-03-24 Thread Tomasz Torcz
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


Re: [pulseaudio-discuss] specifying ALSA mixer control

2009-03-24 Thread Tomasz Torcz
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


[pulseaudio-discuss] Description for virtual sinks

2009-03-24 Thread Maarten Bosmans
Is there any particular reason that it is not possible to set the
description when making a sink with module-remap-sink (or his friends
module-combine, module-tunnel-sink, etc.)?
It seems that the description is always derived from the master sink, but I
would like to customize it, because this is the name that is shown in
interfaces like pavucontrol.

Maarten
___
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-03-24 Thread Colin Guthrie

'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

2009-03-24 Thread kyle cronan
2009/3/24 Tomasz Torcz to...@pipebreaker.pl:
  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] memblock.c: Assertion 'pa_atomic_load(b-pool-stat.n_imported) 0' Aborting

2009-03-24 Thread Philip Walden

Lennart Poettering wrote:

On Tue, 03.03.09 12:18, Philip Walden (pwaldenli...@comcast.net) wrote:

  
I run pulseaudio for days on end. It drives a house sound system, which  
plays music and radio to a cron schedule, even when I am away. I have a  
USB sound card and an internal pci sound device both driven via a  
combined sink.


Every few days or so, the pulseaudio server dies with the one of  
following messages. Logging out-in restores the service. The problem is  
that I'd like to have it last at least 2-3 weeks.


localhost pulseaudio[25023]: memblock.c: Assertion  
'pa_atomic_load(b-pool-stat.n_imported)  0' failed at  
pulsecore/memblock.c:634, function memblock_replace_import(). Aborting.


localhost pulseaudio[19753]: memblock.c: Assertion  
'pa_atomic_load(b-pool-stat.n_imported)  0' failed at  
pulsecore/memblock.c:188, function stat_remove(). Aborting.


I have only recently joined the mailing list and I have not seen any  
threads that deal with this particular problem. Any advice appreciated.



Please provide a full back trace of this issue.

http://pulseaudio.org/wiki/Community#BugsPatchesTranslations

Also, please paste the full output of ls in pacmd. I need to know
which PA modules actually get loaded on your machine.

Lennart
  
The crashed pulseaudio server does not seem to be leaving a core file 
(so as to generate a stack trace) that I can spot. Is there some 
configuration I need to set to make it do this?


Here is the pacmd ls output:

Memory blocks currently allocated: 40, size: 202.3 KiB.
Memory blocks allocated during the whole lifetime: 57147, size: 158.3 MiB.
Memory blocks imported from other processes: 22, size: 94.7 KiB.
Memory blocks exported to other processes: 0, size: 0 B.
Total sample cache size: 0 B.
Default sample spec: s16le 2ch 44100Hz
Default sink name: 
alsa_output.usb_device_471_110_noserial_if0_sound_card_0_alsa_playback_0
Default source name: 
alsa_output.usb_device_471_110_noserial_if0_sound_card_0_alsa_playback_0.monitor

Memory blocks of type POOL: 18 allocated/32131 accumulated.
Memory blocks of type POOL_EXTERNAL: 0 allocated/24 accumulated.
Memory blocks of type APPENDED: 0 allocated/0 accumulated.
Memory blocks of type USER: 0 allocated/0 accumulated.
Memory blocks of type FIXED: 0 allocated/18396 accumulated.
Memory blocks of type IMPORTED: 22 allocated/6620 accumulated.
21 module(s) loaded.
   index: 0
   name: module-alsa-sink
   argument: device_id=0 
sink_name=alsa_output.pci_125d_1998_sound_card_0_alsa_playback_0

   used: -1
   auto unload: no
   index: 1
   name: module-alsa-source
   argument: device_id=0 
source_name=alsa_input.pci_125d_1998_sound_card_0_alsa_capture_0

   used: -1
   auto unload: no
   index: 2
   name: module-alsa-sink
   argument: device_id=1 
sink_name=alsa_output.usb_device_471_110_noserial_if0_sound_card_0_alsa_playback_0

   used: -1
   auto unload: no
   index: 3
   name: module-hal-detect
   argument: 
   used: -1
   auto unload: no
   index: 4
   name: module-esound-protocol-unix
   argument: 
   used: -1
   auto unload: no
   index: 5
   name: module-native-protocol-unix
   argument: 
   used: -1
   auto unload: no
   index: 6
   name: module-volume-restore
   argument: 
   used: -1
   auto unload: no
   index: 7
   name: module-default-device-restore
   argument: 
   used: -1
   auto unload: no
   index: 8
   name: module-rescue-streams
   argument: 
   used: -1
   auto unload: no
   index: 9
   name: module-suspend-on-idle
   argument: 
   used: -1
   auto unload: no
   index: 10
   name: module-combine
   argument: 
   used: -1
   auto unload: no
   index: 11
   name: module-rtp-recv
   argument: 
   used: -1
   auto unload: no
   index: 12
   name: module-native-protocol-tcp
   argument: auth-anonymous=1
   used: -1
   auto unload: no
   index: 13
   name: module-esound-protocol-tcp
   argument: auth-anonymous=1
   used: -1
   auto unload: no
   index: 14
   name: module-zeroconf-publish
   argument: 
   used: -1
   auto unload: no
   index: 15
   name: module-zeroconf-discover
   argument: 
   used: -1
   auto unload: no
   index: 16
   name: module-gconf
   argument: 
   used: -1
   auto unload: no
   index: 17
   name: module-tunnel-source
   argument: server=[192.168.1.140]:4713 
source=alsa_input.pci_109e_878_sound_card_0_alsa_capture_0 format=s16le 
channels=2 rate=32000 
source_name=tunnel.walden4.local.alsa_input.pci_109e_878_sound_card_0_alsa_capture_0 
channel_map=front-left,front-right

   used: -1
   auto unload: no
   index: 18
   name: module-tunnel-sink
   argument: server=[192.168.1.140]:4713 
sink=alsa_output.pci_13f6_111_sound_card_0_alsa_playback_0 format=s16le 
channels=2 rate=44100 
sink_name=tunnel.walden4.local.alsa_output.pci_13f6_111_sound_card_0_alsa_playback_0 
channel_map=front-left,front-right

   used: -1
   auto unload: no
   index: 19
   name: module-tunnel-source
   argument: server=[192.168.1.140]:4713 
source=alsa_input.pci_13f6_111_sound_card_0_alsa_capture_0