aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJie Yang <yang.jie@intel.com>2015-01-12 04:17:34 -0500
committerMark Brown <broonie@kernel.org>2015-01-14 15:22:35 -0500
commita0a7c48fe1a6dc6cae7c589640443bbaaddc28b3 (patch)
tree49d9ac58f1d7a99eca98e3bea7192e518e4fc9ae
parent7ff9d6714a5c97fb448c53aae801af3d529ecb56 (diff)
ASoC: Intel: initial stream_hw_id to invalid value
The stream_hw_id for System stream is 0x0, if we use initial stream_hw_id value 0, it may return wrong(not committed) stream when calling function get_stream_by_id() with stream_id=0. Here initial stream_hw_id to invalid value to fix this issue. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/sst-haswell-ipc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c
index 3f8c48231364..083292362da6 100644
--- a/sound/soc/intel/sst-haswell-ipc.c
+++ b/sound/soc/intel/sst-haswell-ipc.c
@@ -94,6 +94,8 @@
94/* Mailbox */ 94/* Mailbox */
95#define IPC_MAX_MAILBOX_BYTES 256 95#define IPC_MAX_MAILBOX_BYTES 256
96 96
97#define INVALID_STREAM_HW_ID 0xffffffff
98
97/* Global Message - Types and Replies */ 99/* Global Message - Types and Replies */
98enum ipc_glb_type { 100enum ipc_glb_type {
99 IPC_GLB_GET_FW_VERSION = 0, /* Retrieves firmware version */ 101 IPC_GLB_GET_FW_VERSION = 0, /* Retrieves firmware version */
@@ -1208,6 +1210,7 @@ struct sst_hsw_stream *sst_hsw_stream_new(struct sst_hsw *hsw, int id,
1208 return NULL; 1210 return NULL;
1209 1211
1210 spin_lock_irqsave(&sst->spinlock, flags); 1212 spin_lock_irqsave(&sst->spinlock, flags);
1213 stream->reply.stream_hw_id = INVALID_STREAM_HW_ID;
1211 list_add(&stream->node, &hsw->stream_list); 1214 list_add(&stream->node, &hsw->stream_list);
1212 stream->notify_position = notify_position; 1215 stream->notify_position = notify_position;
1213 stream->pdata = data; 1216 stream->pdata = data;