Lines Matching +full:analog +full:- +full:pass +full:- +full:through

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>
17 #define DRV_NAME "cs5535audio-olpc"
21 * It has an Analog Input mode that is switched into (after disabling the
22 * High Pass Filter) via GPIO. It is supported on B2 and later models.
31 /* update the High Pass Filter (via AC97_AD_TEST2) */ in olpc_analog_input()
35 dev_err(ac97->bus->card->dev, in olpc_analog_input()
36 "setting High Pass Filter - %d\n", err); in olpc_analog_input()
40 /* set Analog Input through GPIO */ 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()
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()
161 strscpy(elem.name, "High Pass Filter Enable", sizeof(elem.name)); in olpc_quirks()
170 /* add the OLPC-specific controls */ in olpc_quirks()
173 ac97->private_data)); in olpc_quirks()