Opened 15 years ago

Closed 14 years ago

Last modified 11 years ago

#1367 closed defect (fixed)

Measure stuck with alsamixer output format

Reported by: alsroot Owned by: walter
Priority: High Milestone:
Component: Measure Version: Unspecified
Severity: Unspecified Keywords:
Cc: sascha_silbe Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

It could be reliable to use more consistent API, something like gst http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-alsamixer.html
to get audio information.

Change History (12)

comment:2 Changed 15 years ago by walter

I'll check it out (probably no sooner than next week.) Is this to address a new bug or the one I tried to hobble together a patch for in v27 (Measure was not launching on non-XO hardware)

comment:3 Changed 14 years ago by sascha_silbe

  • Cc sascha_silbe added

Measure 28 still fails to launch on non-XO hardware (and likely on XOs with recent distributions as well):

Traceback (most recent call last):
  File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-activity", line 21, in <module>
    main.main()
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-packages/sugar/activity/main.py", line 153, in main
    create_activity_instance(activity_constructor, activity_handle)
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-packages/sugar/activity/main.py", line 35, in create_activity_instance
    activity = constructor(handle)
  File "/home/sascha.silbe/Activities/Measure.activity/measure.py", line 77, in __init__
    self.audiograb = AudioGrab(self.wave.new_buffer, self.ji)
  File "/home/sascha.silbe/Activities/Measure.activity/audiograb.py", line 61, in __init__
    self.master  = self.get_master()
  File "/home/sascha.silbe/Activities/Measure.activity/audiograb.py", line 254, in get_master
    return int(p)
ValueError: invalid literal for int() with base 10: ''

Output of amixer:

sascha.silbe@twin:~$ amixer get Master
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 51 [80%] [-13.00dB] [on]
sascha.silbe@twin:~$ 

sugar-toolkit seems to have a wrapper around the ALSA C API, but it's a private API (see sugar/extensions/deviceicon/speaker.py, sugar/src/jarabe/model/sound.py, sugar-toolkit/src/sugar/acme-volume-alsa.c). So gstreamer might still be the better choice.

comment:4 Changed 14 years ago by RafaelOrtiz

  • Milestone changed from Unspecified by Release Team to 0.88

comment:5 Changed 14 years ago by RafaelOrtiz

This bug is also tracked at

http://dev.laptop.org/ticket/9371

Sayamindu has a patch.

comment:6 Changed 14 years ago by sayamindu

I am pushing my changes (mostly XO-1.5 specific, but I'm keeping in mind the need for a generic way to do this) to http://git.sugarlabs.org/projects/measure/repos/XO_1_5_support

The activity now starts up in XO-1.5 (and XO-1 with release 8.2.1 as well), and the sound capture part seems to be working (a few tweaks with the capture levels, etc still need to be done). I will be able to test the sensor mode later (I don't have any useful sensors around me at the moment).

comment:7 Changed 14 years ago by walter

I should come up for air in a few days and I'll try to sort though all of this. It would be nice to come up with a Sugar-wide solution in the form of a set of APIs as there are many activities that would want to take advantage of sensor and mic input on the various XOs and non-OLPC hardware. (Turtle Art being one example.)

comment:8 Changed 14 years ago by walter

  • Milestone changed from 0.88 to 0.90
  • Priority changed from Unspecified by Maintainer to High

comment:9 Changed 14 years ago by walter

This is mostly working (Sascha's switchover to gst) in the soon-to-be released v30. Still some issues with sensor modes on the XOs.

comment:10 Changed 14 years ago by walter

There is still a configuration problem for sensor input on the OLPC hardware, but as long as pulseaudio is installed, it seems to work fine, at least on F13/0.88. Need to test on older Sugars, but I think we are close.

Tested successfully with SoaS v3 on some Macs, a Lenovo, a bunch of Dells, a Classmate, ...

(Kudos to the Posse team in Worcester)

comment:11 Changed 14 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed

Opened #2035 to deal with the XO-specific issues... closing this ticket.

comment:12 Changed 11 years ago by dnarvaez

  • Milestone 0.90 deleted

Milestone 0.90 deleted

Note: See TracTickets for help on using tickets.