Lines Matching +full:bt +full:- +full:sco

1 // SPDX-License-Identifier: GPL-2.0
3 * mt2701-cs42448.c -- MT2701 CS42448 ALSA SoC machine driver
16 #include "mt2701-afe-common.h"
40 ucontrol->value.integer.value[0] = priv->i2s1_in_mux; in mt2701_cs42448_i2sin1_mux_get()
50 if (ucontrol->value.integer.value[0] == priv->i2s1_in_mux) in mt2701_cs42448_i2sin1_mux_set()
53 switch (ucontrol->value.integer.value[0]) { in mt2701_cs42448_i2sin1_mux_set()
55 gpiod_set_value(priv->i2s1_in_mux_sel_1, 0); in mt2701_cs42448_i2sin1_mux_set()
56 gpiod_set_value(priv->i2s1_in_mux_sel_2, 0); in mt2701_cs42448_i2sin1_mux_set()
59 gpiod_set_value(priv->i2s1_in_mux_sel_1, 1); in mt2701_cs42448_i2sin1_mux_set()
60 gpiod_set_value(priv->i2s1_in_mux_sel_2, 0); in mt2701_cs42448_i2sin1_mux_set()
63 gpiod_set_value(priv->i2s1_in_mux_sel_1, 0); in mt2701_cs42448_i2sin1_mux_set()
64 gpiod_set_value(priv->i2s1_in_mux_sel_2, 1); in mt2701_cs42448_i2sin1_mux_set()
67 gpiod_set_value(priv->i2s1_in_mux_sel_1, 1); in mt2701_cs42448_i2sin1_mux_set()
68 gpiod_set_value(priv->i2s1_in_mux_sel_2, 1); in mt2701_cs42448_i2sin1_mux_set()
71 dev_warn(card->dev, "%s invalid setting\n", __func__); in mt2701_cs42448_i2sin1_mux_set()
74 priv->i2s1_in_mux = ucontrol->value.integer.value[0]; in mt2701_cs42448_i2sin1_mux_set()
110 err = snd_pcm_hw_constraint_list(substream->runtime, 0, in mt2701_cs42448_fe_ops_startup()
114 dev_err(substream->pcm->card->dev, in mt2701_cs42448_fe_ops_startup()
211 DAILINK_COMP_ARRAY(COMP_CPU("MRG BT")),
212 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "bt-sco-pcm-wb")),
218 .name = "mt2701-cs42448-multi-ch-out",
219 .stream_name = "mt2701-cs42448-multi-ch-out",
228 .name = "mt2701-cs42448-pcm0",
229 .stream_name = "mt2701-cs42448-pcm0-data-UL",
238 .name = "mt2701-cs42448-pcm1-data-UL",
239 .stream_name = "mt2701-cs42448-pcm1-data-UL",
248 .name = "mt2701-cs42448-pcm-BT-out",
249 .stream_name = "mt2701-cs42448-pcm-BT",
257 .name = "mt2701-cs42448-pcm-BT-in",
258 .stream_name = "mt2701-cs42448-pcm-BT",
267 .name = "mt2701-cs42448-I2S0",
277 .name = "mt2701-cs42448-I2S1",
287 .name = "mt2701-cs42448-I2S2",
297 .name = "mt2701-cs42448-I2S3",
307 .name = "mt2701-cs42448-MRG-BT",
316 .name = "mt2701-cs42448",
332 struct device *dev = &pdev->dev; in mt2701_cs42448_machine_probe()
339 return -ENOMEM; in mt2701_cs42448_machine_probe()
341 platform_node = of_parse_phandle(pdev->dev.of_node, in mt2701_cs42448_machine_probe()
345 return -EINVAL; in mt2701_cs42448_machine_probe()
348 if (dai_link->platforms->name) in mt2701_cs42448_machine_probe()
350 dai_link->platforms->of_node = platform_node; in mt2701_cs42448_machine_probe()
353 card->dev = dev; in mt2701_cs42448_machine_probe()
355 codec_node = of_parse_phandle(pdev->dev.of_node, in mt2701_cs42448_machine_probe()
356 "mediatek,audio-codec", 0); in mt2701_cs42448_machine_probe()
359 "Property 'audio-codec' missing or invalid\n"); in mt2701_cs42448_machine_probe()
360 return -EINVAL; in mt2701_cs42448_machine_probe()
363 if (dai_link->codecs->name) in mt2701_cs42448_machine_probe()
365 dai_link->codecs->of_node = codec_node; in mt2701_cs42448_machine_probe()
368 codec_node_bt_mrg = of_parse_phandle(pdev->dev.of_node, in mt2701_cs42448_machine_probe()
369 "mediatek,audio-codec-bt-mrg", 0); in mt2701_cs42448_machine_probe()
372 "Property 'audio-codec-bt-mrg' missing or invalid\n"); in mt2701_cs42448_machine_probe()
373 return -EINVAL; in mt2701_cs42448_machine_probe()
375 mt2701_cs42448_dai_links[DAI_LINK_BE_MRG_BT].codecs->of_node in mt2701_cs42448_machine_probe()
378 ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); in mt2701_cs42448_machine_probe()
380 dev_err(dev, "failed to parse audio-routing: %d\n", ret); in mt2701_cs42448_machine_probe()
384 priv->i2s1_in_mux_sel_1 = devm_gpiod_get_optional(dev, "i2s1-in-sel-gpio1", in mt2701_cs42448_machine_probe()
386 if (IS_ERR(priv->i2s1_in_mux_sel_1)) in mt2701_cs42448_machine_probe()
387 return dev_err_probe(dev, PTR_ERR(priv->i2s1_in_mux_sel_1), in mt2701_cs42448_machine_probe()
390 priv->i2s1_in_mux_sel_2 = devm_gpiod_get_optional(dev, "i2s1-in-sel-gpio2", in mt2701_cs42448_machine_probe()
392 if (IS_ERR(priv->i2s1_in_mux_sel_2)) in mt2701_cs42448_machine_probe()
393 return dev_err_probe(dev, PTR_ERR(priv->i2s1_in_mux_sel_2), in mt2701_cs42448_machine_probe()
408 {.compatible = "mediatek,mt2701-cs42448-machine",},
416 .name = "mt2701-cs42448",