~ubuntu-branches/ubuntu/trusty/alsa-utils/trusty

« back to all changes in this revision

Viewing changes to alsamixer/mixer_widget.c

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich
  • Date: 2013-07-26 10:56:44 UTC
  • mfrom: (1.2.17) (93.1.1 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130726105644-kim9enke2jnozg73
Tags: 1.0.27.1-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Move init script volume settings to new alsactl database:
    + Set sane level for 'Speaker' and 'Headphone', needed for Dell Mini 9
      and Dell E series
    + ute PC Beep on hda cards that support it during initial volume setup
    + Mute *Analog/Digital Control for Creative cards by default
    + Default Digital Input Source to be Digital Mic 1 so that users
      with digital mic will be able to use it out of the box
    + Mute "IEC958 Optical Raw" by default
    + Set sane level for headphone 1 for Dell Studio XPS with 2.6.30
    + Prefer built-in digital mics on newer Dells
    + Unmute 'Line HP Swap' for Dove boards
    + Set reasonable volume levels for VMWare guests using snd.ens1371
  - debian/README.init.cs4236: Include in /usr/share/doc/alsa-utils so that
    users of snd-cs4236 (e.g., ThinkPad 600) can have audible sound
  - debian/patches/unset_pulse_internal.patch: We don't want alsamixer to
    show the pulse mixer by default, since it can be controlled from
    pulseaudio itself
  - Use upstart jobs for storing/restoring card settings
  - Add udev rule to apply UCM profiles for panda and equivalent hardware
  - Add Vcs-Bzr field
* Create a new upstart job for the alsa state daemon, and adjust the
  other upstart jobs accordingly
* Put the daemon file in /var/lib/alsa

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
snd_mixer_selem_id_t *current_selem_id;
51
51
unsigned int current_control_flags;
52
52
 
 
53
bool control_values_changed;
53
54
bool controls_changed;
54
55
 
55
56
enum channel_mask {
59
60
 
60
61
static int elem_callback(snd_mixer_elem_t *elem, unsigned int mask)
61
62
{
62
 
        unsigned int i;
63
 
 
64
 
        if (mask & (SND_CTL_EVENT_MASK_REMOVE |
65
 
                    SND_CTL_EVENT_MASK_INFO |
66
 
                    SND_CTL_EVENT_MASK_VALUE))
 
63
        if (mask == SND_CTL_EVENT_MASK_REMOVE) {
67
64
                controls_changed = TRUE;
 
65
        } else {
 
66
                if (mask & SND_CTL_EVENT_MASK_VALUE)
 
67
                        control_values_changed = TRUE;
68
68
 
69
 
        if (mask & SND_CTL_EVENT_MASK_INFO)
70
 
                for (i = 0; i < controls_count; ++i)
71
 
                        if (controls[i].elem == elem) {
72
 
                                controls[i].flags &= ~IS_ACTIVE;
73
 
                                if (snd_mixer_selem_is_active(controls[i].elem))
74
 
                                        controls[i].flags |= IS_ACTIVE;
75
 
                        }
 
69
                if (mask & SND_CTL_EVENT_MASK_INFO)
 
70
                        controls_changed = TRUE;
 
71
        }
76
72
 
77
73
        return 0;
78
74
}