diff options
| author | Sudheer Papothi <spapothi@codeaurora.org> | 2016-01-29 00:36:30 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:09:50 -0700 |
| commit | 93a336484a5e14711f62bc83f08cddd08ef3669e (patch) | |
| tree | 56a533683a94b145370f759ee2dc4d7c7ac6a145 /include | |
| parent | 7ed3e4477179ea3db0639f740d191840a9a8b9f8 (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')
| -rw-r--r-- | include/sound/core.h | 5 | ||||
| -rw-r--r-- | include/sound/soc.h | 3 |
2 files changed, 7 insertions, 1 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)) diff --git a/include/sound/soc.h b/include/sound/soc.h index d696c2f6bcbb..eb030bad423e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -553,12 +553,13 @@ int snd_soc_update_bits_locked(struct snd_soc_codec *codec, int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, unsigned int mask, unsigned int value); +void snd_soc_card_change_online_state(struct snd_soc_card *soc_card, + int online); #ifdef CONFIG_SND_SOC_AC97_BUS struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec); struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec, unsigned int id, unsigned int id_mask); void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); - int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops); int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops, struct platform_device *pdev); |
