#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/bitops.h>
#include <linux/debugfs.h>
#include <linux/platform_device.h>
#include <linux/pinctrl/consumer.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/dmi.h>
#include <linux/acpi.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dpcm.h>
#include <sound/soc-topology.h>
#include <sound/soc-link.h>
#include <sound/initval.h>
#define CREATE_TRACE_POINTS
#include <trace/events/asoc.h>
static DEFINE_MUTEX(client_mutex);
static LIST_HEAD(component_list);
static LIST_HEAD(unbind_card_list);
#define for_each_component(component) …
struct snd_soc_dai_link_component null_dailink_component[0];
EXPORT_SYMBOL_GPL(…);
static int pmdown_time = …;
module_param(pmdown_time, int, 0);
MODULE_PARM_DESC(…) …;
static ssize_t pmdown_time_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t pmdown_time_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(pmdown_time);
static struct attribute *soc_dev_attrs[] = …;
static umode_t soc_dev_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int idx)
{ … }
static const struct attribute_group soc_dapm_dev_group = …;
static const struct attribute_group soc_dev_group = …;
static const struct attribute_group *soc_dev_attr_groups[] = …;
#ifdef CONFIG_DEBUG_FS
struct dentry *snd_soc_debugfs_root;
EXPORT_SYMBOL_GPL(…);
static void soc_init_component_debugfs(struct snd_soc_component *component)
{ … }
static void soc_cleanup_component_debugfs(struct snd_soc_component *component)
{ … }
static int dai_list_show(struct seq_file *m, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int component_list_show(struct seq_file *m, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static void soc_init_card_debugfs(struct snd_soc_card *card)
{ … }
static void soc_cleanup_card_debugfs(struct snd_soc_card *card)
{ … }
static void snd_soc_debugfs_init(void)
{ … }
static void snd_soc_debugfs_exit(void)
{ … }
#else
static inline void soc_init_component_debugfs(struct snd_soc_component *component) { }
static inline void soc_cleanup_component_debugfs(struct snd_soc_component *component) { }
static inline void soc_init_card_debugfs(struct snd_soc_card *card) { }
static inline void soc_cleanup_card_debugfs(struct snd_soc_card *card) { }
static inline void snd_soc_debugfs_init(void) { }
static inline void snd_soc_debugfs_exit(void) { }
#endif
static int snd_soc_is_match_dai_args(const struct of_phandle_args *args1,
const struct of_phandle_args *args2)
{ … }
static inline int snd_soc_dlc_component_is_empty(struct snd_soc_dai_link_component *dlc)
{ … }
static inline int snd_soc_dlc_component_is_invalid(struct snd_soc_dai_link_component *dlc)
{ … }
static inline int snd_soc_dlc_dai_is_empty(struct snd_soc_dai_link_component *dlc)
{ … }
static int snd_soc_is_matching_dai(const struct snd_soc_dai_link_component *dlc,
struct snd_soc_dai *dai)
{ … }
const char *snd_soc_dai_name_get(const struct snd_soc_dai *dai)
{ … }
EXPORT_SYMBOL_GPL(…);
static int snd_soc_rtd_add_component(struct snd_soc_pcm_runtime *rtd,
struct snd_soc_component *component)
{ … }
struct snd_soc_component *snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime *rtd,
const char *driver_name)
{ … }
EXPORT_SYMBOL_GPL(…);
struct snd_soc_component
*snd_soc_lookup_component_nolocked(struct device *dev, const char *driver_name)
{ … }
EXPORT_SYMBOL_GPL(…);
struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
const char *driver_name)
{ … }
EXPORT_SYMBOL_GPL(…);
struct snd_soc_pcm_runtime
*snd_soc_get_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd)
{ … }
EXPORT_SYMBOL_GPL(…);
static void soc_release_rtd_dev(struct device *dev)
{ … }
static void soc_free_pcm_runtime(struct snd_soc_pcm_runtime *rtd)
{ … }
static void close_delayed_work(struct work_struct *work) { … }
static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
struct snd_soc_card *card, struct snd_soc_dai_link *dai_link)
{ … }
static void snd_soc_fill_dummy_dai(struct snd_soc_card *card)
{ … }
static void snd_soc_flush_all_delayed_work(struct snd_soc_card *card)
{ … }
#ifdef CONFIG_PM_SLEEP
static void soc_playback_digital_mute(struct snd_soc_card *card, int mute)
{ … }
static void soc_dapm_suspend_resume(struct snd_soc_card *card, int event)
{ … }
int snd_soc_suspend(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
static void soc_resume_deferred(struct work_struct *work)
{ … }
int snd_soc_resume(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
static void soc_resume_init(struct snd_soc_card *card)
{ … }
#else
#define snd_soc_suspend …
#define snd_soc_resume …
static inline void soc_resume_init(struct snd_soc_card *card) { }
#endif
static struct device_node
*soc_component_to_node(struct snd_soc_component *component)
{ … }
struct of_phandle_args *snd_soc_copy_dai_args(struct device *dev,
const struct of_phandle_args *args)
{ … }
EXPORT_SYMBOL_GPL(…);
static int snd_soc_is_matching_component(
const struct snd_soc_dai_link_component *dlc,
struct snd_soc_component *component)
{ … }
static struct snd_soc_component *soc_find_component(
const struct snd_soc_dai_link_component *dlc)
{ … }
struct snd_soc_dai *snd_soc_find_dai(
const struct snd_soc_dai_link_component *dlc)
{ … }
EXPORT_SYMBOL_GPL(…);
struct snd_soc_dai *snd_soc_find_dai_with_mutex(
const struct snd_soc_dai_link_component *dlc)
{ … }
EXPORT_SYMBOL_GPL(…);
static int soc_dai_link_sanity_check(struct snd_soc_card *card,
struct snd_soc_dai_link *link)
{ … }
#define MAX_DEFAULT_CH_MAP_SIZE …
static struct snd_soc_dai_link_ch_map default_ch_map_sync[MAX_DEFAULT_CH_MAP_SIZE] = …;
static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZE] = …;
static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_SIZE] = …;
static int snd_soc_compensate_channel_connection_map(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link)
{ … }
void snd_soc_remove_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_pcm_runtime *rtd)
{ … }
EXPORT_SYMBOL_GPL(…);
static int snd_soc_add_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link)
{ … }
int snd_soc_add_pcm_runtimes(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link,
int num_dai_link)
{ … }
EXPORT_SYMBOL_GPL(…);
static void snd_soc_runtime_get_dai_fmt(struct snd_soc_pcm_runtime *rtd)
{ … }
int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
unsigned int dai_fmt)
{ … }
EXPORT_SYMBOL_GPL(…);
static int soc_init_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_pcm_runtime *rtd)
{ … }
static void soc_set_name_prefix(struct snd_soc_card *card,
struct snd_soc_component *component)
{ … }
static void soc_remove_component(struct snd_soc_component *component,
int probed)
{ … }
static int soc_probe_component(struct snd_soc_card *card,
struct snd_soc_component *component)
{ … }
static void soc_remove_link_dais(struct snd_soc_card *card)
{ … }
static int soc_probe_link_dais(struct snd_soc_card *card)
{ … }
static void soc_remove_link_components(struct snd_soc_card *card)
{ … }
static int soc_probe_link_components(struct snd_soc_card *card)
{ … }
static void soc_unbind_aux_dev(struct snd_soc_card *card)
{ … }
static int soc_bind_aux_dev(struct snd_soc_card *card)
{ … }
static int soc_probe_aux_devices(struct snd_soc_card *card)
{ … }
static void soc_remove_aux_devices(struct snd_soc_card *card)
{ … }
#ifdef CONFIG_DMI
static const char * const dmi_blacklist[] = …;
static void cleanup_dmi_name(char *name)
{ … }
static int is_dmi_valid(const char *field)
{ … }
static void append_dmi_string(struct snd_soc_card *card, const char *str)
{ … }
int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
{ … }
EXPORT_SYMBOL_GPL(…);
#endif
static void soc_check_tplg_fes(struct snd_soc_card *card)
{ … }
#define soc_setup_card_name(card, name, name1, name2) …
static void __soc_setup_card_name(struct snd_soc_card *card,
char *name, int len,
const char *name1, const char *name2)
{ … }
static void soc_cleanup_card_resources(struct snd_soc_card *card)
{ … }
static void snd_soc_unbind_card(struct snd_soc_card *card, bool unregister)
{ … }
static int snd_soc_bind_card(struct snd_soc_card *card)
{ … }
static int soc_probe(struct platform_device *pdev)
{ … }
int snd_soc_poweroff(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
const struct dev_pm_ops snd_soc_pm_ops = …;
EXPORT_SYMBOL_GPL(…);
static struct platform_driver soc_driver = …;
struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
void *data, const char *long_name,
const char *prefix)
{ … }
EXPORT_SYMBOL_GPL(…);
static int snd_soc_add_controls(struct snd_card *card, struct device *dev,
const struct snd_kcontrol_new *controls, int num_controls,
const char *prefix, void *data)
{ … }
int snd_soc_add_component_controls(struct snd_soc_component *component,
const struct snd_kcontrol_new *controls, unsigned int num_controls)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_add_card_controls(struct snd_soc_card *soc_card,
const struct snd_kcontrol_new *controls, int num_controls)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_add_dai_controls(struct snd_soc_dai *dai,
const struct snd_kcontrol_new *controls, int num_controls)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_register_card(struct snd_soc_card *card)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_soc_unregister_card(struct snd_soc_card *card)
{ … }
EXPORT_SYMBOL_GPL(…);
static char *fmt_single_name(struct device *dev, int *id)
{ … }
static inline char *fmt_multiple_name(struct device *dev,
struct snd_soc_dai_driver *dai_drv)
{ … }
void snd_soc_unregister_dai(struct snd_soc_dai *dai)
{ … }
EXPORT_SYMBOL_GPL(…);
struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv,
bool legacy_dai_naming)
{ … }
EXPORT_SYMBOL_GPL(…);
static void snd_soc_unregister_dais(struct snd_soc_component *component)
{ … }
static int snd_soc_register_dais(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv,
size_t count)
{ … }
#define ENDIANNESS_MAP(name) …
static u64 endianness_format_map[] = …;
static void convert_endianness_formats(struct snd_soc_pcm_stream *stream)
{ … }
static void snd_soc_try_rebind_card(void)
{ … }
static void snd_soc_del_component_unlocked(struct snd_soc_component *component)
{ … }
int snd_soc_component_initialize(struct snd_soc_component *component,
const struct snd_soc_component_driver *driver,
struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_add_component(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv,
int num_dai)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_register_component(struct device *dev,
const struct snd_soc_component_driver *component_driver,
struct snd_soc_dai_driver *dai_drv,
int num_dai)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_soc_unregister_component_by_driver(struct device *dev,
const struct snd_soc_component_driver *component_driver)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_soc_unregister_component(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_parse_card_name(struct snd_soc_card *card,
const char *propname)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct snd_soc_dapm_widget simple_widgets[] = …;
int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
const char *propname)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_parse_pin_switches(struct snd_soc_card *card, const char *prop)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_get_slot_mask(struct device_node *np,
const char *prop_name,
unsigned int *mask)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_parse_tdm_slot(struct device_node *np,
unsigned int *tx_mask,
unsigned int *rx_mask,
unsigned int *slots,
unsigned int *slot_width)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_soc_dlc_use_cpu_as_platform(struct snd_soc_dai_link_component *platforms,
struct snd_soc_dai_link_component *cpus)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_soc_of_parse_node_prefix(struct device_node *np,
struct snd_soc_codec_conf *codec_conf,
struct device_node *of_node,
const char *propname)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
const char *propname)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_parse_aux_devs(struct snd_soc_card *card, const char *propname)
{ … }
EXPORT_SYMBOL_GPL(…);
unsigned int snd_soc_daifmt_clock_provider_flipped(unsigned int dai_fmt)
{ … }
EXPORT_SYMBOL_GPL(…);
unsigned int snd_soc_daifmt_clock_provider_from_bitmap(unsigned int bit_frame)
{ … }
EXPORT_SYMBOL_GPL(…);
unsigned int snd_soc_daifmt_parse_format(struct device_node *np,
const char *prefix)
{ … }
EXPORT_SYMBOL_GPL(…);
unsigned int snd_soc_daifmt_parse_clock_provider_raw(struct device_node *np,
const char *prefix,
struct device_node **bitclkmaster,
struct device_node **framemaster)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_get_stream_cpu(const struct snd_soc_dai_link *dai_link, int stream)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_get_dai_id(struct device_node *ep)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_get_dlc(const struct of_phandle_args *args, struct snd_soc_dai_link_component *dlc)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_get_dlc(struct device_node *of_node,
struct of_phandle_args *args,
struct snd_soc_dai_link_component *dlc,
int index)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_get_dai_name(const struct of_phandle_args *args,
const char **dai_name)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_get_dai_name(struct device_node *of_node,
const char **dai_name, int index)
{ … }
EXPORT_SYMBOL_GPL(…);
struct snd_soc_dai *snd_soc_get_dai_via_args(const struct of_phandle_args *dai_args)
{ … }
EXPORT_SYMBOL_GPL(…);
static void __snd_soc_of_put_component(struct snd_soc_dai_link_component *component)
{ … }
static int __snd_soc_of_get_dai_link_component_alloc(
struct device *dev, struct device_node *of_node,
struct snd_soc_dai_link_component **ret_component,
int *ret_num)
{ … }
void snd_soc_of_put_dai_link_codecs(struct snd_soc_dai_link *dai_link)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_get_dai_link_codecs(struct device *dev,
struct device_node *of_node,
struct snd_soc_dai_link *dai_link)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_soc_of_put_dai_link_cpus(struct snd_soc_dai_link *dai_link)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_soc_of_get_dai_link_cpus(struct device *dev,
struct device_node *of_node,
struct snd_soc_dai_link *dai_link)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init snd_soc_init(void)
{ … }
module_init(…) …;
static void __exit snd_soc_exit(void)
{ … }
module_exit(snd_soc_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;