Lines Matching +full:fixed +full:- +full:links

1 // SPDX-License-Identifier: GPL-2.0-only
6 * sof_ssp_amp.c - ASoc Machine driver for Intel platforms
24 /* Driver-specific board quirks: from bit 0 to 7 */
52 /* BE ID defined in sof-tgl-rt1308-hdmi-ssp.m4 */
57 /* extra BE links to support no-hdmi-in boards */
87 if (ctx->amp_type == CODEC_NONE) in sof_card_dai_links_create()
90 if (!ctx->amp_link) { in sof_card_dai_links_create()
92 return -EINVAL; in sof_card_dai_links_create()
95 /* codec-specific fields for speaker amplifier */ in sof_card_dai_links_create()
96 switch (ctx->amp_type) { in sof_card_dai_links_create()
98 cs35l41_set_dai_link(ctx->amp_link); in sof_card_dai_links_create()
101 sof_rt1308_dai_link(ctx->amp_link); in sof_card_dai_links_create()
104 dev_err(dev, "invalid amp type %d\n", ctx->amp_type); in sof_card_dai_links_create()
105 return -EINVAL; in sof_card_dai_links_create()
113 struct snd_soc_acpi_mach *mach = pdev->dev.platform_data; in sof_ssp_amp_probe()
117 if (pdev->id_entry && pdev->id_entry->driver_data) in sof_ssp_amp_probe()
118 sof_ssp_amp_quirk = (unsigned long)pdev->id_entry->driver_data; in sof_ssp_amp_probe()
120 dev_dbg(&pdev->dev, "sof_ssp_amp_quirk = %lx\n", sof_ssp_amp_quirk); in sof_ssp_amp_probe()
123 ctx = sof_intel_board_get_ctx(&pdev->dev, sof_ssp_amp_quirk); in sof_ssp_amp_probe()
125 return -ENOMEM; in sof_ssp_amp_probe()
128 (mach->mach_params.dmic_num == 0)) in sof_ssp_amp_probe()
129 ctx->dmic_be_num = 0; in sof_ssp_amp_probe()
132 if (mach->mach_params.codec_mask & IDISP_CODEC_MASK) in sof_ssp_amp_probe()
133 ctx->hdmi.idisp_codec = true; in sof_ssp_amp_probe()
135 ctx->hdmi_num = 0; in sof_ssp_amp_probe()
138 ctx->link_order_overwrite = SSP_AMP_LINK_ORDER; in sof_ssp_amp_probe()
140 if (ctx->ssp_mask_hdmi_in) { in sof_ssp_amp_probe()
141 /* the topology supports HDMI-IN uses fixed BE ID for DAI links */ in sof_ssp_amp_probe()
142 ctx->link_id_overwrite = SSP_AMP_LINK_IDS; in sof_ssp_amp_probe()
146 ret = sof_card_dai_links_create(&pdev->dev, &sof_ssp_amp_card, ctx); in sof_ssp_amp_probe()
151 switch (ctx->amp_type) { in sof_ssp_amp_probe()
160 dev_err(&pdev->dev, "invalid amp type %d\n", ctx->amp_type); in sof_ssp_amp_probe()
161 return -EINVAL; in sof_ssp_amp_probe()
164 sof_ssp_amp_card.dev = &pdev->dev; in sof_ssp_amp_probe()
168 mach->mach_params.platform); in sof_ssp_amp_probe()
174 return devm_snd_soc_register_card(&pdev->dev, &sof_ssp_amp_card); in sof_ssp_amp_probe()