Commit Graph

401 Commits

Author SHA1 Message Date
Mike Blumenkrantz b5e75eb264 formatting
lot of mixed spaces/tabs here made the code unreadable
2017-08-29 15:32:18 -04:00
Stephen 'Okra' Houston ad46d041a8 Gadgets: Don't set gadgets to expand. 2017-08-23 09:55:59 -05:00
Carsten Haitzler 638ffe5853 mixer - fix segv on shutdown
this just got added... dont shutdown actions if no gmixer has been
created.
2017-08-23 17:39:14 +09:00
Mike Blumenkrantz 38a95f0930 do not add del callback for demo mixer gadgets
fixes crash when destroying demo mixer gadgets if no real gadget exists
2017-08-22 18:31:35 -04:00
Stephen 'Okra' Houston 0332eca3c7 Mixer Gadget: Use demo gadget in places where demo gadgets are used. 2017-08-22 11:54:52 -05:00
Marcel Hollerbach 338ce6f11c meson: install emixer correctly 2017-08-22 09:30:36 +02:00
Carsten Haitzler da791a0bf5 e mixer - handle pulse exit/disconnect and not keep e client sinks
we keps e client sinks even if we were dicsonnected from pulse... this
caused fun crashes. fix

@fix
2017-08-20 01:02:03 +09:00
Marcel Hollerbach bf146faf72 mixer: find a better name
if pa does not provide the name via the proplist we can just use the
information from name if the name exists
2017-08-14 17:35:36 +02:00
Carsten Haitzler 5e59869a62 meson build - mixer - simplify for module build setup
it's still complex anyway... :( but a little smaller
2017-08-12 13:40:44 +09:00
Carsten Haitzler 03aeb1d463 fix fallthrough warnings 2017-08-04 12:35:27 +09:00
Mike Blumenkrantz 403819fc21 fix mixer logging to use mixer log domain 2017-07-28 15:44:55 -04:00
Carsten Haitzler b976006bb5 meson build - fix mixer build because the defines are only for existence
we use these defines with

ifdef xxxx

not #if xxxx

and so they should ne undefed when not there and otherwise value when
defined is irrelevant as long as they are defined.

so use set not set10
2017-07-22 17:00:25 +09:00
Mike Blumenkrantz e8dc71cd48 meson. 2017-07-20 17:18:33 -04:00
Mike Blumenkrantz b7e8e886e9 do not generate module.desktop files
the purpose of this is to allow variable substitutions, but no desktop
files do this so it's a waste of build time for no reason
2017-07-14 18:40:50 -04:00
Stephen 'Okra' Houston 9e7b78ffab Gadgets: Make sure to avoid conflicts with functions and globals. 2017-07-12 16:03:06 -05:00
Jean-Philippe Andre b173ed7be6 pulse: do not leak strbuf
See also ac92ff5256.
- eina_strbuf_string_get() returns the internally stored string as
  a const char *, and does not free the strbuf itself
- eina_strbuf_string_steal() returns the internal string as a
  char *, giving ownership to the caller, and frees the strbuf
  itself
- eina_stringshare_add() takes a const char * as input and makes a
  copy of the string

As a consequence, ss_add(sb_string_steal()) leaks the internal
string from the strbuf, while ss_add(sb_string_get()) leaks the
strbuf structure.

A one liner here would require either an eina_slstr based API or
an API in stringshare to take ownership of a given string. Both
would be useful APIs :)
2017-07-11 10:49:03 +09:00
Marcel Hollerbach ac92ff5256 mixer: do not leak a allocated string
this fixes a leak, thank you jp!

@fix
2017-07-10 15:29:27 +02:00
Mike Blumenkrantz 9fc9fce9a7 unset DISPLAY in mixer when performing pulseaudio operations under wl 2017-07-07 16:26:28 -04:00
Stephen 'Okra' Houston 9894726039 Gadgets: Clamp aspect sets to a minimum of width and height minimum of 1.
This fixes T5600
2017-07-06 14:16:00 -05:00
Stephen 'Okra' Houston 202bf770f4 Gadgets: Follow gadget theme naming conventions. 2017-07-06 12:20:53 -05:00
Marcel Hollerbach d2d3d9976b mixer: the name has to be a stringshare 2017-07-04 16:49:54 +02:00
Marcel Hollerbach b32086d402 emixer: use a better name for the sink inputs
it seems applications are using a higher quality name with the property
PA_PROP_APPLICATION_NAME.

ref T5664
2017-07-04 10:12:01 +02:00
Mike Blumenkrantz 62e1027509 try only 1 reconnect to pulse when mixer fails to init
this causes huge lag on failure with no termination case. if it fails
on the reconnect attempt then odds are it's never going to succeed
2017-06-23 17:49:43 -04:00
Stephen 'Okra' Houston 7ff0e585ac Gadgets: Remove the word "Gadget" from the name of gadgets. 2017-06-08 15:27:24 -05:00
Stephen 'Okra' Houston e5c337abfb Mixer/Backlight: Set correct levels on creation.
This fixes T5500
2017-05-19 10:52:18 -05:00
Stephen 'Okra' Houston 9d0bcd9ce2 Gadgets: Send proper theme strings, and set aspect/size correctly. 2017-05-12 15:38:45 -05:00
Stephen 'Okra' Houston 20f94cec74 Bryce/Gadgets: Add backlight, xkbswitch, and mixer gadgets. This should round out the core gadget ports.
All three of these gadgets are ports of the existing modules of the same name and are contained within those directories.  Once the move from shelves -> bryce and gadcon->gadgets is complete, backlight and mixer will likely need to go into the sysinfo gadget.
2017-05-11 17:13:15 -05:00
Marcel Hollerbach 56246e0f08 mixer: be prepared for sinks without any volume
for the case that a sink does not have any volume we would access
NULL[0], which leads to a crash, this fixes that.

fix T5298
2017-04-07 11:53:56 +02:00
Mike Blumenkrantz 235bbc087e rework how pulseaudio is started in mixer backend
calling `pulseaudio` starts a new daemon in the background. this is incorrect
behavior when a daemon already exists, so use --start. tracking the exe of
this process has no effect other than to determine when the fork()ing parent exits,
which is usually immediately

ref 35bb87529f
2017-03-17 13:16:59 -04:00
Mike Blumenkrantz 7191c45de5 slow down mixer's pulse reconnect rate
0.2s is way too fast and results in crazy cpu usage from attempting to
spawn invalid pulseaudio instances in some cases

ref 35bb87529f
2017-03-17 13:16:59 -04:00
Marcel Hollerbach 9745890a37 Revert "Revert "mixer: do not set back the value from emix once the drag is finished""
This reverts commit fba185798c.

There is not even a description why you reverted it. This is a bugfix
that fixed a bug. So talk to me what the issue is, but please stop
reverting commits silently.
2017-02-23 09:08:24 +01:00
Michael Bouchaud cb6ea9f747 e_client_volume: check volume setted after a slider drag 2017-02-23 00:36:17 +01:00
Michaël Bouchaud (yoz) fba185798c Revert "mixer: do not set back the value from emix once the drag is finished"
This reverts commit 8724313b8e.
2017-02-22 22:59:13 +01:00
Michaël Bouchaud (yoz) dbdf411b48 mixer: use VOLSET macro in volume output set 2017-02-22 22:59:13 +01:00
Carsten Haitzler 35bb87529f e mixer module - run pulseaudio if connect fails
so i have a situatioon where pulse is not started automagically. if
e's mixer it set to pulse... then stick to it, run pulse and keep
trying to connect every 0.2 sec until connection works. this makes
sound "just work" tm as it should...

@fix
2017-02-20 22:58:59 +09:00
Michael Bouchaud 9320b0e4ea e_client_volume: forget to remove the separator 2017-02-20 01:48:40 +01:00
Michael Bouchaud 51a5ec4e6a e_client_volume: display a control per stream in the popup volume
This commit enhance the e_client_volume popup. Now you could see which sink
belongs to an e_client and allow you to control it. Sadly I haven't added a
scroller to this popup, I will add it later. Lots of calcs is needed to
display it correctly.
2017-02-20 02:23:16 +01:00
Michael Bouchaud 0a73905895 e_client_volume: add E_EVENT_CLIENT_VOLUME_SINK handler
This commit introduce 3 new handlers to e_client_volume API. These allow to
catch event about sink add, del and update
2017-02-20 02:21:14 +01:00
Michael Bouchaud 939ac0b93d e_client_volume: add sink_name_get API to e_client_volume 2017-02-20 00:46:59 +01:00
Carsten Haitzler 26b68f8c7e e mixer pulse backened -f ix warning about use of uninit var
display really isn't uninitialized due to the logic, but compielr is
kind of right in theory... but less warnings is better so we fix the
real problems more easily. fix.
2017-02-12 16:25:35 +09:00
Derek Foreman 4cf555f36e Replace all timer_reset with timer_loop_reset
Another sed bomb - didn't occur to me first time around to
check for this.  Cleans up more clock_gettime calls.
2017-02-06 15:59:25 -06:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Mike Blumenkrantz 49d9cea5aa center menu-triggered volume popup on same zone as client 2016-11-07 11:26:46 -05:00
Michaël Bouchaud (yoz) be154b60c8 mixer: close the file descriptor on error.
CID: 1365407
2016-11-07 10:32:04 +01:00
Michaël Bouchaud (yoz) 568a676073 mixer: Don't sync volume sink with e_client if they have more than one.
If we got more than one volume sink in e_client and we change the volume
of one of them all sink of this e_client are updated to the same volume.
So don't update e_client volume if we got more than 1 sink.

T4821
2016-11-07 10:26:56 +01:00
Michaël Bouchaud (yoz) ec12cff9f4 mixer: fix a typo spotted by coverity
CID: 1365340
2016-11-07 10:19:28 +01:00
Michaël Bouchaud (yoz) 2a0b4dfbc4 mixer: fix coverity issues 2016-11-02 15:27:38 +01:00
Stefan Schmidt b13486599e mixer: remove unused variables 2016-10-31 11:34:31 +01:00
Stefan Schmidt f606935067 mixer: mark unused function parameter as such 2016-10-31 11:34:02 +01:00
Marcel Hollerbach 8724313b8e mixer: do not set back the value from emix once the drag is finished
emix can still have wrong values from pa, and thus the value will jump
back and later come back to the right pos:

Here a video of what is happening:
http://omicron.homeip.net/filedump/mixer_gadget_bug.ogv

Thank you morluxus!
2016-10-28 11:41:00 +02:00