#include <linux/input.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/mm.h>
#include <linux/debugfs.h>
#include <sound/jack.h>
#include <sound/core.h>
#include <sound/control.h>
struct snd_jack_kctl { … };
#ifdef CONFIG_SND_JACK_INPUT_DEV
static const int jack_switch_types[SND_JACK_SWITCH_TYPES] = …;
#endif
static void snd_jack_remove_debugfs(struct snd_jack *jack);
static int snd_jack_dev_disconnect(struct snd_device *device)
{ … }
static int snd_jack_dev_free(struct snd_device *device)
{ … }
#ifdef CONFIG_SND_JACK_INPUT_DEV
static int snd_jack_dev_register(struct snd_device *device)
{ … }
#endif
#ifdef CONFIG_SND_JACK_INJECTION_DEBUG
static void snd_jack_inject_report(struct snd_jack_kctl *jack_kctl, int status)
{ … }
static ssize_t sw_inject_enable_read(struct file *file,
char __user *to, size_t count, loff_t *ppos)
{ … }
static ssize_t sw_inject_enable_write(struct file *file,
const char __user *from, size_t count, loff_t *ppos)
{ … }
static ssize_t jackin_inject_write(struct file *file,
const char __user *from, size_t count, loff_t *ppos)
{ … }
static ssize_t jack_kctl_id_read(struct file *file,
char __user *to, size_t count, loff_t *ppos)
{ … }
static const char * const jack_events_name[] = …;
static int parse_mask_bits(unsigned int mask_bits, char *buf, size_t buf_size)
{ … }
static ssize_t jack_kctl_mask_bits_read(struct file *file,
char __user *to, size_t count, loff_t *ppos)
{ … }
static ssize_t jack_kctl_status_read(struct file *file,
char __user *to, size_t count, loff_t *ppos)
{ … }
#ifdef CONFIG_SND_JACK_INPUT_DEV
static ssize_t jack_type_read(struct file *file,
char __user *to, size_t count, loff_t *ppos)
{ … }
static const struct file_operations jack_type_fops = …;
#endif
static const struct file_operations sw_inject_enable_fops = …;
static const struct file_operations jackin_inject_fops = …;
static const struct file_operations jack_kctl_id_fops = …;
static const struct file_operations jack_kctl_mask_bits_fops = …;
static const struct file_operations jack_kctl_status_fops = …;
static int snd_jack_debugfs_add_inject_node(struct snd_jack *jack,
struct snd_jack_kctl *jack_kctl)
{ … }
static void snd_jack_remove_debugfs(struct snd_jack *jack)
{ … }
#else
static int snd_jack_debugfs_add_inject_node(struct snd_jack *jack,
struct snd_jack_kctl *jack_kctl)
{
return 0;
}
static void snd_jack_remove_debugfs(struct snd_jack *jack)
{
}
#endif
static void snd_jack_kctl_private_free(struct snd_kcontrol *kctl)
{ … }
static void snd_jack_kctl_add(struct snd_jack *jack, struct snd_jack_kctl *jack_kctl)
{ … }
static struct snd_jack_kctl * snd_jack_kctl_new(struct snd_card *card, const char *name, unsigned int mask)
{ … }
int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask)
{ … }
EXPORT_SYMBOL(…);
int snd_jack_new(struct snd_card *card, const char *id, int type,
struct snd_jack **jjack, bool initial_kctl, bool phantom_jack)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_SND_JACK_INPUT_DEV
void snd_jack_set_parent(struct snd_jack *jack, struct device *parent)
{ … }
EXPORT_SYMBOL(…);
int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type,
int keytype)
{ … }
EXPORT_SYMBOL(…);
#endif
void snd_jack_report(struct snd_jack *jack, int status)
{ … }
EXPORT_SYMBOL(…);