summaryrefslogtreecommitdiff
path: root/include/sound/core.h
diff options
context:
space:
mode:
authorSudheer Papothi <spapothi@codeaurora.org>2016-01-29 00:36:30 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:09:50 -0700
commit93a336484a5e14711f62bc83f08cddd08ef3669e (patch)
tree56a533683a94b145370f759ee2dc4d7c7ac6a145 /include/sound/core.h
parent7ed3e4477179ea3db0639f740d191840a9a8b9f8 (diff)
ALSA: core: Expose sound card online/offline state
Expose sound card online/offline state to procfs so userspace application can poll and read sound card's state. Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Diffstat (limited to 'include/sound/core.h')
-rw-r--r--include/sound/core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index cdfecafff0f4..7b05f88cacac 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -134,6 +134,9 @@ struct snd_card {
struct device card_dev; /* cardX object for sysfs */
const struct attribute_group *dev_groups[4]; /* assigned sysfs attr */
bool registered; /* card_dev is registered? */
+ int offline; /* if this sound card is offline */
+ unsigned long offline_change;
+ wait_queue_head_t offline_poll_wait;
#ifdef CONFIG_PM
unsigned int power_state; /* power state */
@@ -265,6 +268,8 @@ int snd_component_add(struct snd_card *card, const char *component);
int snd_card_file_add(struct snd_card *card, struct file *file);
int snd_card_file_remove(struct snd_card *card, struct file *file);
#define snd_card_unref(card) put_device(&(card)->card_dev)
+void snd_card_change_online_state(struct snd_card *card, int online);
+bool snd_card_is_online_state(struct snd_card *card);
#define snd_card_set_dev(card, devptr) ((card)->dev = (devptr))