Lines Matching +full:off +full:- +full:codec
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * ALSA Soc PCM3008 codec support
8 * Based on AC97 Soc codec, original copyright follow:
36 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
37 struct pcm3008 *pcm = component->dev->platform_data;
39 gpiod_set_value_cansleep(pcm->pdda_pin,
49 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
50 struct pcm3008 *pcm = component->dev->platform_data;
52 gpiod_set_value_cansleep(pcm->pdad_pin,
85 .name = "pcm3008-hifi",
114 struct device *dev = &pdev->dev;
119 return -ENOMEM;
122 /* DEM1 DEM0 DE-EMPHASIS_MODE
123 * Low Low De-emphasis 44.1 kHz ON
124 * Low High De-emphasis OFF
125 * High Low De-emphasis 48 kHz ON
126 * High High De-emphasis 32 kHz ON
129 /* Configure DEM0 GPIO (turning OFF DAC De-emphasis). */
130 pcm->dem0_pin = devm_gpiod_get(dev, "dem0", GPIOD_OUT_HIGH);
131 if (IS_ERR(pcm->dem0_pin))
132 return PTR_ERR(pcm->dem0_pin);
134 /* Configure DEM1 GPIO (turning OFF DAC De-emphasis). */
135 pcm->dem1_pin = devm_gpiod_get(dev, "dem1", GPIOD_OUT_LOW);
136 if (IS_ERR(pcm->dem1_pin))
137 return PTR_ERR(pcm->dem1_pin);
140 pcm->pdad_pin = devm_gpiod_get(dev, "pdad", GPIOD_OUT_LOW);
141 if (IS_ERR(pcm->pdad_pin))
142 return PTR_ERR(pcm->pdad_pin);
145 pcm->pdda_pin = devm_gpiod_get(dev, "pdda", GPIOD_OUT_LOW);
146 if (IS_ERR(pcm->pdda_pin))
147 return PTR_ERR(pcm->pdda_pin);
153 MODULE_ALIAS("platform:pcm3008-codec");
158 .name = "pcm3008-codec",