Lines Matching +full:mic +full:- +full:in +full:- +full:differential

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2015 Maxime Ripard <maxime.ripard@free-electrons.com>
7 * Copyright 2016 Chen-Yu Tsai <wens@csie.org>
253 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_start_playback()
257 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_start_playback()
264 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_stop_playback()
271 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_start_capture()
278 regmap_field_clear_bits(scodec->reg_adc_fifoc, in sun4i_codec_stop_capture()
286 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_trigger()
292 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sun4i_codec_trigger()
301 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sun4i_codec_trigger()
308 return -EINVAL; in sun4i_codec_trigger()
318 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_prepare_capture()
322 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_prepare_capture()
327 regmap_field_update_bits(scodec->reg_adc_fifoc, in sun4i_codec_prepare_capture()
332 * FIXME: Undocumented in the datasheet, but in sun4i_codec_prepare_capture()
336 if (of_device_is_compatible(scodec->dev->of_node, in sun4i_codec_prepare_capture()
337 "allwinner,sun4i-a10-codec") || in sun4i_codec_prepare_capture()
338 of_device_is_compatible(scodec->dev->of_node, in sun4i_codec_prepare_capture()
339 "allwinner,sun7i-a20-codec")) { in sun4i_codec_prepare_capture()
340 regmap_update_bits(scodec->regmap, SUN4I_CODEC_ADC_ACTL, in sun4i_codec_prepare_capture()
345 if (of_device_is_compatible(scodec->dev->of_node, in sun4i_codec_prepare_capture()
346 "allwinner,sun7i-a20-codec")) in sun4i_codec_prepare_capture()
348 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_TUNE, in sun4i_codec_prepare_capture()
359 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_prepare_playback()
363 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_prepare_playback()
367 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_prepare_playback()
371 if (substream->runtime->rate > 32000) in sun4i_codec_prepare_playback()
378 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_prepare_playback()
383 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_prepare_playback()
392 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sun4i_codec_prepare()
466 return -EINVAL; in sun4i_codec_get_hw_rate()
475 regmap_field_update_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
481 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
484 regmap_field_clear_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
488 if (hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS)->min == 32) { in sun4i_codec_hw_params_capture()
489 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
492 regmap_field_clear_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
495 scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in sun4i_codec_hw_params_capture()
497 regmap_field_clear_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
501 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
504 scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; in sun4i_codec_hw_params_capture()
517 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
527 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
532 if (hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS)->min == 32) { in sun4i_codec_hw_params_playback()
533 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
537 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
540 scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in sun4i_codec_hw_params_playback()
542 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
546 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
549 scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; in sun4i_codec_hw_params_playback()
560 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_hw_params()
566 return -EINVAL; in sun4i_codec_hw_params()
568 ret = clk_set_rate(scodec->clk_module, clk_freq); in sun4i_codec_hw_params()
576 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sun4i_codec_hw_params()
601 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_startup()
603 snd_pcm_hw_constraint_list(substream->runtime, 0, in sun4i_codec_startup()
608 * in our TX FIFO in sun4i_codec_startup()
610 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_startup()
613 return clk_prepare_enable(scodec->clk_module); in sun4i_codec_startup()
620 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_shutdown()
622 clk_disable_unprepare(scodec->clk_module); in sun4i_codec_shutdown()
665 static DECLARE_TLV_DB_SCALE(sun4i_codec_pa_volume_scale, -6300, 100, 1);
666 static DECLARE_TLV_DB_SCALE(sun4i_codec_linein_loopback_gain_scale, -150, 150,
668 static DECLARE_TLV_DB_SCALE(sun4i_codec_linein_preamp_gain_scale, -1200, 300,
670 static DECLARE_TLV_DB_SCALE(sun4i_codec_fmin_loopback_gain_scale, -450, 150,
672 static DECLARE_TLV_DB_SCALE(sun4i_codec_micin_loopback_gain_scale, -450, 150,
694 SOC_SINGLE_TLV("Mic Playback Volume", SUN4I_CODEC_DAC_ACTL,
718 SOC_SINGLE_TLV("Mic Playback Volume", SUN4I_CODEC_DAC_ACTL,
799 /* Mic Pre-Amplifiers */
800 SND_SOC_DAPM_PGA("MIC1 Pre-Amplifier", SUN4I_CODEC_ADC_ACTL,
802 SND_SOC_DAPM_PGA("MIC2 Pre-Amplifier", SUN4I_CODEC_ADC_ACTL,
839 { "Right Mixer", "Mic1 Playback Switch", "MIC1 Pre-Amplifier" },
840 { "Right Mixer", "Mic2 Playback Switch", "MIC2 Pre-Amplifier" },
847 { "Left Mixer", "Mic1 Playback Switch", "MIC1 Pre-Amplifier" },
848 { "Left Mixer", "Mic2 Playback Switch", "MIC2 Pre-Amplifier" },
862 { "Left ADC", NULL, "MIC1 Pre-Amplifier" },
863 { "Right ADC", NULL, "MIC1 Pre-Amplifier" },
864 { "MIC1 Pre-Amplifier", NULL, "Mic1"},
868 { "Left ADC", NULL, "MIC2 Pre-Amplifier" },
869 { "Right ADC", NULL, "MIC2 Pre-Amplifier" },
870 { "MIC2 Pre-Amplifier", NULL, "Mic2"},
910 SOC_DAPM_DOUBLE("Line In Playback Switch",
934 SOC_DAPM_DOUBLE("Line In Capture Switch",
981 "Stereo", "Mono Differential",
996 static const DECLARE_TLV_DB_SCALE(sun6i_codec_dvol_scale, -7308, 116, 0);
997 static const DECLARE_TLV_DB_SCALE(sun6i_codec_hp_vol_scale, -6300, 100, 1);
999 -450, 150, 0);
1002 2, 31, TLV_DB_SCALE_ITEM(-4350, 150, 0),
1029 /* Mixer pre-gains */
1030 SOC_SINGLE_TLV("Line In Playback Volume",
1065 /* Mic input path */
1073 /* Line In */
1145 { "Left Mixer", "Line In Playback Switch", "LINEIN" },
1152 { "Right Mixer", "Line In Playback Switch", "LINEIN" },
1159 { "Left ADC Mixer", "Line In Capture Switch", "LINEIN" },
1166 { "Right ADC Mixer", "Line In Capture Switch", "LINEIN" },
1182 { "Line Out Source Playback Route", "Mono Differential", "Left Mixer" },
1183 { "Line Out Source Playback Route", "Mono Differential", "Right Mixer" },
1233 .name = "sun4i-codec",
1249 snd_soc_dai_init_dma_data(dai, &scodec->playback_dma_data, in sun4i_codec_dai_probe()
1250 &scodec->capture_dma_data); in sun4i_codec_dai_probe()
1260 .name = "sun4i-codec-cpu-dai",
1290 link->cpus = &dlc[0]; in sun4i_codec_create_link()
1291 link->codecs = &dlc[1]; in sun4i_codec_create_link()
1292 link->platforms = &dlc[2]; in sun4i_codec_create_link()
1294 link->num_cpus = 1; in sun4i_codec_create_link()
1295 link->num_codecs = 1; in sun4i_codec_create_link()
1296 link->num_platforms = 1; in sun4i_codec_create_link()
1298 link->name = "cdc"; in sun4i_codec_create_link()
1299 link->stream_name = "CDC PCM"; in sun4i_codec_create_link()
1300 link->codecs->dai_name = "Codec"; in sun4i_codec_create_link()
1301 link->cpus->dai_name = dev_name(dev); in sun4i_codec_create_link()
1302 link->codecs->name = dev_name(dev); in sun4i_codec_create_link()
1303 link->platforms->name = dev_name(dev); in sun4i_codec_create_link()
1304 link->dai_fmt = SND_SOC_DAIFMT_I2S; in sun4i_codec_create_link()
1314 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(w->dapm->card); in sun4i_codec_spk_event()
1316 gpiod_set_value_cansleep(scodec->gpio_pa, in sun4i_codec_spk_event()
1346 return ERR_PTR(-ENOMEM); in sun4i_codec_create_card()
1348 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun4i_codec_create_card()
1349 if (!card->dai_link) in sun4i_codec_create_card()
1350 return ERR_PTR(-ENOMEM); in sun4i_codec_create_card()
1352 card->dev = dev; in sun4i_codec_create_card()
1353 card->owner = THIS_MODULE; in sun4i_codec_create_card()
1354 card->name = "sun4i-codec"; in sun4i_codec_create_card()
1355 card->dapm_widgets = sun4i_codec_card_dapm_widgets; in sun4i_codec_create_card()
1356 card->num_dapm_widgets = ARRAY_SIZE(sun4i_codec_card_dapm_widgets); in sun4i_codec_create_card()
1357 card->dapm_routes = sun4i_codec_card_dapm_routes; in sun4i_codec_create_card()
1358 card->num_dapm_routes = ARRAY_SIZE(sun4i_codec_card_dapm_routes); in sun4i_codec_create_card()
1365 SND_SOC_DAPM_LINE("Line In", NULL),
1367 SND_SOC_DAPM_MIC("Headset Mic", NULL),
1368 SND_SOC_DAPM_MIC("Mic", NULL),
1379 return ERR_PTR(-ENOMEM); in sun6i_codec_create_card()
1381 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun6i_codec_create_card()
1382 if (!card->dai_link) in sun6i_codec_create_card()
1383 return ERR_PTR(-ENOMEM); in sun6i_codec_create_card()
1385 card->dev = dev; in sun6i_codec_create_card()
1386 card->owner = THIS_MODULE; in sun6i_codec_create_card()
1387 card->name = "A31 Audio Codec"; in sun6i_codec_create_card()
1388 card->dapm_widgets = sun6i_codec_card_dapm_widgets; in sun6i_codec_create_card()
1389 card->num_dapm_widgets = ARRAY_SIZE(sun6i_codec_card_dapm_widgets); in sun6i_codec_create_card()
1390 card->fully_routed = true; in sun6i_codec_create_card()
1392 ret = snd_soc_of_parse_audio_routing(card, "allwinner,audio-routing"); in sun6i_codec_create_card()
1394 dev_warn(dev, "failed to parse audio-routing: %d\n", ret); in sun6i_codec_create_card()
1425 return ERR_PTR(-ENOMEM); in sun8i_a23_codec_create_card()
1427 aux_dev.dlc.of_node = of_parse_phandle(dev->of_node, in sun8i_a23_codec_create_card()
1428 "allwinner,codec-analog-controls", in sun8i_a23_codec_create_card()
1432 return ERR_PTR(-EINVAL); in sun8i_a23_codec_create_card()
1435 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun8i_a23_codec_create_card()
1436 if (!card->dai_link) in sun8i_a23_codec_create_card()
1437 return ERR_PTR(-ENOMEM); in sun8i_a23_codec_create_card()
1439 card->dev = dev; in sun8i_a23_codec_create_card()
1440 card->owner = THIS_MODULE; in sun8i_a23_codec_create_card()
1441 card->name = "A23 Audio Codec"; in sun8i_a23_codec_create_card()
1442 card->dapm_widgets = sun6i_codec_card_dapm_widgets; in sun8i_a23_codec_create_card()
1443 card->num_dapm_widgets = ARRAY_SIZE(sun6i_codec_card_dapm_widgets); in sun8i_a23_codec_create_card()
1444 card->dapm_routes = sun8i_codec_card_routes; in sun8i_a23_codec_create_card()
1445 card->num_dapm_routes = ARRAY_SIZE(sun8i_codec_card_routes); in sun8i_a23_codec_create_card()
1446 card->aux_dev = &aux_dev; in sun8i_a23_codec_create_card()
1447 card->num_aux_devs = 1; in sun8i_a23_codec_create_card()
1448 card->fully_routed = true; in sun8i_a23_codec_create_card()
1450 ret = snd_soc_of_parse_audio_routing(card, "allwinner,audio-routing"); in sun8i_a23_codec_create_card()
1452 dev_warn(dev, "failed to parse audio-routing: %d\n", ret); in sun8i_a23_codec_create_card()
1464 return ERR_PTR(-ENOMEM); in sun8i_h3_codec_create_card()
1466 aux_dev.dlc.of_node = of_parse_phandle(dev->of_node, in sun8i_h3_codec_create_card()
1467 "allwinner,codec-analog-controls", in sun8i_h3_codec_create_card()
1471 return ERR_PTR(-EINVAL); in sun8i_h3_codec_create_card()
1474 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun8i_h3_codec_create_card()
1475 if (!card->dai_link) in sun8i_h3_codec_create_card()
1476 return ERR_PTR(-ENOMEM); in sun8i_h3_codec_create_card()
1478 card->dev = dev; in sun8i_h3_codec_create_card()
1479 card->owner = THIS_MODULE; in sun8i_h3_codec_create_card()
1480 card->name = "H3 Audio Codec"; in sun8i_h3_codec_create_card()
1481 card->dapm_widgets = sun6i_codec_card_dapm_widgets; in sun8i_h3_codec_create_card()
1482 card->num_dapm_widgets = ARRAY_SIZE(sun6i_codec_card_dapm_widgets); in sun8i_h3_codec_create_card()
1483 card->dapm_routes = sun8i_codec_card_routes; in sun8i_h3_codec_create_card()
1484 card->num_dapm_routes = ARRAY_SIZE(sun8i_codec_card_routes); in sun8i_h3_codec_create_card()
1485 card->aux_dev = &aux_dev; in sun8i_h3_codec_create_card()
1486 card->num_aux_devs = 1; in sun8i_h3_codec_create_card()
1487 card->fully_routed = true; in sun8i_h3_codec_create_card()
1489 ret = snd_soc_of_parse_audio_routing(card, "allwinner,audio-routing"); in sun8i_h3_codec_create_card()
1491 dev_warn(dev, "failed to parse audio-routing: %d\n", ret); in sun8i_h3_codec_create_card()
1503 return ERR_PTR(-ENOMEM); in sun8i_v3s_codec_create_card()
1505 aux_dev.dlc.of_node = of_parse_phandle(dev->of_node, in sun8i_v3s_codec_create_card()
1506 "allwinner,codec-analog-controls", in sun8i_v3s_codec_create_card()
1510 return ERR_PTR(-EINVAL); in sun8i_v3s_codec_create_card()
1513 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun8i_v3s_codec_create_card()
1514 if (!card->dai_link) in sun8i_v3s_codec_create_card()
1515 return ERR_PTR(-ENOMEM); in sun8i_v3s_codec_create_card()
1517 card->dev = dev; in sun8i_v3s_codec_create_card()
1518 card->owner = THIS_MODULE; in sun8i_v3s_codec_create_card()
1519 card->name = "V3s Audio Codec"; in sun8i_v3s_codec_create_card()
1520 card->dapm_widgets = sun6i_codec_card_dapm_widgets; in sun8i_v3s_codec_create_card()
1521 card->num_dapm_widgets = ARRAY_SIZE(sun6i_codec_card_dapm_widgets); in sun8i_v3s_codec_create_card()
1522 card->dapm_routes = sun8i_codec_card_routes; in sun8i_v3s_codec_create_card()
1523 card->num_dapm_routes = ARRAY_SIZE(sun8i_codec_card_routes); in sun8i_v3s_codec_create_card()
1524 card->aux_dev = &aux_dev; in sun8i_v3s_codec_create_card()
1525 card->num_aux_devs = 1; in sun8i_v3s_codec_create_card()
1526 card->fully_routed = true; in sun8i_v3s_codec_create_card()
1528 ret = snd_soc_of_parse_audio_routing(card, "allwinner,audio-routing"); in sun8i_v3s_codec_create_card()
1530 dev_warn(dev, "failed to parse audio-routing: %d\n", ret); in sun8i_v3s_codec_create_card()
1656 .compatible = "allwinner,sun4i-a10-codec",
1660 .compatible = "allwinner,sun6i-a31-codec",
1664 .compatible = "allwinner,sun7i-a20-codec",
1668 .compatible = "allwinner,sun8i-a23-codec",
1672 .compatible = "allwinner,sun8i-h3-codec",
1676 .compatible = "allwinner,sun8i-v3s-codec",
1692 scodec = devm_kzalloc(&pdev->dev, sizeof(*scodec), GFP_KERNEL); in sun4i_codec_probe()
1694 return -ENOMEM; in sun4i_codec_probe()
1696 scodec->dev = &pdev->dev; in sun4i_codec_probe()
1702 quirks = of_device_get_match_data(&pdev->dev); in sun4i_codec_probe()
1704 dev_err(&pdev->dev, "Failed to determine the quirks to use\n"); in sun4i_codec_probe()
1705 return -ENODEV; in sun4i_codec_probe()
1708 scodec->regmap = devm_regmap_init_mmio(&pdev->dev, base, in sun4i_codec_probe()
1709 quirks->regmap_config); in sun4i_codec_probe()
1710 if (IS_ERR(scodec->regmap)) { in sun4i_codec_probe()
1711 dev_err(&pdev->dev, "Failed to create our regmap\n"); in sun4i_codec_probe()
1712 return PTR_ERR(scodec->regmap); in sun4i_codec_probe()
1716 scodec->clk_apb = devm_clk_get(&pdev->dev, "apb"); in sun4i_codec_probe()
1717 if (IS_ERR(scodec->clk_apb)) { in sun4i_codec_probe()
1718 dev_err(&pdev->dev, "Failed to get the APB clock\n"); in sun4i_codec_probe()
1719 return PTR_ERR(scodec->clk_apb); in sun4i_codec_probe()
1722 scodec->clk_module = devm_clk_get(&pdev->dev, "codec"); in sun4i_codec_probe()
1723 if (IS_ERR(scodec->clk_module)) { in sun4i_codec_probe()
1724 dev_err(&pdev->dev, "Failed to get the module clock\n"); in sun4i_codec_probe()
1725 return PTR_ERR(scodec->clk_module); in sun4i_codec_probe()
1728 if (quirks->has_reset) { in sun4i_codec_probe()
1729 scodec->rst = devm_reset_control_get_exclusive(&pdev->dev, in sun4i_codec_probe()
1731 if (IS_ERR(scodec->rst)) { in sun4i_codec_probe()
1732 dev_err(&pdev->dev, "Failed to get reset control\n"); in sun4i_codec_probe()
1733 return PTR_ERR(scodec->rst); in sun4i_codec_probe()
1737 scodec->gpio_pa = devm_gpiod_get_optional(&pdev->dev, "allwinner,pa", in sun4i_codec_probe()
1739 if (IS_ERR(scodec->gpio_pa)) { in sun4i_codec_probe()
1740 ret = PTR_ERR(scodec->gpio_pa); in sun4i_codec_probe()
1741 dev_err_probe(&pdev->dev, ret, "Failed to get pa gpio\n"); in sun4i_codec_probe()
1746 scodec->reg_adc_fifoc = devm_regmap_field_alloc(&pdev->dev, in sun4i_codec_probe()
1747 scodec->regmap, in sun4i_codec_probe()
1748 quirks->reg_adc_fifoc); in sun4i_codec_probe()
1749 if (IS_ERR(scodec->reg_adc_fifoc)) { in sun4i_codec_probe()
1750 ret = PTR_ERR(scodec->reg_adc_fifoc); in sun4i_codec_probe()
1751 dev_err(&pdev->dev, "Failed to create regmap fields: %d\n", in sun4i_codec_probe()
1757 if (clk_prepare_enable(scodec->clk_apb)) { in sun4i_codec_probe()
1758 dev_err(&pdev->dev, "Failed to enable the APB clock\n"); in sun4i_codec_probe()
1759 return -EINVAL; in sun4i_codec_probe()
1763 if (scodec->rst) { in sun4i_codec_probe()
1764 ret = reset_control_deassert(scodec->rst); in sun4i_codec_probe()
1766 dev_err(&pdev->dev, in sun4i_codec_probe()
1773 scodec->playback_dma_data.addr = res->start + quirks->reg_dac_txdata; in sun4i_codec_probe()
1774 scodec->playback_dma_data.maxburst = 8; in sun4i_codec_probe()
1775 scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; in sun4i_codec_probe()
1778 scodec->capture_dma_data.addr = res->start + quirks->reg_adc_rxdata; in sun4i_codec_probe()
1779 scodec->capture_dma_data.maxburst = 8; in sun4i_codec_probe()
1780 scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; in sun4i_codec_probe()
1782 ret = devm_snd_soc_register_component(&pdev->dev, quirks->codec, in sun4i_codec_probe()
1785 dev_err(&pdev->dev, "Failed to register our codec\n"); in sun4i_codec_probe()
1789 ret = devm_snd_soc_register_component(&pdev->dev, in sun4i_codec_probe()
1793 dev_err(&pdev->dev, "Failed to register our DAI\n"); in sun4i_codec_probe()
1797 ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); in sun4i_codec_probe()
1799 dev_err(&pdev->dev, "Failed to register against DMAEngine\n"); in sun4i_codec_probe()
1803 card = quirks->create_card(&pdev->dev); in sun4i_codec_probe()
1806 dev_err(&pdev->dev, "Failed to create our card\n"); in sun4i_codec_probe()
1814 dev_err_probe(&pdev->dev, ret, "Failed to register our card\n"); in sun4i_codec_probe()
1821 if (scodec->rst) in sun4i_codec_probe()
1822 reset_control_assert(scodec->rst); in sun4i_codec_probe()
1824 clk_disable_unprepare(scodec->clk_apb); in sun4i_codec_probe()
1834 if (scodec->rst) in sun4i_codec_remove()
1835 reset_control_assert(scodec->rst); in sun4i_codec_remove()
1836 clk_disable_unprepare(scodec->clk_apb); in sun4i_codec_remove()
1841 .name = "sun4i-codec",
1852 MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>");
1853 MODULE_AUTHOR("Chen-Yu Tsai <wens@csie.org>");