linux/drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * dw-hdmi-gp-audio.c
 *
 * Copyright 2020-2022 NXP
 */
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <drm/bridge/dw_hdmi.h>
#include <drm/drm_edid.h>
#include <drm/drm_connector.h>

#include <sound/hdmi-codec.h>
#include <sound/asoundef.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_drm_eld.h>
#include <sound/pcm_iec958.h>
#include <sound/dmaengine_pcm.h>

#include "dw-hdmi-audio.h"

#define DRIVER_NAME
#define DRV_NAME

struct snd_dw_hdmi {};

struct dw_hdmi_channel_conf {};

/*
 * The default mapping of ALSA channels to HDMI channels and speaker
 * allocation bits.  Note that we can't do channel remapping here -
 * channels must be in the same order.
 *
 * Mappings for alsa-lib pcm/surround*.conf files:
 *
 *		Front	Sur4.0	Sur4.1	Sur5.0	Sur5.1	Sur7.1
 * Channels	2	4	6	6	6	8
 *
 * Our mapping from ALSA channel to CEA686D speaker name and HDMI channel:
 *
 *				Number of ALSA channels
 * ALSA Channel	2	3	4	5	6	7	8
 * 0		FL:0	=	=	=	=	=	=
 * 1		FR:1	=	=	=	=	=	=
 * 2			FC:3	RL:4	LFE:2	=	=	=
 * 3				RR:5	RL:4	FC:3	=	=
 * 4					RR:5	RL:4	=	=
 * 5						RR:5	=	=
 * 6							RC:6	=
 * 7							RLC/FRC	RLC/FRC
 */
static struct dw_hdmi_channel_conf default_hdmi_channel_config[7] =;

static int audio_hw_params(struct device *dev,  void *data,
			   struct hdmi_codec_daifmt *daifmt,
			   struct hdmi_codec_params *params)
{}

static void audio_shutdown(struct device *dev, void *data)
{}

static int audio_mute_stream(struct device *dev, void *data,
			     bool enable, int direction)
{}

static int audio_get_eld(struct device *dev, void *data,
			 u8 *buf, size_t len)
{}

static int audio_hook_plugged_cb(struct device *dev, void *data,
				 hdmi_codec_plugged_cb fn,
				 struct device *codec_dev)
{}

static const struct hdmi_codec_ops audio_codec_ops =;

static int snd_dw_hdmi_probe(struct platform_device *pdev)
{}

static void snd_dw_hdmi_remove(struct platform_device *pdev)
{}

static struct platform_driver snd_dw_hdmi_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();