summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/audio_codec.h
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>2016-08-04 12:44:38 +0300
committerGreg Kroah-Hartman <gregkh@google.com>2016-08-04 20:07:30 +0300
commit19866603be2ad58735f82511f3d5f680e61479ea (patch)
tree58e307d4d0f4902533e30972ad7bdebd371290fc /drivers/staging/greybus/audio_codec.h
parentc388ae769699262bd48da1d529bbed731c2de559 (diff)
downloadlinux-19866603be2ad58735f82511f3d5f680e61479ea.tar.xz
greybus: audio: Maintain runtime stream params for each DAI
Runtime streams are required while configuring GB module plugged-in during active stream. Currently, it is maintained for single stream. However, this should be maintained for a stream corresponding to each DAI. Fix this! Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/audio_codec.h')
-rw-r--r--drivers/staging/greybus/audio_codec.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index 7a2dbc517663..40c39b30d951 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -98,18 +98,25 @@ enum gbaudio_codec_state {
GBAUDIO_CODEC_STOP,
};
-struct gbaudio_stream {
- const char *dai_name;
+struct gbaudio_stream_params {
int state;
uint8_t sig_bits, channels;
uint32_t format, rate;
};
+struct gbaudio_codec_dai {
+ int id;
+ /* runtime params for playback/capture streams */
+ struct gbaudio_stream_params params[2];
+ struct list_head list;
+};
+
struct gbaudio_codec_info {
struct device *dev;
struct snd_soc_codec *codec;
struct list_head module_list;
- struct gbaudio_stream stream[2]; /* PB/CAP */
+ /* to maintain runtime stream params for each DAI */
+ struct list_head dai_list;
struct mutex lock;
u8 reg[GBCODEC_REG_COUNT];
};