Lines Matching +full:spk +full:- +full:fmt

1 // SPDX-License-Identifier: GPL-2.0-only
3 * cht-bsw-nau8824.c - ASoc Machine driver for Intel Cherryview-based
10 * Co-author: John Hsu <KCHSU0@nuvoton.com>
11 * This file is based on cht_bsw_rt5672.c and cht-bsw-max98090.c
20 #include <sound/soc-acpi.h>
23 #include "../atom/sst-atom-controls.h"
45 SND_SOC_DAPM_SPK("Ext Spk", NULL),
49 {"Ext Spk", NULL, "SPKOUTL"},
50 {"Ext Spk", NULL, "SPKOUTR"},
69 SOC_DAPM_PIN_SWITCH("Ext Spk"),
82 dev_err(codec_dai->dev, "can't set FS clock %d\n", ret); in cht_aif1_hw_params()
88 dev_err(codec_dai->dev, "can't set FLL: %d\n", ret); in cht_aif1_hw_params()
97 struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card); in cht_codec_init()
98 struct snd_soc_jack *jack = &ctx->jack; in cht_codec_init()
100 struct snd_soc_component *component = codec_dai->component; in cht_codec_init()
111 ret = snd_soc_card_jack_new_pins(runtime->card, "Headset", jack_type, in cht_codec_init()
114 dev_err(runtime->dev, in cht_codec_init()
118 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in cht_codec_init()
119 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in cht_codec_init()
120 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in cht_codec_init()
121 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in cht_codec_init()
135 struct snd_mask *fmt = in cht_codec_fixup() local
140 rate->min = rate->max = 48000; in cht_codec_fixup()
141 channels->min = channels->max = 2; in cht_codec_fixup()
143 /* set SSP2 to 24-bit */ in cht_codec_fixup()
144 snd_mask_none(fmt); in cht_codec_fixup()
150 dev_err(rtd->dev, "can't set codec TDM slot %d\n", ret); in cht_codec_fixup()
159 return snd_pcm_hw_constraint_single(substream->runtime, in cht_aif1_startup()
175 DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai")));
178 DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai")));
181 DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port")));
183 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508824:00",
187 DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform")));
202 .name = "Deep-Buffer Audio Port",
203 .stream_name = "Deep-Buffer Audio",
212 /* SSP2 - Codec */
213 .name = "SSP2-Codec",
228 #define SOF_CARD_NAME "bytcht nau8824" /* card name will be 'sof-bytcht nau8824 */
255 drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); in snd_cht_mc_probe()
257 return -ENOMEM; in snd_cht_mc_probe()
261 snd_soc_card_cht.dev = &pdev->dev; in snd_cht_mc_probe()
262 mach = pdev->dev.platform_data; in snd_cht_mc_probe()
263 platform_name = mach->mach_params.platform; in snd_cht_mc_probe()
270 sof_parent = snd_soc_acpi_sof_parent(&pdev->dev); in snd_cht_mc_probe()
285 pdev->dev.driver->pm = &snd_soc_pm_ops; in snd_cht_mc_probe()
288 ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht); in snd_cht_mc_probe()
290 dev_err(&pdev->dev, in snd_cht_mc_probe()
301 .name = "cht-bsw-nau8824",
312 MODULE_ALIAS("platform:cht-bsw-nau8824");