linux/sound/pci/hda/hda_bind.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * HD-audio codec driver binding
 * Copyright (c) Takashi Iwai <[email protected]>
 */

#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/pm.h>
#include <sound/core.h>
#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_jack.h"

/*
 * find a matching codec id
 */
static int hda_codec_match(struct hdac_device *dev, struct hdac_driver *drv)
{}

/* process an unsolicited event */
static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev)
{}

/**
 * snd_hda_codec_set_name - set the codec name
 * @codec: the HDA codec
 * @name: name string to set
 */
int snd_hda_codec_set_name(struct hda_codec *codec, const char *name)
{}
EXPORT_SYMBOL_GPL();

static int hda_codec_driver_probe(struct device *dev)
{}

static int hda_codec_driver_remove(struct device *dev)
{}

static void hda_codec_driver_shutdown(struct device *dev)
{}

int __hda_codec_driver_register(struct hda_codec_driver *drv, const char *name,
			       struct module *owner)
{}
EXPORT_SYMBOL_GPL();

void hda_codec_driver_unregister(struct hda_codec_driver *drv)
{}
EXPORT_SYMBOL_GPL();

static inline bool codec_probed(struct hda_codec *codec)
{}

/* try to auto-load codec module */
static void request_codec_module(struct hda_codec *codec)
{}

/* try to auto-load and bind the codec module */
static void codec_bind_module(struct hda_codec *codec)
{}

#if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI)
/* if all audio out widgets are digital, let's assume the codec as a HDMI/DP */
static bool is_likely_hdmi_codec(struct hda_codec *codec)
{}
#else
/* no HDMI codec parser support */
#define is_likely_hdmi_codec
#endif /* CONFIG_SND_HDA_CODEC_HDMI */

static int codec_bind_generic(struct hda_codec *codec)
{}

#if IS_ENABLED(CONFIG_SND_HDA_GENERIC)
#define is_generic_config(codec)
#else
#define is_generic_config
#endif

/**
 * snd_hda_codec_configure - (Re-)configure the HD-audio codec
 * @codec: the HDA codec
 *
 * Start parsing of the given codec tree and (re-)initialize the whole
 * patch instance.
 *
 * Returns 0 if successful or a negative error code.
 */
int snd_hda_codec_configure(struct hda_codec *codec)
{}
EXPORT_SYMBOL_GPL();