Re: [pulseaudio-discuss] [PATCH 4/4] Fix up according to Coding Style

2011-03-11 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 02/03/11 11:41 did gyre and gimble:
 Only whitespace changes in here

In my tree now :)

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


[pulseaudio-discuss] USB Initial volume bug

2011-03-11 Thread Colin Guthrie
Hi,

On plugging in a set of USB speakers I have PA thinks the volume is 100%
but alsa believes otherwise.

Setting the volume in pavucontrol to 100% (i.e. same as what it is just
now - just move the slider a touch) then the alsa volume is instantly
set to the right values.

Please find attached before and after pacmd list-sinks (edited) and
amixer -c1 dumps.

All on git master as of right now (just pushed 12 new patches)
e2df84497629d61706c455ed2829db0bebb7e5a5.

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/]
Welcome to PulseAudio! Use help for usage information.
index: 1
  name: 
alsa_output.usb-YAMAHA_YAMAHA_YST-M45D_USB_Speaker_Ser_00_em-00-default.analog-stereo
  driver: module-alsa-card.c
  flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
FLAT_VOLUME DYNAMIC_LATENCY
  state: RUNNING
  suspend cause:
  priority: 9549
  volume: 0: 100% 1: 100%
  0: 0.00 dB 1: 0.00 dB
  balance 0.00
  base volume: 100%
   0.00 dB
  volume steps: 65537
  muted: no
  current latency: 28.18 ms
  max request: 3 KiB
  max rewind: 344 KiB
  monitor source: 2
  sample spec: s16le 2ch 44100Hz
  channel map: front-left,front-right
   Stereo
  used by: 1
  linked by: 3
  configured latency: 20.00 ms; range is 0.50 .. 2000.00 ms
  card: 1 
alsa_card.usb-YAMAHA_YAMAHA_YST-M45D_USB_Speaker_Ser_00_em-00-default
  module: 25
  properties:
alsa.resolution_bits = 16
device.api = alsa
device.class = sound
alsa.class = generic
alsa.subclass = generic-mix
alsa.name = USB Audio
alsa.id = USB Audio
alsa.subdevice = 0
alsa.subdevice_name = subdevice #0
alsa.device = 0
alsa.card = 1
alsa.card_name = YAMAHA YST-M45D USB Speaker
alsa.long_card_name = YAMAHA YAMAHA YST-M45D USB Speaker   at 
usb-:00:1d.7-7.1, full speed
alsa.driver_name = snd_usb_audio
device.bus_path = pci-:00:1d.7-usb-0:7.1:1.0
sysfs.path = 
/devices/pci:00/:00:1d.7/usb1/1-7/1-7.1/1-7.1:1.0/sound/card1
udev.id = usb-YAMAHA_YAMAHA_YST-M45D_USB_Speaker_Ser_00_em-00-default
device.bus = usb
device.vendor.id = 0499
device.vendor.name = Yamaha Corp.
device.product.id = 3003
device.product.name = YST-M45D USB Speaker
device.serial = YAMAHA_YAMAHA_YST-M45D_USB_Speaker_Ser_00_em
device.form_factor = speaker
device.string = hw:1
device.buffering.buffer_size = 352800
device.buffering.fragment_size = 176400
device.access_mode = mmap+timer
device.profile.name = analog-stereo
device.profile.description = Analog Stereo
device.description = YST-M45D USB Speaker Analog Stereo
alsa.mixer_name = USB Mixer
alsa.components = USB0499:3003
module-udev-detect.discovered = 1
device.icon_name = audio-speakers-usb



[colin@jimmy ~]$ amixer -c1
Simple mixer control 'Bass',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 12
  Mono: 0 [0%]
Simple mixer control 'Treble',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 0 [0%]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 61
  Mono:
  Front Left: Playback 29 [48%] [-32.00dB] [on]
  Front Right: Playback 29 [48%] [-32.00dB] [on]
[colin@jimmy ~]$


Set the volume in pavcontrol.


[colin@jimmy ~]$ pacmd list-sinks
index: 1
  name: 
alsa_output.usb-YAMAHA_YAMAHA_YST-M45D_USB_Speaker_Ser_00_em-00-default.analog-stereo
  driver: module-alsa-card.c
  flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
FLAT_VOLUME DYNAMIC_LATENCY
  state: RUNNING
  suspend cause:
  priority: 9549
  volume: 0: 100% 1: 100%
  0: 0.00 dB 1: 0.00 dB
  balance 0.00
  base volume: 100%
   0.00 dB
  volume steps: 65537
  muted: no
  current latency: 24.18 ms
  max request: 3 KiB
  max rewind: 344 KiB
  monitor source: 2
  sample spec: s16le 2ch 44100Hz
  channel map: front-left,front-right
   Stereo
  used by: 1
  linked by: 3
  configured latency: 20.00 ms; range is 0.50 .. 2000.00 ms
  card: 1 
alsa_card.usb-YAMAHA_YAMAHA_YST-M45D_USB_Speaker_Ser_00_em-00-default
  module: 25
  properties:
alsa.resolution_bits = 16
device.api = alsa
device.class = sound
alsa.class = generic
alsa.subclass = generic-mix
alsa.name = USB Audio
alsa.id = USB Audio
alsa.subdevice = 0
alsa.subdevice_name = subdevice #0
alsa.device = 0
alsa.card = 1
alsa.card_name = YAMAHA YST-M45D USB Speaker
alsa.long_card_name = YAMAHA YAMAHA YST-M45D USB Speaker   at 
usb-:00:1d.7-7.1, full speed
alsa.driver_name = 

Re: [pulseaudio-discuss] [PATCH 1/7] Fixup #include directives according to Coding Style

2011-03-11 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 09/03/11 09:00 did gyre and gimble:
 Use #include header.h if functionality of header.h is implemented
 and #include header.h if functionality of header.h is used.

Both of the seven are applied now! Thanks :)

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 1/2] alsa-mixer: Implement support for setting element specific upper limits for volume.

2011-03-11 Thread Colin Guthrie
'Twas brillig, and Tanu Kaskinen at 10/03/11 10:09 did gyre and gimble:
 From: Tanu Kaskinen ext-tanu.kaski...@nokia.com
 
 This feature is mainly useful in embedded systems that have built-in speakers.
 In such situations the full audio path is known beforehand, so it's possible 
 to
 know what is the maximum sensible volume, and any higher volume can be
 disabled.
 
 The volume limit is set in path configuration files in the [Element] section,
 using option volume-limit. The value is the desired maximum volume step of
 the volume element.

OK, this is merged now.

Thanks.

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 0/7] Working around bad decibel information

2011-03-11 Thread Colin Guthrie
'Twas brillig, and Tanu Kaskinen at 04/03/11 15:42 did gyre and gimble:
 Here's a pile of patches. The first two implement the concept of decibel
 fixes for alsa devices. A decibel fix is basically a table that maps the
 raw volume steps of a mixer element to manually configured decibel values.
 
 The rest of the patches are random fixes that have piled up while testing
 the decibel fix patches. The pacat memory leak fix hasn't been verified
 that it works (it's just a quick fix to a seemingly obvious, but difficult to
 test bug), otherwise I have tested the fixes.

As you know, I've pulled this from your tree and pushed to git master now.

Many thanks for the tweaks (I did have a quick review, but as it's all
99% new code, I don't really have any specific comments).

Cheers

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] [RFC] Pulseaudio jack sense

2011-03-11 Thread Margarita Olaya
Hi David,

On Fri, Mar 11, 2011 at 1:12 AM, David Henningsson
david.hennings...@canonical.com wrote:
 On 2011-03-10 22:47, Margarita Olaya wrote:

 Hi,

 I have some initial code for jack sense implementation, the approach
 is to listen /dev/input/eventX and pass that data as argument to a new
 module called module-jack-detect where a thread wakes when the jack
 has been inserted.

 Using the current code I'm able to catch jack insertion and removal,
 next step is to signal PA core when the jack has been inserted so this
 calls a hook in the PA UCM module to load the ucm configuration for
 jack.

 Jack sense is something that we all want, so it's great that someone is
 working on it.

 The first tricky thing is to match /dev/input/eventX against the proper card
 - that is, if you have three cards, all with headphone outputs, you must
 know which card your event belongs to. Is this solved in your git tree? I
 had a quick look but couldn't find code for doing that. (You also seem to
 add threads for all eventX, even those not audio related at all, could this
 be improved?)

The card name is passed as argument to the jack module, it checks each
event device to see if it belongs to a sound card otherwise the event
is ignored. The jack module is loaded one time per card so we collect
the data for each card.

 So, I need to send a message to any other interested module but I'm
 sure how implement it, Can a hook be used to signal PA core?

 The second thing is to figure out what we should really do once we have
 detected jack insertion or removal. Adding a hook event and let other
 modules act on that, seems reasonable to me. But we should also add a
 property to the property list (or something similar?) telling the current
 state of the jack - and btw, can this be figured out by reading from
 /dev/input/eventX at startup?


atm the target is to used it along with the UCM module, so once we
have detected jack insertion or removal the UCM will configure the
sound card for it, so  we need a (new?) hook to notify the other
modules.

Regards,
Margarita
 --
 David Henningsson, Canonical Ltd.
 http://launchpad.net/~diwic
 ___
 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