linux/sound/soc/generic/audio-graph-card2-custom-sample.c

// SPDX-License-Identifier: GPL-2.0
//
// audio-graph-card2-custom-sample.c
//
// Copyright (C) 2020 Renesas Electronics Corp.
// Copyright (C) 2020 Kuninori Morimoto <[email protected]>
//
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <sound/graph_card.h>

/*
 * Custom driver can have own priv
 * which includes simple_util_priv.
 */
struct custom_priv {};

/* You can get custom_priv from simple_priv */
#define simple_to_custom(simple)

static int custom_card_probe(struct snd_soc_card *card)
{}

static int custom_hook_pre(struct simple_util_priv *priv)
{}

static int custom_hook_post(struct simple_util_priv *priv)
{}

static int custom_normal(struct simple_util_priv *priv,
			 struct device_node *lnk,
			 struct link_info *li)
{}

static int custom_dpcm(struct simple_util_priv *priv,
		       struct device_node *lnk,
		       struct link_info *li)
{}

static int custom_c2c(struct simple_util_priv *priv,
		      struct device_node *lnk,
		      struct link_info *li)
{}

/*
 * audio-graph-card2 has many hooks for your customizing.
 */
static struct graph2_custom_hooks custom_hooks =;

static int custom_startup(struct snd_pcm_substream *substream)
{}

/* You can use custom ops */
static const struct snd_soc_ops custom_ops =;

static int custom_probe(struct platform_device *pdev)
{}

static const struct of_device_id custom_of_match[] =;
MODULE_DEVICE_TABLE(of, custom_of_match);

static struct platform_driver custom_card =;
module_platform_driver();

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