Re: [pulseaudio-discuss] [PATCH 5/5] man: sync_volume parameters to manual page

2010-10-16 Thread Colin Guthrie
'Twas brillig, and David Fries at 16/10/10 04:48 did gyre and gimble:
 This is what I came up with, take it or leave it.

I've tweaked the wording again. Hopefully it's OK, but further patches
can be made if needed.

/option
option
  poptsync-volume-extra-delay-usec=/opt The unit of time all HW
  volume changes are delayed. Negative values are also allowed.
  Defaults to 0./p
/option
 How about sync-volume-hw-delay-usec= ?  Then,
 The unit of time all HW volume changes are delayed if the volume
 changes are a constant time early. Negative values are also allowed.

I don't want to change the name of the option as that will affect the
other patches. Also I think if this proves to be needed then it
something we'd apply on a per-hw basis which means that ultimately we'd
need to build up a database of hw and the values. This information will
likely come from either alsa or from udev and not be a setting you apply
in the daemon.conf (which applies to all hardware you have on your machine).

So I'll leave this as it is for now.

 On Fri, Oct 15, 2010 at 10:22:16AM +0200, Paul Menzel wrote:
 I am still thinking that a ???normal??? users does not have a clue on how to
 determine to what value these options should be set. So it should be
 marked as expert value or something or a hint should be given on how one
 can determine what values should be used.

I think any values entered would be mostly trial and error anyway.

 A program could measure the hardware mixer latency by playing a square
 wave on one stream and adjusting the volume of another stream playing
 silence.  Then adjust the parameters so that the wave doesn't vary as
 the volume changes.  Too bad sound cards don't have the internal
 analog loopback control anymore, now you would need to externally loop
 the audio back.

I think normal users wont know how to use man ... :p

Yes this could be useful. If anyone writes such a tool, then we can
certainly reference it here.

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  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] [PATCH 5/5] man: sync_volume parameters to manual page

2010-10-15 Thread Paul Menzel
Dear Colin,


Am Donnerstag, den 14.10.2010, 20:30 +0100 schrieb Colin Guthrie:
 Subject: [PATCH] man: sync_volume parameters to manual page
 
 Some wording teaks by Colin Guthrie
 
 Signed-off-by: Jyri Sarha jyri.sa...@nokia.com
 Reviewed-by: Tanu Kaskinen tanu.kaski...@digia.com
 ---
  man/pulse-daemon.conf.5.xml.in |   26 ++
  1 files changed, 26 insertions(+), 0 deletions(-)
 
 diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
 index b5c9e92..f0a642b 100644
 --- a/man/pulse-daemon.conf.5.xml.in
 +++ b/man/pulse-daemon.conf.5.xml.in
 @@ -437,6 +437,32 @@ USA.
  
/section
  
 +  section name=Default Sync Volume Settings
 +
 +pThe flat volume feature sets the sink HW volume according to the
 +highest volume input stream and reduces the volume any other streams
 +(with lower volumes) in SW. To make this concurrent and ensure SW and
 +HW volume work together without any glitches, their application needs to
 +be synchronized. The sink implementation needs to support this
 +feature in order to these parameters to take effect./p
 +
 +option
 +  poptenable-sync-volume=/opt Enable sync volume for the sinks that
 +  support it. This feature is enabled by default./p
 +/option
 +option
 +  poptsync-volume-safety-margin-usec=/opt The unit of time by which
 +  the HW volume increases are delayed and HW volume decreases are 
 advanced.
 +  Defaults to 8000 usec./p

I am not sure, but I would read it that I have to give the unit of time,
i. e., seconds, hours, milliseconds, …, as a value. So I think the
former wording is more correct. Since the unit of time is `usecs`.

 +/option
 +option
 +  poptsync-volume-extra-delay-usec=/opt The unit of time all HW
 +  volume changes are delayed. Negative values are also allowed.
 +  Defaults to 0./p
 +/option
 +
 +  /section

I am still thinking that a „normal“ users does not have a clue on how to
determine to what value these options should be set. So it should be
marked as expert value or something or a hint should be given on how one
can determine what values should be used.

 +
section name=Authors
  pThe PulseAudio Developers lt;@PACKAGE_BUGREPORT@gt;; PulseAudio is 
 available from url href=@PACKAGE_URL@//p
/section


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH 5/5] man: sync_volume parameters to manual page

2010-10-15 Thread oku
From: Jyri Sarha jyri.sa...@nokia.com

Signed-off-by: Jyri Sarha jyri.sa...@nokia.com
Reviewed-by: Tanu Kaskinen tanu.kaski...@digia.com
---
 man/pulse-daemon.conf.5.xml.in |   26 ++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index b5c9e92..ccc2db7 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -437,6 +437,32 @@ USA.
 
   /section
 
+  section name=Default Sync Volume Settings
+
+pThe flat volume feature sets the sink HW volume according to
+highest volume input stream and lowers the lower volume streams
+with SW volume. To make this concurrent use of SW and HW volume to
+work without a glitch their application needs to be
+synchronized. The sink implementation needs to support this
+feature in order to these parameters to take effect./p
+
+option
+  poptenable-sync-volume=/opt Enable sync volume for the sinks that
+  support it. This feature is enabled by default./p
+/option
+option
+  poptsync-volume-safety-margin-usec=/opt The amount usecs the HW
+  volume increases are delayed and HW volume decreases are advanced. 
Defaults
+  to 8000 usec./p
+/option
+option
+  poptsync-volume-extra-delay-usec=/opt The amount usecs the
+  all HW volume changes are delayed. Negative values are also allowed.
+  Defaults to 0./p
+/option
+
+  /section
+
   section name=Authors
 pThe PulseAudio Developers lt;@PACKAGE_BUGREPORT@gt;; PulseAudio is 
available from url href=@PACKAGE_URL@//p
   /section
-- 
1.7.0.4

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 5/5] man: sync_volume parameters to manual page

2010-10-15 Thread David Fries
This is what I came up with, take it or leave it.

  section name=Default Sync Volume Settings

p
With the flat volume feature enabled, the highest volume input
stream sets the HW volume and lower volume streams are reduced in
SW according to the current HW volume setting.  When the volume of
the highest volume input stream changes all other streams SW
volumes must be recalculated for the new HW volume.  The problem
is sink implementations don't support requesting a HW volume
change at a specific sample causing the resulting sound to
momentarily be too loud or soft.  Sink implementations that
support What's the feature?  Querying the HW delay? can be
approximated and further refined with the following options.

option
  poptenable-sync-volume=/opt Enable sync volume for the sinks that
  support it. This feature is enabled by default./p

As above, what determines if a sink supports enable-sync-volume or
not?

/option
option
  poptsync-volume-safety-margin-usec=/opt The unit of time by which
  the HW volume increases are delayed and HW volume decreases are advanced.
  Defaults to 8000 usec./p
I wrote a paragraph on this one before I realized I was confused and
didn't get what it was saying, or what was safe or unsafe about this
value.  So how about,
The amount of time the HW volume increases are delayed and HW volume
decreases are advanced to avoid playing a stream too loud between the
HW volume change is in effect and SW volume samples are played.
/option
option
  poptsync-volume-extra-delay-usec=/opt The unit of time all HW
  volume changes are delayed. Negative values are also allowed.
  Defaults to 0./p
/option
How about sync-volume-hw-delay-usec= ?  Then,
The unit of time all HW volume changes are delayed if the volume
changes are a constant time early. Negative values are also allowed.

On Fri, Oct 15, 2010 at 10:22:16AM +0200, Paul Menzel wrote:
 I am still thinking that a ???normal??? users does not have a clue on how to
 determine to what value these options should be set. So it should be
 marked as expert value or something or a hint should be given on how one
 can determine what values should be used.

A program could measure the hardware mixer latency by playing a square
wave on one stream and adjusting the volume of another stream playing
silence.  Then adjust the parameters so that the wave doesn't vary as
the volume changes.  Too bad sound cards don't have the internal
analog loopback control anymore, now you would need to externally loop
the audio back.

-- 
David Fries da...@fries.net
http://fries.net/~david/ (PGP encryption key available)
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 5/5] man: sync_volume parameters to manual page

2010-10-14 Thread Colin Guthrie
'Twas brillig, and o...@iki.fi at 13/10/10 17:40 did gyre and gimble:
 From: Jyri Sarha jyri.sa...@nokia.com
 
 Signed-off-by: Jyri Sarha jyri.sa...@nokia.com
 Reviewed-by: Tanu Kaskinen tanu.kaski...@digia.com

Please find attached a revised version of this patch... not sure if this
is the best way to apply it for your tree, but meh! :p

Cheers again for this.

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]
From a07a96a2777b9aa0dbd3ade76d56d3e641f20a40 Mon Sep 17 00:00:00 2001
From: Jyri Sarha jyri.sa...@nokia.com
Date: Wed, 13 Oct 2010 19:40:22 +0300
Subject: [PATCH] man: sync_volume parameters to manual page

Some wording teaks by Colin Guthrie

Signed-off-by: Jyri Sarha jyri.sa...@nokia.com
Reviewed-by: Tanu Kaskinen tanu.kaski...@digia.com
---
 man/pulse-daemon.conf.5.xml.in |   26 ++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index b5c9e92..f0a642b 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -437,6 +437,32 @@ USA.
 
   /section
 
+  section name=Default Sync Volume Settings
+
+pThe flat volume feature sets the sink HW volume according to the
+highest volume input stream and reduces the volume any other streams
+(with lower volumes) in SW. To make this concurrent and ensure SW and
+HW volume work together without any glitches, their application needs to
+be synchronized. The sink implementation needs to support this
+feature in order to these parameters to take effect./p
+
+option
+  poptenable-sync-volume=/opt Enable sync volume for the sinks that
+  support it. This feature is enabled by default./p
+/option
+option
+  poptsync-volume-safety-margin-usec=/opt The unit of time by which
+  the HW volume increases are delayed and HW volume decreases are advanced.
+  Defaults to 8000 usec./p
+/option
+option
+  poptsync-volume-extra-delay-usec=/opt The unit of time all HW
+  volume changes are delayed. Negative values are also allowed.
+  Defaults to 0./p
+/option
+
+  /section
+
   section name=Authors
 pThe PulseAudio Developers lt;@PACKAGE_BUGREPORT@gt;; PulseAudio is 
available from url href=@PACKAGE_URL@//p
   /section
-- 
1.7.3.1

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH 5/5] man: sync_volume parameters to manual page

2010-10-13 Thread o...@iki.fi
From: Jyri Sarha jyri.sa...@nokia.com

Signed-off-by: Jyri Sarha jyri.sa...@nokia.com
Reviewed-by: Tanu Kaskinen tanu.kaski...@digia.com
---
 man/pulse-daemon.conf.5.xml.in |   26 ++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index b5c9e92..ccc2db7 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -437,6 +437,32 @@ USA.
 
   /section
 
+  section name=Default Sync Volume Settings
+
+pThe flat volume feature sets the sink HW volume according to
+highest volume input stream and lowers the lower volume streams
+with SW volume. To make this concurrent use of SW and HW volume to
+work without a glitch their application needs to be
+synchronized. The sink implementation needs to support this
+feature in order to these parameters to take effect./p
+
+option
+  poptenable-sync-volume=/opt Enable sync volume for the sinks that
+  support it. This feature is enabled by default./p
+/option
+option
+  poptsync-volume-safety-margin-usec=/opt The amount usecs the HW
+  volume increases are delayed and HW volume decreases are advanced. 
Defaults
+  to 8000 usec./p
+/option
+option
+  poptsync-volume-extra-delay-usec=/opt The amount usecs the
+  all HW volume changes are delayed. Negative values are also allowed.
+  Defaults to 0./p
+/option
+
+  /section
+
   section name=Authors
 pThe PulseAudio Developers lt;@PACKAGE_BUGREPORT@gt;; PulseAudio is 
available from url href=@PACKAGE_URL@//p
   /section
-- 
1.7.0.4

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss