Ignore:
Timestamp:
Aug 21, 2021, 3:35:34 AM (4 years ago)
Author:
David Azarewicz
Message:

Merge changes from next branch.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/include/sound/control.h

    r679 r695  
    2525/* internal flag for skipping validations */
    2626#ifdef CONFIG_SND_CTL_VALIDATION
    27 #define SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK        (1 << 27)
     27#define SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK        (1 << 24)
    2828#define snd_ctl_skip_validation(info) \
    2929        ((info)->access & SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK)
     
    3232#define snd_ctl_skip_validation(info)           true
    3333#endif
     34
     35/* kernel only - LED bits */
     36#define SNDRV_CTL_ELEM_ACCESS_LED_SHIFT         25
     37#define SNDRV_CTL_ELEM_ACCESS_LED_MASK          (7<<25) /* kernel three bits - LED group */
     38#define SNDRV_CTL_ELEM_ACCESS_SPK_LED           (1<<25) /* kernel speaker (output) LED flag */
     39#define SNDRV_CTL_ELEM_ACCESS_MIC_LED           (2<<25) /* kernel microphone (input) LED flag */
    3440
    3541enum {
     
    109115};
    110116
     117struct snd_ctl_layer_ops {
     118        struct snd_ctl_layer_ops *next;
     119        const char *module_name;
     120        void (*lregister)(struct snd_card *card);
     121        void (*ldisconnect)(struct snd_card *card);
     122        void (*lnotify)(struct snd_card *card, unsigned int mask, struct snd_kcontrol *kctl, unsigned int ioff);
     123};
     124
    111125#define snd_ctl_file(n) list_entry(n, struct snd_ctl_file, list)
    112126
     
    116130
    117131void snd_ctl_notify(struct snd_card * card, unsigned int mask, struct snd_ctl_elem_id * id);
     132void snd_ctl_notify_one(struct snd_card * card, unsigned int mask, struct snd_kcontrol * kctl, unsigned int ioff);
    118133
    119134struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new * kcontrolnew, void * private_data);
     
    124139int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id);
    125140int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id);
    126 int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id,
    127                         int active);
     141int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, int active);
    128142struct snd_kcontrol *snd_ctl_find_numid(struct snd_card * card, unsigned int numid);
    129143struct snd_kcontrol *snd_ctl_find_id(struct snd_card * card, struct snd_ctl_elem_id *id);
     
    140154#define snd_ctl_unregister_ioctl_compat(fcn)
    141155#endif
     156
     157int snd_ctl_request_layer(const char *module_name);
     158void snd_ctl_register_layer(struct snd_ctl_layer_ops *lops);
     159void snd_ctl_disconnect_layer(struct snd_ctl_layer_ops *lops);
    142160
    143161int snd_ctl_get_preferred_subdevice(struct snd_card *card, int type);
     
    255273
    256274/*
     275 * Control LED trigger layer
     276 */
     277#define SND_CTL_LAYER_MODULE_LED        "snd-ctl-led"
     278
     279#if IS_MODULE(CONFIG_SND_CTL_LED)
     280static inline int snd_ctl_led_request(void) { return snd_ctl_request_layer(SND_CTL_LAYER_MODULE_LED); }
     281#else
     282static inline int snd_ctl_led_request(void) { return 0; }
     283#endif
     284
     285/*
    257286 * Helper functions for jack-detection controls
    258287 */
Note: See TracChangeset for help on using the changeset viewer.