Lines Matching +full:enable +full:- +full:bias +full:- +full:control

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * OLPC XO-1 additional sound features
6 * Copyright © 2007-2008 Andres Salomon <dilinger@debian.org>
10 #include <sound/control.h>
17 #define DRV_NAME "cs5535audio-olpc"
35 dev_err(ac97->bus->card->dev, in olpc_analog_input()
36 "setting High Pass Filter - %d\n", err); in olpc_analog_input()
45 * OLPC XO-1's V_REFOUT is a mic bias enable.
58 dev_err(ac97->bus->card->dev, "setting MIC Bias - %d\n", err); in olpc_mic_bias()
64 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; in olpc_dc_info()
65 uinfo->count = 1; in olpc_dc_info()
66 uinfo->value.integer.min = 0; in olpc_dc_info()
67 uinfo->value.integer.max = 1; in olpc_dc_info()
73 v->value.integer.value[0] = gpio_get_value(OLPC_GPIO_MIC_AC); in olpc_dc_get()
81 olpc_analog_input(cs5535au->ac97, v->value.integer.value[0]); in olpc_dc_put()
88 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; in olpc_mic_info()
89 uinfo->count = 1; in olpc_mic_info()
90 uinfo->value.integer.min = 0; in olpc_mic_info()
91 uinfo->value.integer.max = 1; in olpc_mic_info()
98 struct snd_ac97 *ac97 = cs5535au->ac97; in olpc_mic_get()
102 v->value.integer.value[0] = i ? 0 : 1; in olpc_mic_get()
110 olpc_mic_bias(cs5535au->ac97, v->value.integer.value[0]); in olpc_mic_put()
117 .name = "DC Mode Enable",
125 .name = "MIC Bias Enable",
141 ac97->scaps |= AC97_SCAP_INV_EAPD; in olpc_prequirks()
153 dev_err(card->dev, "unable to allocate MIC GPIO\n"); in olpc_quirks()
154 return -EIO; in olpc_quirks()
158 /* drop the original AD1888 HPF control */ in olpc_quirks()
161 strscpy(elem.name, "High Pass Filter Enable", sizeof(elem.name)); in olpc_quirks()
164 /* drop the original V_REFOUT control */ in olpc_quirks()
167 strscpy(elem.name, "V_REFOUT Enable", sizeof(elem.name)); in olpc_quirks()
170 /* add the OLPC-specific controls */ in olpc_quirks()
173 ac97->private_data)); in olpc_quirks()