Lines Matching +full:dw +full:- +full:hdmi

1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * dw-hdmi-gp-audio.c
5 * Copyright 2020-2022 NXP
12 #include <linux/dma-mapping.h>
17 #include <sound/hdmi-codec.h>
26 #include "dw-hdmi-audio.h"
28 #define DRIVER_NAME "dw-hdmi-gp-audio"
29 #define DRV_NAME "hdmi-gp-audio"
43 * The default mapping of ALSA channels to HDMI channels and speaker
44 * allocation bits. Note that we can't do channel remapping here -
47 * Mappings for alsa-lib pcm/surround*.conf files:
52 * Our mapping from ALSA channel to CEA686D speaker name and HDMI channel:
79 struct snd_dw_hdmi *dw = dev_get_drvdata(dev); in audio_hw_params() local
82 dw_hdmi_set_sample_rate(dw->data.hdmi, params->sample_rate); in audio_hw_params()
84 ca = default_hdmi_channel_config[params->channels - 2].ca; in audio_hw_params()
86 dw_hdmi_set_channel_count(dw->data.hdmi, params->channels); in audio_hw_params()
87 dw_hdmi_set_channel_allocation(dw->data.hdmi, ca); in audio_hw_params()
89 dw_hdmi_set_sample_non_pcm(dw->data.hdmi, in audio_hw_params()
90 params->iec.status[0] & IEC958_AES0_NONAUDIO); in audio_hw_params()
91 dw_hdmi_set_sample_width(dw->data.hdmi, params->sample_width); in audio_hw_params()
103 struct snd_dw_hdmi *dw = dev_get_drvdata(dev); in audio_mute_stream() local
106 dw_hdmi_audio_enable(dw->data.hdmi); in audio_mute_stream()
108 dw_hdmi_audio_disable(dw->data.hdmi); in audio_mute_stream()
119 eld = audio->get_eld(audio->hdmi); in audio_get_eld()
133 struct snd_dw_hdmi *dw = dev_get_drvdata(dev); in audio_hook_plugged_cb() local
135 return dw_hdmi_set_plugged_cb(dw->data.hdmi, fn, codec_dev); in audio_hook_plugged_cb()
148 struct dw_hdmi_audio_data *data = pdev->dev.platform_data; in snd_dw_hdmi_probe()
149 struct snd_dw_hdmi *dw; in snd_dw_hdmi_probe() local
159 dw = devm_kzalloc(&pdev->dev, sizeof(*dw), GFP_KERNEL); in snd_dw_hdmi_probe()
160 if (!dw) in snd_dw_hdmi_probe()
161 return -ENOMEM; in snd_dw_hdmi_probe()
163 dw->data = *data; in snd_dw_hdmi_probe()
165 platform_set_drvdata(pdev, dw); in snd_dw_hdmi_probe()
167 dw->audio_pdev = platform_device_register_data(&pdev->dev, in snd_dw_hdmi_probe()
172 return PTR_ERR_OR_ZERO(dw->audio_pdev); in snd_dw_hdmi_probe()
177 struct snd_dw_hdmi *dw = platform_get_drvdata(pdev); in snd_dw_hdmi_remove() local
179 platform_device_unregister(dw->audio_pdev); in snd_dw_hdmi_remove()
193 MODULE_DESCRIPTION("Synopsys Designware HDMI GPA ALSA interface");