diff options
author | Vaibhav Agarwal <vaibhav.agarwal@linaro.org> | 2016-08-04 15:14:38 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-08-04 19:07:30 +0200 |
commit | 19866603be2ad58735f82511f3d5f680e61479ea (patch) | |
tree | 58e307d4d0f4902533e30972ad7bdebd371290fc /drivers/staging/greybus/audio_codec.h | |
parent | c388ae769699262bd48da1d529bbed731c2de559 (diff) | |
download | op-kernel-dev-19866603be2ad58735f82511f3d5f680e61479ea.zip op-kernel-dev-19866603be2ad58735f82511f3d5f680e61479ea.tar.gz |
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.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h index 7a2dbc5..40c39b3 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]; }; |