mirror of https://github.com/thesofproject/sof.git
audio: audio_stream: Explicitly cast to enum
To prevent the following with C++ compilation. error: invalid conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘sof_ipc_frame’ [-fpermissive] Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
parent
438b11bab2
commit
dfd8ffa069
|
@ -365,7 +365,7 @@ static inline int audio_stream_set_params(struct audio_stream *buffer,
|
||||||
if (!params)
|
if (!params)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
buffer->runtime_stream_params.frame_fmt = params->frame_fmt;
|
buffer->runtime_stream_params.frame_fmt = (enum sof_ipc_frame)params->frame_fmt;
|
||||||
buffer->runtime_stream_params.rate = params->rate;
|
buffer->runtime_stream_params.rate = params->rate;
|
||||||
buffer->runtime_stream_params.channels = params->channels;
|
buffer->runtime_stream_params.channels = params->channels;
|
||||||
|
|
||||||
|
@ -990,8 +990,8 @@ static inline void audio_stream_fmt_conversion(enum ipc4_bit_depth depth,
|
||||||
* IPC4_DEPTH_24BIT (24) <---> SOF_IPC_FRAME_S24_4LE (1)
|
* IPC4_DEPTH_24BIT (24) <---> SOF_IPC_FRAME_S24_4LE (1)
|
||||||
* IPC4_DEPTH_32BIT (32) <---> SOF_IPC_FRAME_S32_LE (2)
|
* IPC4_DEPTH_32BIT (32) <---> SOF_IPC_FRAME_S32_LE (2)
|
||||||
*/
|
*/
|
||||||
*frame_fmt = (depth >> 3) - 2;
|
*frame_fmt = (enum sof_ipc_frame)((depth >> 3) - 2);
|
||||||
*valid_fmt = (valid >> 3) - 2;
|
*valid_fmt = (enum sof_ipc_frame)((valid >> 3) - 2);
|
||||||
|
|
||||||
#ifdef CONFIG_FORMAT_U8
|
#ifdef CONFIG_FORMAT_U8
|
||||||
if (depth == 8)
|
if (depth == 8)
|
||||||
|
|
Loading…
Reference in New Issue