diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-01-22 17:07:21 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-01-22 17:07:21 +0100 |
commit | e1617f46e9a1bf073239273b2ffd9db6eecac18b (patch) | |
tree | 5ea889a289ec08aacacd9c3f83506a87440ad359 /include/sound | |
parent | 653a6977f8b9416ba9e756a16ab6be910c6fbb52 (diff) | |
parent | d0c2dd9a742a4f2686daf6893ade116faa4f854a (diff) |
Merge branch 'topic/powermac' into for-next
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/control.h | 20 | ||||
-rw-r--r-- | include/sound/core.h | 14 |
2 files changed, 31 insertions, 3 deletions
diff --git a/include/sound/control.h b/include/sound/control.h index 4721b4bba053..4cf8f7aaa13f 100644 --- a/include/sound/control.h +++ b/include/sound/control.h @@ -171,6 +171,22 @@ int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, */ struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, const unsigned int *tlv); -int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave); - +int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave, + unsigned int flags); +/* optional flags for slave */ +#define SND_CTL_SLAVE_NEED_UPDATE (1 << 0) + +static inline int +snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) +{ + return _snd_ctl_add_slave(master, slave, 0); +} + +static inline int +snd_ctl_add_slave_uncached(struct snd_kcontrol *master, + struct snd_kcontrol *slave) +{ + return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); +} + #endif /* __SOUND_CONTROL_H */ diff --git a/include/sound/core.h b/include/sound/core.h index f632484bc743..25420c3b5513 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -296,8 +296,20 @@ int snd_card_locked(int card); extern int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int cmd); #endif +int snd_card_create(int idx, const char *id, + struct module *module, int extra_size, + struct snd_card **card_ret); + +static inline __deprecated struct snd_card *snd_card_new(int idx, const char *id, - struct module *module, int extra_size); + struct module *module, int extra_size) +{ + struct snd_card *card; + if (snd_card_create(idx, id, module, extra_size, &card) < 0) + return NULL; + return card; +} + int snd_card_disconnect(struct snd_card *card); int snd_card_free(struct snd_card *card); int snd_card_free_when_closed(struct snd_card *card); |