Lines Matching +full:i2s +full:- +full:receiver +full:- +full:1

1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (C) 2014-2020 NXP Semiconductors, All Rights Reserved.
23 #define TFA989X_I2SREG_RCV 2 /* receiver mode */
34 #define TFA989X_SYS_CTRL_I2CR 1 /* I2C reset */
90 SND_SOC_DAPM_SUPPLY("POWER", TFA989X_SYS_CTRL, TFA989X_SYS_CTRL_PWDN, 1, NULL, 0),
95 SND_SOC_DAPM_AIF_IN("AIFINR", "HiFi Playback", 1, SND_SOC_NOPM, 0, 0),
111 gpiod_set_value_cansleep(tfa989x->rcv_gpiod, ucontrol->value.enumerated.item[0]); in tfa989x_put_mode()
116 static const char * const mode_text[] = { "Speaker", "Receiver" };
126 if (tfa989x->rev->rev == TFA9897_REVISION) in tfa989x_probe()
139 .use_pmdown_time = 1,
140 .endianness = 1,
155 return -EINVAL; in tfa989x_find_sample_rate()
162 struct snd_soc_component *component = dai->component; in tfa989x_hw_params()
179 .name = "tfa989x-hifi",
186 .channels_min = 1,
270 * no documentation for it - the public "short datasheets" do not provide
275 * rely on obscure firmware blobs for configuration (so-called "containers").
290 /* Clear CHSA to bypass DSP and take input from I2S 1 left channel */ in tfa989x_dsp_bypass()
314 regulator_disable(tfa989x->vddd_supply); in tfa989x_regulator_disable()
319 struct device *dev = &i2c->dev; in tfa989x_i2c_probe()
329 return -ENODEV; in tfa989x_i2c_probe()
334 return -ENOMEM; in tfa989x_i2c_probe()
336 tfa989x->rev = rev; in tfa989x_i2c_probe()
339 tfa989x->vddd_supply = devm_regulator_get(dev, "vddd"); in tfa989x_i2c_probe()
340 if (IS_ERR(tfa989x->vddd_supply)) in tfa989x_i2c_probe()
341 return dev_err_probe(dev, PTR_ERR(tfa989x->vddd_supply), in tfa989x_i2c_probe()
344 if (tfa989x->rev->rev == TFA9897_REVISION) { in tfa989x_i2c_probe()
345 tfa989x->rcv_gpiod = devm_gpiod_get_optional(dev, "rcv", GPIOD_OUT_LOW); in tfa989x_i2c_probe()
346 if (IS_ERR(tfa989x->rcv_gpiod)) in tfa989x_i2c_probe()
347 return PTR_ERR(tfa989x->rcv_gpiod); in tfa989x_i2c_probe()
354 ret = regulator_enable(tfa989x->vddd_supply); in tfa989x_i2c_probe()
377 if (val != rev->rev) { in tfa989x_i2c_probe()
379 rev->rev, val); in tfa989x_i2c_probe()
380 return -ENODEV; in tfa989x_i2c_probe()
389 ret = rev->init(regmap); in tfa989x_i2c_probe()
403 &tfa989x_dai, 1); in tfa989x_i2c_probe()