diff options
Diffstat (limited to 'sound/core/control.c')
-rw-r--r-- | sound/core/control.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 1f1ab9c1b6..4c3aa8e103 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Routines for driver control interface | 2 | * Routines for driver control interface |
3 | * Copyright (c) by Jaroslav Kysela <perex@suse.cz> | 3 | * Copyright (c) by Jaroslav Kysela <perex@perex.cz> |
4 | * | 4 | * |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
@@ -716,8 +716,6 @@ int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control) | |||
716 | return result; | 716 | return result; |
717 | } | 717 | } |
718 | 718 | ||
719 | EXPORT_SYMBOL(snd_ctl_elem_read); | ||
720 | |||
721 | static int snd_ctl_elem_read_user(struct snd_card *card, | 719 | static int snd_ctl_elem_read_user(struct snd_card *card, |
722 | struct snd_ctl_elem_value __user *_control) | 720 | struct snd_ctl_elem_value __user *_control) |
723 | { | 721 | { |
@@ -781,8 +779,6 @@ int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file, | |||
781 | return result; | 779 | return result; |
782 | } | 780 | } |
783 | 781 | ||
784 | EXPORT_SYMBOL(snd_ctl_elem_write); | ||
785 | |||
786 | static int snd_ctl_elem_write_user(struct snd_ctl_file *file, | 782 | static int snd_ctl_elem_write_user(struct snd_ctl_file *file, |
787 | struct snd_ctl_elem_value __user *_control) | 783 | struct snd_ctl_elem_value __user *_control) |
788 | { | 784 | { |
@@ -1486,3 +1482,30 @@ int snd_ctl_create(struct snd_card *card) | |||
1486 | snd_assert(card != NULL, return -ENXIO); | 1482 | snd_assert(card != NULL, return -ENXIO); |
1487 | return snd_device_new(card, SNDRV_DEV_CONTROL, card, &ops); | 1483 | return snd_device_new(card, SNDRV_DEV_CONTROL, card, &ops); |
1488 | } | 1484 | } |
1485 | |||
1486 | /* | ||
1487 | * Frequently used control callbacks | ||
1488 | */ | ||
1489 | int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, | ||
1490 | struct snd_ctl_elem_info *uinfo) | ||
1491 | { | ||
1492 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1493 | uinfo->count = 1; | ||
1494 | uinfo->value.integer.min = 0; | ||
1495 | uinfo->value.integer.max = 1; | ||
1496 | return 0; | ||
1497 | } | ||
1498 | |||
1499 | EXPORT_SYMBOL(snd_ctl_boolean_mono_info); | ||
1500 | |||
1501 | int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, | ||
1502 | struct snd_ctl_elem_info *uinfo) | ||
1503 | { | ||
1504 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1505 | uinfo->count = 2; | ||
1506 | uinfo->value.integer.min = 0; | ||
1507 | uinfo->value.integer.max = 1; | ||
1508 | return 0; | ||
1509 | } | ||
1510 | |||
1511 | EXPORT_SYMBOL(snd_ctl_boolean_stereo_info); | ||