aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-28 22:32:10 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-28 22:32:10 +0100
commitd832f3dcb6e2d153fbb69b91931058d138bc41cb (patch)
treeb58210600b92bbe0c20c02724a47068682b99d5e /include/sound
parentALSA: usx2y: Move UAPI definition into include/uapi/sound/usb_stream.h (diff)
parentALSA: ak411x: Fix race of reinit() calls (diff)
downloadlinux-dev-d832f3dcb6e2d153fbb69b91931058d138bc41cb.tar.xz
linux-dev-d832f3dcb6e2d153fbb69b91931058d138bc41cb.zip
Merge branch 'topic/ak411x-fix' into for-next
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/ak4113.h11
-rw-r--r--include/sound/ak4114.h11
2 files changed, 20 insertions, 2 deletions
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h
index 2609048c1d44..58c145620c3c 100644
--- a/include/sound/ak4113.h
+++ b/include/sound/ak4113.h
@@ -286,7 +286,8 @@ struct ak4113 {
ak4113_write_t *write;
ak4113_read_t *read;
void *private_data;
- unsigned int init:1;
+ atomic_t wq_processing;
+ struct mutex reinit_mutex;
spinlock_t lock;
unsigned char regmap[AK4113_WRITABLE_REGS];
struct snd_kcontrol *kctls[AK4113_CONTROLS];
@@ -317,5 +318,13 @@ int snd_ak4113_build(struct ak4113 *ak4113,
int snd_ak4113_external_rate(struct ak4113 *ak4113);
int snd_ak4113_check_rate_and_errors(struct ak4113 *ak4113, unsigned int flags);
+#ifdef CONFIG_PM
+void snd_ak4113_suspend(struct ak4113 *chip);
+void snd_ak4113_resume(struct ak4113 *chip);
+#else
+static inline void snd_ak4113_suspend(struct ak4113 *chip) {}
+static inline void snd_ak4113_resume(struct ak4113 *chip) {}
+#endif
+
#endif /* __SOUND_AK4113_H */
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h
index 52f02a60dba7..b6feb7e225f2 100644
--- a/include/sound/ak4114.h
+++ b/include/sound/ak4114.h
@@ -168,7 +168,8 @@ struct ak4114 {
ak4114_write_t * write;
ak4114_read_t * read;
void * private_data;
- unsigned int init: 1;
+ atomic_t wq_processing;
+ struct mutex reinit_mutex;
spinlock_t lock;
unsigned char regmap[6];
unsigned char txcsb[5];
@@ -199,5 +200,13 @@ int snd_ak4114_build(struct ak4114 *ak4114,
int snd_ak4114_external_rate(struct ak4114 *ak4114);
int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags);
+#ifdef CONFIG_PM
+void snd_ak4114_suspend(struct ak4114 *chip);
+void snd_ak4114_resume(struct ak4114 *chip);
+#else
+static inline void snd_ak4114_suspend(struct ak4114 *chip) {}
+static inline void snd_ak4114_resume(struct ak4114 *chip) {}
+#endif
+
#endif /* __SOUND_AK4114_H */