Re: [pulseaudio-discuss] [PATCH] alsa-mixer: Recognize "Dock Line Out" jack

2015-09-18 Thread Tanu Kaskinen
I applied this now, and also a patch for updating speaker-always.

-- Tanu


On Wed, 2015-06-17 at 15:52 +0200, David Henningsson wrote:
> Looks good, but analog-output-speaker-always.conf should be patched
> too.
> 
> Sjoerd, this does not disturb anything on your end, right?
> 
> On 2015-06-15 17:06, Takashi Iwai wrote:
> > Some machines provide "Dock Line Out Jack" control that should be
> > handled like a normal line out.
> > 
> > Signed-off-by: Takashi Iwai 
> > ---
> >   src/modules/alsa/mixer/paths/analog-output-lineout.conf | 8
> > 
> >   src/modules/alsa/mixer/paths/analog-output-speaker.conf | 4 
> >   2 files changed, 12 insertions(+)
> > 
> > diff --git a/src/modules/alsa/mixer/paths/analog-output
> > -lineout.conf b/src/modules/alsa/mixer/paths/analog-output
> > -lineout.conf
> > index 68f444ae80a9..773abc409aa2 100644
> > --- a/src/modules/alsa/mixer/paths/analog-output-lineout.conf
> > +++ b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
> > @@ -71,6 +71,14 @@ state.plugged = unknown
> >   state.unplugged = unknown
> >   required-any = any
> > 
> > +[Jack Dock Line Out]
> > +required-any = any
> > +
> > +[Jack Dock Line Out Phantom]
> > +state.plugged = unknown
> > +state.unplugged = unknown
> > +required-any = any
> > +
> >   [Element Hardware Master]
> >   switch = mute
> >   volume = merge
> > diff --git a/src/modules/alsa/mixer/paths/analog-output
> > -speaker.conf b/src/modules/alsa/mixer/paths/analog-output
> > -speaker.conf
> > index 39193dd8851e..9e81e5592baa 100644
> > --- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
> > +++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
> > @@ -44,6 +44,10 @@ state.unplugged = unknown
> >   state.plugged = no
> >   state.unplugged = unknown
> > 
> > +[Jack Dock Line Out]
> > +state.plugged = no
> > +state.unplugged = unknown
> > +
> >   [Jack Speaker Phantom]
> >   required-any = any
> >   state.plugged = unknown
> > 
> 
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Set, lock and hide volume controls of sinks, sources, streams and applications?

2015-09-18 Thread Rene Bartsch

Hi,

chaining sinks, sources, streams and applications creates a chain of 
superfluos volume-controls baffling the users (e.g. Rhythmbox -> 
rtp-send -> rtp-recv -> null-sink -> pacat = 5x volume control). Users 
usually change the volume on all volume-controls in a chain resulting in 
completely wrong volumes.


PACtl can be used to set the volume of sinks, sources, streams and 
applications. Is there any way to lock the volume (e.g. 0 dB) and hide 
the volume-control sliders in applications like PAVUControl?



--
Best regards,

Renne
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Pulseaudio + BruteFIR-convolver howto

2015-09-18 Thread Rene Bartsch


For all who want Pulseaudio with convolving/digital-room-correction:

Pulseaudio -> BruteFIR -> ALSA (BruteFIR needs to be the last 
manipulation in the audio-stream chain)



/etc/pulse/default.pa:
---

load-module module-null-sink sink_name=default 
sink_properties="device.description='Default'" channels=8 
channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right

set-default-sink  default

---



BruteFIR I/O-configuration:
---

input 0,1,2,3,4,5,6,7 {
device: "file" { path: "/dev/stdin"; };  # Use STDIN
sample:	"S32_LE";# Best sample format 
supported by soundcard

channels:   8;
};


output 0,1,2,3,4,5,6,7 {
device:	"alsa" { device: "hw:,0"; ignore_xrun: true; };	# 
Direct ALSA hardware access ("hw:"), ignore ALSA I/O-underruns

sample: "S32_LE"; # best 
sample format supported by soundcard
channels:   8;  # number of 
open channels / which to use
};





Command-line/start-script:
---

pacat --record --device=default --volume=65536 --rate=48000 
--format=s32le --channels=8 
--channel-map=front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right 
\
| sudo /usr/bin/brutefir -nodefault configuration-file>


---


"--rate=" has to match "sampling_rate" in the global configuration of 
BruteFIR.
"--format=" has to match "sample" and "--channels=" has to match 
"channels" in the input-configuration of BruteFIR.
"--channel-map" defines how to map channels to the input channels (0 - 
7).



If you're having trouble with ALSA I/O-underruns, try other values for 
"filter_length" in the BruteFIR global configuration (e.g. 512,128 
instead of 65536).


Using "module-pipe-sink" instead of "module-null-sink" + "pacat" causes 
ALSA I/O-underruns, too



--
Best regards,

Renne
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Pulse Audio - on AWS

2015-09-18 Thread LakshmiNarayanan Raju
Hi Everyone,

I am using Pulse Audio Loopback module(snd-sloop) for capturing my sound output 
into my microphone. I am finding this mechanism not working in AWS as there is 
no Sound Card installed.

Loading snd-dummy(Virtual Sound Card) is of no use.

Can some one comment, on if Aloop works only with a Physical/Hardware Sound 
card ?

Thanks and Regards,
Lakshmi Narayanan
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH 1/2] volume: Refactor get/set balance/fade

2015-09-18 Thread David Henningsson
get/set balance and fade use very similar code, so refactor out
common parts.

Signed-off-by: David Henningsson 
---
 src/pulse/volume.c | 111 ++---
 1 file changed, 29 insertions(+), 82 deletions(-)

diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 69bef4f..2b34ded 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -635,7 +635,8 @@ int pa_cvolume_compatible_with_channel_map(const pa_cvolume 
*v, const pa_channel
 return v->channels == cm->channels;
 }
 
-static void get_avg_lr(const pa_channel_map *map, const pa_cvolume *v, 
pa_volume_t *l, pa_volume_t *r) {
+static void get_avg(const pa_channel_map *map, const pa_cvolume *v, 
pa_volume_t *l, pa_volume_t *r,
+bool (*on_l)(pa_channel_position_t), bool 
(*on_r)(pa_channel_position_t)) {
 int c;
 pa_volume_t left = 0, right = 0;
 unsigned n_left = 0, n_right = 0;
@@ -647,10 +648,10 @@ static void get_avg_lr(const pa_channel_map *map, const 
pa_cvolume *v, pa_volume
 pa_assert(r);
 
 for (c = 0; c < map->channels; c++) {
-if (on_left(map->map[c])) {
+if (on_l(map->map[c])) {
 left += v->values[c];
 n_left++;
-} else if (on_right(map->map[c])) {
+} else if (on_r(map->map[c])) {
 right += v->values[c];
 n_right++;
 }
@@ -678,7 +679,7 @@ float pa_cvolume_get_balance(const pa_cvolume *v, const 
pa_channel_map *map) {
 if (!pa_channel_map_can_balance(map))
 return 0.0f;
 
-get_avg_lr(map, v, &left, &right);
+get_avg(map, v, &left, &right, on_left, on_right);
 
 if (left == right)
 return 0.0f;
@@ -698,21 +699,13 @@ float pa_cvolume_get_balance(const pa_cvolume *v, const 
pa_channel_map *map) {
 return 1.0f - ((float) left / (float) right);
 }
 
-pa_cvolume* pa_cvolume_set_balance(pa_cvolume *v, const pa_channel_map *map, 
float new_balance) {
+static pa_cvolume* set_balance(pa_cvolume *v, const pa_channel_map *map, float 
new_balance,
+   bool (*on_l)(pa_channel_position_t), bool 
(*on_r)(pa_channel_position_t)) {
+
 pa_volume_t left, nleft, right, nright, m;
 unsigned c;
 
-pa_assert(map);
-pa_assert(v);
-
-pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(v, map), 
NULL);
-pa_return_val_if_fail(new_balance >= -1.0f, NULL);
-pa_return_val_if_fail(new_balance <= 1.0f, NULL);
-
-if (!pa_channel_map_can_balance(map))
-return v;
-
-get_avg_lr(map, v, &left, &right);
+get_avg(map, v, &left, &right, on_l, on_r);
 
 m = PA_MAX(left, right);
 
@@ -725,12 +718,12 @@ pa_cvolume* pa_cvolume_set_balance(pa_cvolume *v, const 
pa_channel_map *map, flo
 }
 
 for (c = 0; c < map->channels; c++) {
-if (on_left(map->map[c])) {
+if (on_l(map->map[c])) {
 if (left == 0)
 v->values[c] = nleft;
 else
 v->values[c] = (pa_volume_t) PA_CLAMP_VOLUME(((uint64_t) 
v->values[c] * (uint64_t) nleft) / (uint64_t) left);
-} else if (on_right(map->map[c])) {
+} else if (on_r(map->map[c])) {
 if (right == 0)
 v->values[c] = nright;
 else
@@ -741,6 +734,21 @@ pa_cvolume* pa_cvolume_set_balance(pa_cvolume *v, const 
pa_channel_map *map, flo
 return v;
 }
 
+
+pa_cvolume* pa_cvolume_set_balance(pa_cvolume *v, const pa_channel_map *map, 
float new_balance) {
+pa_assert(map);
+pa_assert(v);
+
+pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(v, map), 
NULL);
+pa_return_val_if_fail(new_balance >= -1.0f, NULL);
+pa_return_val_if_fail(new_balance <= 1.0f, NULL);
+
+if (!pa_channel_map_can_balance(map))
+return v;
+
+return set_balance(v, map, new_balance, on_left, on_right);
+}
+
 pa_cvolume* pa_cvolume_scale(pa_cvolume *v, pa_volume_t max) {
 unsigned c;
 pa_volume_t t = 0;
@@ -785,40 +793,8 @@ pa_cvolume* pa_cvolume_scale_mask(pa_cvolume *v, 
pa_volume_t max, pa_channel_map
 return v;
 }
 
-static void get_avg_fr(const pa_channel_map *map, const pa_cvolume *v, 
pa_volume_t *f, pa_volume_t *r) {
-int c;
-pa_volume_t front = 0, rear = 0;
-unsigned n_front = 0, n_rear = 0;
-
-pa_assert(v);
-pa_assert(map);
-pa_assert(map->channels == v->channels);
-pa_assert(f);
-pa_assert(r);
-
-for (c = 0; c < map->channels; c++) {
-if (on_front(map->map[c])) {
-front += v->values[c];
-n_front++;
-} else if (on_rear(map->map[c])) {
-rear += v->values[c];
-n_rear++;
-}
-}
-
-if (n_front <= 0)
-*f = PA_VOLUME_NORM;
-else
-*f = front / n_front;
-
-if (n_rear <= 0)
-*r = PA_VOLUME_NORM;
-else
-*r = rear / n_rear;
-}
-
 float pa_cvolume_get_fade(const pa_cvolume *v, const pa_channel_map *map) {
-pa_volume_t front, rear;
+pa_volume_t rear, fr

[pulseaudio-discuss] [PATCH 2/2] volume: Add LFE balance API

2015-09-18 Thread David Henningsson
The gnome/unity-control-center UIs have a master volume slider, and
three sub-sliders: balance, fade, and subwoofer. Balance and fade
use PA's set_balance and set_fade APIs accordingly, but the subwoofer
slider sometimes does unintuitive things.

In order to make that slider behave better, let's add a LFE balance
API that these volume control UIs can use instead. With this API,
the UI can balance between "no subwoofer" and "only subwoofer" with
"equal balance" in the middle, which would make it more consistent
with the behaviour of the other sliders.

BugLink: https://bugzilla.gnome.org/show_bug.cgi?id=753847

Signed-off-by: David Henningsson 
---
 src/map-file   |  3 +++
 src/pulse/channelmap.c | 13 +
 src/pulse/channelmap.h |  5 +
 src/pulse/volume.c | 40 
 src/pulse/volume.h | 18 ++
 5 files changed, 79 insertions(+)

diff --git a/src/map-file b/src/map-file
index 5159829..93a62b8 100644
--- a/src/map-file
+++ b/src/map-file
@@ -7,6 +7,7 @@ pa_bytes_snprint;
 pa_bytes_to_usec;
 pa_channel_map_can_balance;
 pa_channel_map_can_fade;
+pa_channel_map_can_lfe_balance;
 pa_channel_map_compatible;
 pa_channel_map_equal;
 pa_channel_map_has_position;
@@ -127,6 +128,7 @@ pa_cvolume_dec;
 pa_cvolume_equal;
 pa_cvolume_get_balance;
 pa_cvolume_get_fade;
+pa_cvolume_get_lfe_balance;
 pa_cvolume_get_position;
 pa_cvolume_inc;
 pa_cvolume_inc_clamp;
@@ -142,6 +144,7 @@ pa_cvolume_scale_mask;
 pa_cvolume_set;
 pa_cvolume_set_balance;
 pa_cvolume_set_fade;
+pa_cvolume_set_lfe_balance;
 pa_cvolume_set_position;
 pa_cvolume_snprint;
 pa_cvolume_snprint_verbose;
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index c342ef6..ab343bc 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -684,6 +684,19 @@ int pa_channel_map_can_fade(const pa_channel_map *map) {
 (PA_CHANNEL_POSITION_MASK_REAR & m);
 }
 
+int pa_channel_map_can_lfe_balance(const pa_channel_map *map) {
+pa_channel_position_mask_t l, m;
+
+pa_assert(map);
+pa_return_val_if_fail(pa_channel_map_valid(map), 0);
+
+m = pa_channel_map_mask(map);
+l = PA_CHANNEL_POSITION_MASK(PA_CHANNEL_POSITION_LFE);
+
+return
+(l & m) && ((~l) & m);
+}
+
 const char* pa_channel_map_to_name(const pa_channel_map *map) {
 pa_bitset_t in_map[PA_BITSET_ELEMENTS(PA_CHANNEL_POSITION_MAX)];
 unsigned c;
diff --git a/src/pulse/channelmap.h b/src/pulse/channelmap.h
index 30904ef..6eabe20 100644
--- a/src/pulse/channelmap.h
+++ b/src/pulse/channelmap.h
@@ -338,6 +338,11 @@ int pa_channel_map_can_balance(const pa_channel_map *map) 
PA_GCC_PURE;
  * there are front/rear channels available. \since 0.9.15 */
 int pa_channel_map_can_fade(const pa_channel_map *map) PA_GCC_PURE;
 
+/** Returns non-zero if it makes sense to apply a volume 'lfe balance'
+ * (i.e.\ 'balance' between LFE and non-LFE channels) with this mapping,
+ *  i.e.\ if there are LFE and non-LFE channels available. \since 8.0 */
+int pa_channel_map_can_lfe_balance(const pa_channel_map *map) PA_GCC_PURE;
+
 /** Tries to find a well-known channel mapping name for this channel
  * mapping, i.e.\ "stereo", "surround-71" and so on. If the channel
  * mapping is unknown NULL will be returned. This name can be parsed
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 2b34ded..91906be 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -552,6 +552,10 @@ static bool on_center(pa_channel_position_t p) {
 return !!(PA_CHANNEL_POSITION_MASK(p) & PA_CHANNEL_POSITION_MASK_CENTER);
 }
 
+static bool on_hfe(pa_channel_position_t p) {
+return !(p == PA_CHANNEL_POSITION_LFE);
+}
+
 static bool on_lfe(pa_channel_position_t p) {
 return p == PA_CHANNEL_POSITION_LFE;
 }
@@ -829,6 +833,42 @@ pa_cvolume* pa_cvolume_set_fade(pa_cvolume *v, const 
pa_channel_map *map, float
 return set_balance(v, map, new_fade, on_rear, on_front);
 }
 
+float pa_cvolume_get_lfe_balance(const pa_cvolume *v, const pa_channel_map 
*map) {
+pa_volume_t hfe, lfe;
+
+pa_assert(v);
+pa_assert(map);
+
+pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(v, map), 
0.0f);
+
+if (!pa_channel_map_can_lfe_balance(map))
+return 0.0f;
+
+get_avg(map, v, &hfe, &lfe, on_hfe, on_lfe);
+
+if (hfe == lfe)
+return 0.0f;
+
+if (hfe > lfe)
+return -1.0f + ((float) lfe / (float) hfe);
+else
+return 1.0f - ((float) hfe / (float) lfe);
+}
+
+pa_cvolume* pa_cvolume_set_lfe_balance(pa_cvolume *v, const pa_channel_map 
*map, float new_balance) {
+pa_assert(map);
+pa_assert(v);
+
+pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(v, map), 
NULL);
+pa_return_val_if_fail(new_balance >= -1.0f, NULL);
+pa_return_val_if_fail(new_balance <= 1.0f, NULL);
+
+if (!pa_channel_map_can_lfe_balance(map))
+return v;
+
+return set_balance(v, map, new_balance, on_hfe, on_lfe);
+}
+
 pa_cvolume* pa_cvolume

Re: [pulseaudio-discuss] Pulse Audio - on AWS

2015-09-18 Thread Arun Raghavan
Hi,

On 18 September 2015 at 18:01, LakshmiNarayanan Raju
 wrote:
> Hi Everyone,
>
> I am using Pulse Audio Loopback module(snd-sloop) for capturing my sound 
> output into my microphone. I am finding this mechanism not working in AWS as 
> there is no Sound Card installed.
>
> Loading snd-dummy(Virtual Sound Card) is of no use.
>
> Can some one comment, on if Aloop works only with a Physical/Hardware Sound 
> card ?

If you don't care about the hardware device at all, you can just use
PA without an ALSA device by commenting out the appropriate modules in
/etc/pulse/default.pa

We have a module-null-sink which provides a virtual playback device
and every sink has a virtual monitor source that lets you capture all
audio going to that sink.

-- Arun
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 2/2] volume: Add LFE balance API

2015-09-18 Thread Raymond Yau
2015-9-18 下午8:48於 "David Henningsson" 寫道:
>
> The gnome/unity-control-center UIs have a master volume slider, and
> three sub-sliders: balance, fade, and subwoofer. Balance and fade
> use PA's set_balance and set_fade APIs accordingly, but the subwoofer
> slider sometimes does unintuitive things.
>
> In order to make that slider behave better, let's add a LFE balance
> API that these volume control UIs can use instead. With this API,
> the UI can balance between "no subwoofer" and "only subwoofer" with
> "equal balance" in the middle, which would make it more consistent
> with the behaviour of the other sliders.
>

Will high frequency signal damge the subwoofer ?
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 2/2] volume: Add LFE balance API

2015-09-18 Thread Tanu Kaskinen
On Fri, 2015-09-18 at 14:47 +0200, David Henningsson wrote:
> The gnome/unity-control-center UIs have a master volume slider, and
> three sub-sliders: balance, fade, and subwoofer. Balance and fade
> use PA's set_balance and set_fade APIs accordingly, but the subwoofer
> slider sometimes does unintuitive things.
> 
> In order to make that slider behave better, let's add a LFE balance
> API that these volume control UIs can use instead. With this API,
> the UI can balance between "no subwoofer" and "only subwoofer" with
> "equal balance" in the middle, which would make it more consistent
> with the behaviour of the other sliders.
> 
> BugLink: https://bugzilla.gnome.org/show_bug.cgi?id=753847
> 
> Signed-off-by: David Henningsson 

As a user, I don't expect a subwoofer slider to mute other channels.
Have you got any support from other people for your proposed subwoofer
slider behaviour?

If I understand correctly, the bug is about strange relation between
the overall volume slider and the subwoofer volume slider. I fully
agree with Britt Yazel (comment #10). However, I don't know if the
subwoofer slider can be made sane without an API that supports the
"overall volume" concept properly (which pa_cvolume doesn't do).

-- 
Tanu
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 2/2] volume: Add LFE balance API

2015-09-18 Thread David Henningsson



On 2015-09-18 15:17, Tanu Kaskinen wrote:

On Fri, 2015-09-18 at 14:47 +0200, David Henningsson wrote:

The gnome/unity-control-center UIs have a master volume slider, and
three sub-sliders: balance, fade, and subwoofer. Balance and fade
use PA's set_balance and set_fade APIs accordingly, but the subwoofer
slider sometimes does unintuitive things.

In order to make that slider behave better, let's add a LFE balance
API that these volume control UIs can use instead. With this API,
the UI can balance between "no subwoofer" and "only subwoofer" with
"equal balance" in the middle, which would make it more consistent
with the behaviour of the other sliders.

BugLink: https://bugzilla.gnome.org/show_bug.cgi?id=753847

Signed-off-by: David Henningsson 


As a user, I don't expect a subwoofer slider to mute other channels.


What you got with my patch (and one patch to -control-center to use the 
API) is three sliders. They're all adjusting the balance in the sense 
that in the middle, all channels are loud, and some channels are 
gradually weakening when you move a slider towards the edge.


I find that to be the most consistent.


Have you got any support from other people for your proposed subwoofer
slider behaviour?


FWIW, after I came up with the name "lfe balance" (just to see if there 
was another name for the same thing), the first hit is to some Apple 
program, which seems to be using the LFE balance the same way. [1]



If I understand correctly, the bug is about strange relation between
the overall volume slider and the subwoofer volume slider. I fully
agree with Britt Yazel (comment #10). However, I don't know if the
subwoofer slider can be made sane without an API that supports the
"overall volume" concept properly (which pa_cvolume doesn't do).


...and is unlikely to do any time soon, so we need something else.

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

[1] https://support.apple.com/kb/PH12578?locale=sv_SE
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 2/2] volume: Add LFE balance API

2015-09-18 Thread David Henningsson



On 2015-09-18 15:03, Raymond Yau wrote:


2015-9-18 下午8:48於 "David Henningsson"
mailto:david.hennings...@canonical.com>>寫道:
 >
 > The gnome/unity-control-center UIs have a master volume slider, and
 > three sub-sliders: balance, fade, and subwoofer. Balance and fade
 > use PA's set_balance and set_fade APIs accordingly, but the subwoofer
 > slider sometimes does unintuitive things.
 >
 > In order to make that slider behave better, let's add a LFE balance
 > API that these volume control UIs can use instead. With this API,
 > the UI can balance between "no subwoofer" and "only subwoofer" with
 > "equal balance" in the middle, which would make it more consistent
 > with the behaviour of the other sliders.
 >

Will high frequency signal damge the subwoofer ?


That's not relevant here - whether or not we can send hfe signals to the 
subwoofer depends on lfe-crossover-freq, not the potential slider.


--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 2/2] volume: Add LFE balance API

2015-09-18 Thread Tanu Kaskinen
On Fri, 2015-09-18 at 15:33 +0200, David Henningsson wrote:
> 
> On 2015-09-18 15:17, Tanu Kaskinen wrote:
> > On Fri, 2015-09-18 at 14:47 +0200, David Henningsson wrote:
> > > The gnome/unity-control-center UIs have a master volume slider, and
> > > three sub-sliders: balance, fade, and subwoofer. Balance and fade
> > > use PA's set_balance and set_fade APIs accordingly, but the subwoofer
> > > slider sometimes does unintuitive things.
> > > 
> > > In order to make that slider behave better, let's add a LFE balance
> > > API that these volume control UIs can use instead. With this API,
> > > the UI can balance between "no subwoofer" and "only subwoofer" with
> > > "equal balance" in the middle, which would make it more consistent
> > > with the behaviour of the other sliders.
> > > 
> > > BugLink: https://bugzilla.gnome.org/show_bug.cgi?id=753847
> > > 
> > > Signed-off-by: David Henningsson 
> > 
> > As a user, I don't expect a subwoofer slider to mute other channels.
> 
> What you got with my patch (and one patch to -control-center to use the 
> API) is three sliders. They're all adjusting the balance in the sense 
> that in the middle, all channels are loud, and some channels are 
> gradually weakening when you move a slider towards the edge.
> 
> I find that to be the most consistent.

Having thought about this some more, I have become to like your
proposal very much. Either there should be only per-channel volumes, or
only balance sliders that work as you explained. If there were left
-right and rear-front balance sliders plus a pure subwoofer channel
volume, like what I believe Britt and me originally wanted, there would
be no way to make the subwoofer channel louder than the other channels.

So, the idea has a strong ack from me, I didn't review the code yet.

-- 
Tanu
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Mixer connection when switching users

2015-09-18 Thread Tanu Kaskinen
Hi,

I noticed that my headphone volume wasn't getting restored properly
when plugging in the headphones. The probable cause turned out to be
that gdm's PulseAudio instance was messing with the mixer controls,
causing mixer update events in my own PulseAudio instance.

At the time I logged in, the gdm user lost access to the sound cards,
but Linux doesn't revoke access to file descriptors that are already
open. PulseAudio voluntarily closes the PCM device connections in that
situation, but PulseAudio doesn't close the mixer connection, so gdm
still had access to the mixer, and the jack detection events caused the
gdm to fiddle with the mixer controls.

I will fix this issue, but I'm not sure how I should do that. There
might be some simple fix that would prevent mixer modifications when
the sink suspend cause is PA_SUSPEND_SESSION, but I could also do a
bigger change: close the mixer connection when udev changes the device
permissions. I think it's a bug in itself that we keep the mixer
connection open, even if in practice there's no harm from doing that.
Do others think the same, or should I try to only make a minimal fix,
adding a check somewhere that prevents writes to the mixer when
PA_SUSPEND_SESSION is set?

-- 
Tanu
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH] bootstrap.sh: Do a make only if configure has succeeded

2015-09-18 Thread Ahmed S. Darwish
Otherwise the important configure script error messages get buried
by the "make clean" output.

Signed-off-by: Ahmed S. Darwish 
---
 bootstrap.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bootstrap.sh b/bootstrap.sh
index 644d014..adaab46 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -50,6 +50,6 @@ autopoint --force
 AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install 
--verbose
 
 if test "x$NOCONFIGURE" = "x"; then
-CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var 
--enable-force-preopen "$@"
-make clean
+CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var 
--enable-force-preopen "$@" && \
+make clean
 fi

Regards,

-- 
Darwish
http://darwish.chasingpointers.com
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] no mic peak meter bar in sound settings (custom ASoC driver)

2015-09-18 Thread maruthi srinivas
Hi Arun,

Iam referring to  'input' tab in 'sound settings'  window. In that ,
progress bar should move if mic is connected and active.  Similarly,
there is a progress bar in 'input devices' tab in 'pavucontrol'.

When I connect mic and talk, the mic progress bar in pavucontrol app
moves, but not in 'sound settings'. The mic works as confirmed from
all recording apps.

Regards,
Maruthi

On Tue, Sep 15, 2015 at 10:19 AM, Arun Raghavan  wrote:
> On 10 September 2015 at 16:18, maruthi srinivas
>  wrote:
>> Hi,
>>
>> Iam new to pulse audio. I developed a custom driver based on ASoC. In
>> sound settings sound card is listed with playback and capture.
>> The mic's peak meter doesn't reflect anything even when mic is
>> working. When I run pavucontrol, in input settings I could see the
>> peak meter progress bar properly.
>> Also, arecord works well at all times.
>
> Which peak meter are you referring to? It's not clear what's not
> working if arecord, parec, and pavucontrol are. :-)
>
> -- Arun
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss