From 6f6ffec188b5416642b20ef14034d40cfeb3256e Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Fri, 19 Nov 2010 15:06:31 +0000 Subject: sst: Change the SST driver PCM interface The PCM interface in SST driver is cmds only, this patch changes the interface to open, close and cmd interface. This allows SST driver to keep easy track of handles open Signed-off-by: Vinod Koul Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/intel_sst/intel_sst_fw_ipc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/staging/intel_sst/intel_sst_fw_ipc.h') diff --git a/drivers/staging/intel_sst/intel_sst_fw_ipc.h b/drivers/staging/intel_sst/intel_sst_fw_ipc.h index 9d3c36807e07..1a2f67f0aedc 100644 --- a/drivers/staging/intel_sst/intel_sst_fw_ipc.h +++ b/drivers/staging/intel_sst/intel_sst_fw_ipc.h @@ -31,6 +31,7 @@ */ #define MAX_NUM_STREAMS_MRST 3 +#define MAX_NUM_STREAMS_MFLD 6 #define MAX_NUM_STREAMS 6 #define MAX_DBG_RW_BYTES 80 #define MAX_NUM_SCATTER_BUFFERS 8 -- cgit v1.2.3-59-g8ed1b From 90abe60b32a4762fff9bef33295e08bc9bb355af Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Fri, 19 Nov 2010 15:09:50 +0000 Subject: sst: Firmware error codes force number values To avoid mismatch in driver and firmware error codes assign specfic values to each enum. Signed-off-by: Vinod Koul Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/intel_sst/intel_sst_fw_ipc.h | 110 +++++++++++++++------------ 1 file changed, 62 insertions(+), 48 deletions(-) (limited to 'drivers/staging/intel_sst/intel_sst_fw_ipc.h') diff --git a/drivers/staging/intel_sst/intel_sst_fw_ipc.h b/drivers/staging/intel_sst/intel_sst_fw_ipc.h index 1a2f67f0aedc..75c187672450 100644 --- a/drivers/staging/intel_sst/intel_sst_fw_ipc.h +++ b/drivers/staging/intel_sst/intel_sst_fw_ipc.h @@ -142,73 +142,87 @@ enum sst_error_codes { /* Error code,response to msgId: Description */ /* Common error codes */ SST_SUCCESS = 0, /* Success */ - SST_ERR_INVALID_STREAM_ID, /* Invalid stream ID */ - SST_ERR_INVALID_MSG_ID, /* Invalid message ID */ - SST_ERR_INVALID_STREAM_OP, /* Invalid stream operation request */ - SST_ERR_INVALID_PARAMS, /* Invalid params */ - SST_ERR_INVALID_CODEC, /* Invalid codec type */ - SST_ERR_INVALID_MEDIA_TYPE, /* Invalid media type */ - SST_ERR_STREAM_ERR, /* ANY: Stream control or config or - processing error */ + SST_ERR_INVALID_STREAM_ID = 1, + SST_ERR_INVALID_MSG_ID = 2, + SST_ERR_INVALID_STREAM_OP = 3, + SST_ERR_INVALID_PARAMS = 4, + SST_ERR_INVALID_CODEC = 5, + SST_ERR_INVALID_MEDIA_TYPE = 6, + SST_ERR_STREAM_ERR = 7, /* IPC specific error codes */ - SST_IPC_ERR_CALL_BACK_NOT_REGD, /* Call back for msg not regd */ - SST_IPC_ERR_STREAM_NOT_ALLOCATED, /* Stream is not allocated */ - SST_IPC_ERR_STREAM_ALLOC_FAILED, /* ALLOC:Stream alloc failed */ - SST_IPC_ERR_GET_STREAM_FAILED, /* ALLOC:Get stream id failed*/ - SST_ERR_MOD_NOT_AVAIL, /* SET/GET: Mod(AEC/AGC/ALC) not available */ - SST_ERR_MOD_DNLD_RQD, /* SET/GET: Mod(AEC/AGC/ALC) download required */ - SST_ERR_STREAM_STOPPED, /* ANY: Stream is in stopped state */ - SST_ERR_STREAM_IN_USE, /* ANY: Stream is already in use */ + SST_IPC_ERR_CALL_BACK_NOT_REGD = 8, + SST_IPC_ERR_STREAM_NOT_ALLOCATED = 9, + SST_IPC_ERR_STREAM_ALLOC_FAILED = 10, + SST_IPC_ERR_GET_STREAM_FAILED = 11, + SST_ERR_MOD_NOT_AVAIL = 12, + SST_ERR_MOD_DNLD_RQD = 13, + SST_ERR_STREAM_STOPPED = 14, + SST_ERR_STREAM_IN_USE = 15, /* Capture specific error codes */ - SST_CAP_ERR_INCMPLTE_CAPTURE_MSG,/* ANY:Incomplete message */ - SST_CAP_ERR_CAPTURE_FAIL, /* ANY:Capture op failed */ - SST_CAP_ERR_GET_DDR_NEW_SGLIST, - SST_CAP_ERR_UNDER_RUN, /* lack of input data */ - SST_CAP_ERR_OVERFLOW, /* lack of output space */ + SST_CAP_ERR_INCMPLTE_CAPTURE_MSG = 16, + SST_CAP_ERR_CAPTURE_FAIL = 17, + SST_CAP_ERR_GET_DDR_NEW_SGLIST = 18, + SST_CAP_ERR_UNDER_RUN = 19, + SST_CAP_ERR_OVERFLOW = 20, /* Playback specific error codes*/ - SST_PB_ERR_INCMPLTE_PLAY_MSG, /* ANY: Incomplete message */ - SST_PB_ERR_PLAY_FAIL, /* ANY: Playback operation failed */ - SST_PB_ERR_GET_DDR_NEW_SGLIST, + SST_PB_ERR_INCMPLTE_PLAY_MSG = 21, + SST_PB_ERR_PLAY_FAIL = 22, + SST_PB_ERR_GET_DDR_NEW_SGLIST = 23, /* Codec manager specific error codes */ - SST_LIB_ERR_LIB_DNLD_REQUIRED, /* ALLOC: Codec download required */ - SST_LIB_ERR_LIB_NOT_SUPPORTED, /* Library is not supported */ + SST_LIB_ERR_LIB_DNLD_REQUIRED = 24, + SST_LIB_ERR_LIB_NOT_SUPPORTED = 25, /* Library manager specific error codes */ - SST_SCC_ERR_PREP_DNLD_FAILED, /* Failed to prepare for codec download */ - SST_SCC_ERR_LIB_DNLD_RES_FAILED, /* Lib download resume failed */ + SST_SCC_ERR_PREP_DNLD_FAILED = 26, + SST_SCC_ERR_LIB_DNLD_RES_FAILED = 27, /* Scheduler specific error codes */ - SST_SCH_ERR_FAIL, /* REPORT: */ + SST_SCH_ERR_FAIL = 28, /* DMA specific error codes */ - SST_DMA_ERR_NO_CHNL_AVAILABLE, /* DMA Ch not available */ - SST_DMA_ERR_INVALID_INPUT_PARAMS, /* Invalid input params */ - SST_DMA_ERR_CHNL_ALREADY_SUSPENDED, /* Ch is suspended */ - SST_DMA_ERR_CHNL_ALREADY_STARTED, /* Ch already started */ - SST_DMA_ERR_CHNL_NOT_ENABLED, /* Ch not enabled */ - SST_DMA_ERR_TRANSFER_FAILED, /* Transfer failed */ - SST_SSP_ERR_ALREADY_ENABLED, /* REPORT: SSP already enabled */ - SST_SSP_ERR_ALREADY_DISABLED, /* REPORT: SSP already disabled */ - SST_SSP_ERR_NOT_INITIALIZED, + SST_DMA_ERR_NO_CHNL_AVAILABLE = 29, + SST_DMA_ERR_INVALID_INPUT_PARAMS = 30, + SST_DMA_ERR_CHNL_ALREADY_SUSPENDED = 31, + SST_DMA_ERR_CHNL_ALREADY_STARTED = 32, + SST_DMA_ERR_CHNL_NOT_ENABLED = 33, + SST_DMA_ERR_TRANSFER_FAILED = 34, + + SST_SSP_ERR_ALREADY_ENABLED = 35, + SST_SSP_ERR_ALREADY_DISABLED = 36, + SST_SSP_ERR_NOT_INITIALIZED = 37, + SST_SSP_ERR_SRAM_NO_DMA_DATA = 38, /* Other error codes */ - SST_ERR_MOD_INIT_FAIL, /* Firmware Module init failed */ + SST_ERR_MOD_INIT_FAIL = 39, /* FW init error codes */ - SST_RDR_ERR_IO_DEV_SEL_NOT_ALLOWED, - SST_RDR_ERR_ROUTE_ALREADY_STARTED, - SST_RDR_PREP_CODEC_DNLD_FAILED, + SST_RDR_ERR_IO_DEV_SEL_NOT_ALLOWED = 40, + SST_RDR_ERR_ROUTE_ALREADY_STARTED = 41, + SST_RDR_ERR_IO_DEV_SEL_FAILED = 42, + SST_RDR_PREP_CODEC_DNLD_FAILED = 43, /* Memory debug error codes */ - SST_ERR_DBG_MEM_READ_FAIL, - SST_ERR_DBG_MEM_WRITE_FAIL, - - /* Decode error codes */ - SST_ERR_DEC_NEED_INPUT_BUF, - + SST_ERR_DBG_MEM_READ_FAIL = 44, + SST_ERR_DBG_MEM_WRITE_FAIL = 45, + SST_ERR_INSUFFICIENT_INPUT_SG_LIST = 46, + SST_ERR_INSUFFICIENT_OUTPUT_SG_LIST = 47, + + SST_ERR_BUFFER_NOT_AVAILABLE = 48, + SST_ERR_BUFFER_NOT_ALLOCATED = 49, + SST_ERR_INVALID_REGION_TYPE = 50, + SST_ERR_NULL_PTR = 51, + SST_ERR_INVALID_BUFFER_SIZE = 52, + SST_ERR_INVALID_BUFFER_INDEX = 53, + + /*IIPC specific error codes */ + SST_IIPC_QUEUE_FULL = 54, + SST_IIPC_ERR_MSG_SND_FAILED = 55, + SST_PB_ERR_UNDERRUN_OCCURED = 56, + SST_RDR_INSUFFICIENT_MIXER_BUFFER = 57, + SST_INVALID_TIME_SLOTS = 58, }; enum dbg_mem_data_type { -- cgit v1.2.3-59-g8ed1b From 62877913ba55b3f2e5ac34dbc1a2975868ea8d25 Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Mon, 22 Nov 2010 10:33:51 +0000 Subject: Staging: sst: add ioctls for post processing algorithm interface This patch adds two new ioctls to intel_sst_ctrl device. This i/f can be used by application to send algorithm parameters Signed-off-by: Vinod Koul [This will need further discussion in the context of the final ALSA interface but is fine for staging, ie anyone who relies on it should expect changes Also fixed a missing kmalloc fail check] Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/intel_sst/intel_sst.c | 27 ++-- .../staging/intel_sst/intel_sst_app_interface.c | 143 +++++++++++++++++++++ drivers/staging/intel_sst/intel_sst_common.h | 2 +- drivers/staging/intel_sst/intel_sst_fw_ipc.h | 2 + drivers/staging/intel_sst/intel_sst_ioctl.h | 15 +-- drivers/staging/intel_sst/intel_sst_ipc.c | 49 +++++++ 6 files changed, 215 insertions(+), 23 deletions(-) (limited to 'drivers/staging/intel_sst/intel_sst_fw_ipc.h') diff --git a/drivers/staging/intel_sst/intel_sst.c b/drivers/staging/intel_sst/intel_sst.c index bd92549893a6..ce4a9f79ccd2 100644 --- a/drivers/staging/intel_sst/intel_sst.c +++ b/drivers/staging/intel_sst/intel_sst.c @@ -306,19 +306,19 @@ static int __devinit intel_sst_probe(struct pci_dev *pci, goto do_unmap_dram; pr_debug("Registered IRQ 0x%x\n", pci->irq); + /*Register LPE Control as misc driver*/ + ret = misc_register(&lpe_ctrl); + if (ret) { + pr_err("couldn't register control device\n"); + goto do_free_irq; + } + if (sst_drv_ctx->pci_id == SST_MRST_PCI_ID) { ret = misc_register(&lpe_dev); if (ret) { - pr_err("couldn't register LPE device\n"); - goto do_free_irq; - } - - /*Register LPE Control as misc driver*/ - ret = misc_register(&lpe_ctrl); - if (ret) { - pr_err("couldn't register misc driver\n"); - goto do_free_irq; - } + pr_err("couldn't register misc driver\n"); + goto do_free_misc; + } } sst_drv_ctx->lpe_stalled = 0; pm_runtime_set_active(&pci->dev); @@ -327,6 +327,8 @@ static int __devinit intel_sst_probe(struct pci_dev *pci, pr_debug("...successfully done!!!\n"); return ret; +do_free_misc: + misc_deregister(&lpe_ctrl); do_free_irq: free_irq(pci->irq, sst_drv_ctx); do_unmap_dram: @@ -371,10 +373,9 @@ static void __devexit intel_sst_remove(struct pci_dev *pci) mutex_lock(&sst_drv_ctx->sst_lock); sst_drv_ctx->sst_state = SST_UN_INIT; mutex_unlock(&sst_drv_ctx->sst_lock); - if (sst_drv_ctx->pci_id == SST_MRST_PCI_ID) { + misc_deregister(&lpe_ctrl); + if (sst_drv_ctx->pci_id == SST_MRST_PCI_ID) misc_deregister(&lpe_dev); - misc_deregister(&lpe_ctrl); - } free_irq(pci->irq, sst_drv_ctx); iounmap(sst_drv_ctx->dram); iounmap(sst_drv_ctx->iram); diff --git a/drivers/staging/intel_sst/intel_sst_app_interface.c b/drivers/staging/intel_sst/intel_sst_app_interface.c index 4b316ccab411..ce2c755a1766 100644 --- a/drivers/staging/intel_sst/intel_sst_app_interface.c +++ b/drivers/staging/intel_sst/intel_sst_app_interface.c @@ -827,6 +827,141 @@ static void sst_print_stream_params(struct snd_sst_get_stream_params *get_prm) return; } +/** + * sst_create_algo_ipc - create ipc msg for algorithm parameters + * + * @algo_params: Algorithm parameters + * @msg: post msg pointer + * + * This function is called to create ipc msg + */ +int sst_create_algo_ipc(struct snd_ppp_params *algo_params, + struct ipc_post **msg) +{ + if (sst_create_large_msg(msg)) + return -ENOMEM; + sst_fill_header(&(*msg)->header, + IPC_IA_ALG_PARAMS, 1, algo_params->str_id); + (*msg)->header.part.data = sizeof(u32) + + sizeof(*algo_params) + algo_params->size; + memcpy((*msg)->mailbox_data, &(*msg)->header, sizeof(u32)); + memcpy((*msg)->mailbox_data + sizeof(u32), + algo_params, sizeof(*algo_params)); + return 0; +} + +/** + * sst_send_algo_ipc - send ipc msg for algorithm parameters + * + * @msg: post msg pointer + * + * This function is called to send ipc msg + */ +int sst_send_algo_ipc(struct ipc_post **msg) +{ + sst_drv_ctx->ppp_params_blk.condition = false; + sst_drv_ctx->ppp_params_blk.ret_code = 0; + sst_drv_ctx->ppp_params_blk.on = true; + sst_drv_ctx->ppp_params_blk.data = NULL; + spin_lock(&sst_drv_ctx->list_spin_lock); + list_add_tail(&(*msg)->node, &sst_drv_ctx->ipc_dispatch_list); + spin_unlock(&sst_drv_ctx->list_spin_lock); + sst_post_message(&sst_drv_ctx->ipc_post_msg_wq); + return sst_wait_interruptible_timeout(sst_drv_ctx, + &sst_drv_ctx->ppp_params_blk, SST_BLOCK_TIMEOUT); +} + +/** + * intel_sst_ioctl_dsp - recieves the device ioctl's + * + * @cmd:Ioctl cmd + * @arg:data + * + * This function is called when a user space component + * sends a DSP Ioctl to SST driver + */ +long intel_sst_ioctl_dsp(unsigned int cmd, unsigned long arg) +{ + int retval = 0; + struct snd_ppp_params algo_params; + struct snd_ppp_params *algo_params_copied; + struct ipc_post *msg; + + switch (_IOC_NR(cmd)) { + case _IOC_NR(SNDRV_SST_SET_ALGO): + if (copy_from_user(&algo_params, (void __user *)arg, + sizeof(algo_params))) + return -EFAULT; + if (algo_params.size > SST_MAILBOX_SIZE) + return -EMSGSIZE; + + pr_debug("Algo ID %d Str id %d Enable %d Size %d\n", + algo_params.algo_id, algo_params.str_id, + algo_params.enable, algo_params.size); + retval = sst_create_algo_ipc(&algo_params, &msg); + if (retval) + break; + algo_params.reserved = 0; + if (copy_from_user(msg->mailbox_data + sizeof(algo_params), + algo_params.params, algo_params.size)) + return -EFAULT; + + retval = sst_send_algo_ipc(&msg); + if (retval) { + pr_debug("Error in sst_set_algo = %d\n", retval); + retval = -EIO; + } + break; + + case _IOC_NR(SNDRV_SST_GET_ALGO): + if (copy_from_user(&algo_params, (void __user *)arg, + sizeof(algo_params))) + return -EFAULT; + pr_debug("Algo ID %d Str id %d Enable %d Size %d\n", + algo_params.algo_id, algo_params.str_id, + algo_params.enable, algo_params.size); + retval = sst_create_algo_ipc(&algo_params, &msg); + if (retval) + break; + algo_params.reserved = 1; + retval = sst_send_algo_ipc(&msg); + if (retval) { + pr_debug("Error in sst_get_algo = %d\n", retval); + retval = -EIO; + break; + } + algo_params_copied = (struct snd_ppp_params *) + sst_drv_ctx->ppp_params_blk.data; + if (algo_params_copied->size > algo_params.size) { + pr_debug("mem insufficient to copy\n"); + retval = -EMSGSIZE; + goto free_mem; + } else { + char __user *tmp; + + if (copy_to_user(algo_params.params, + algo_params_copied->params, + algo_params_copied->size)) { + retval = -EFAULT; + goto free_mem; + } + tmp = (char __user *)arg + offsetof( + struct snd_ppp_params, size); + if (copy_to_user(tmp, &algo_params_copied->size, + sizeof(__u32))) { + retval = -EFAULT; + goto free_mem; + } + + } +free_mem: + kfree(algo_params_copied->params); + kfree(algo_params_copied); + break; + } + return retval; +} + /** * intel_sst_ioctl - receives the device ioctl's * @file_ptr:pointer to file @@ -1270,6 +1405,14 @@ free_iobufs: kfree(fw_info); break; } + case _IOC_NR(SNDRV_SST_GET_ALGO): + case _IOC_NR(SNDRV_SST_SET_ALGO): + if (minor != AM_MODULE) { + retval = -EBADRQC; + break; + } + retval = intel_sst_ioctl_dsp(cmd, arg); + break; default: retval = -EINVAL; } diff --git a/drivers/staging/intel_sst/intel_sst_common.h b/drivers/staging/intel_sst/intel_sst_common.h index e0c6339ca0ae..0a60e865b696 100644 --- a/drivers/staging/intel_sst/intel_sst_common.h +++ b/drivers/staging/intel_sst/intel_sst_common.h @@ -392,7 +392,7 @@ struct intel_sst_drv { struct stream_info streams[MAX_NUM_STREAMS]; struct stream_alloc_block alloc_block[MAX_ACTIVE_STREAM]; - struct sst_block tgt_dev_blk, fw_info_blk, + struct sst_block tgt_dev_blk, fw_info_blk, ppp_params_blk, vol_info_blk, mute_info_blk, hs_info_blk; struct mutex list_lock;/* mutex for IPC list locking */ spinlock_t list_spin_lock; /* mutex for IPC list locking */ diff --git a/drivers/staging/intel_sst/intel_sst_fw_ipc.h b/drivers/staging/intel_sst/intel_sst_fw_ipc.h index 75c187672450..8df313d10d2a 100644 --- a/drivers/staging/intel_sst/intel_sst_fw_ipc.h +++ b/drivers/staging/intel_sst/intel_sst_fw_ipc.h @@ -68,6 +68,8 @@ #define IPC_IA_CAPT_VOICE 0x17 #define IPC_IA_DECODE_FRAMES 0x18 +#define IPC_IA_ALG_PARAMS 0x1A + /* I2L Stream config/control msgs */ #define IPC_IA_ALLOC_STREAM 0x20 /* Allocate a stream ID */ #define IPC_IA_FREE_STREAM 0x21 /* Free the stream ID */ diff --git a/drivers/staging/intel_sst/intel_sst_ioctl.h b/drivers/staging/intel_sst/intel_sst_ioctl.h index 03b931619a3e..bebc395a3c1f 100644 --- a/drivers/staging/intel_sst/intel_sst_ioctl.h +++ b/drivers/staging/intel_sst/intel_sst_ioctl.h @@ -190,21 +190,15 @@ struct snd_prp_params { __u32 reserved; /* No pre-processing defined yet */ }; -struct snd_params_block { - __u32 type; /*Type of the parameter*/ - __u32 size; /*size of the parameters in the block*/ - __u8 params[0]; /*Parameters of the algorithm*/ -}; - /* Pre and post processing params structure */ struct snd_ppp_params { - enum sst_algo_types algo_id;/* Post/Pre processing algorithm ID */ + __u8 algo_id;/* Post/Pre processing algorithm ID */ __u8 str_id; /*Only 5 bits used 0 - 31 are valid*/ __u8 enable; /* 0= disable, 1= enable*/ __u8 reserved; __u32 size; /*Size of parameters for all blocks*/ - struct snd_params_block params[0]; -}; + void *params; +} __attribute__ ((packed)); struct snd_sst_postproc_info { __u32 src_min; /* Supported SRC Min sampling freq */ @@ -431,5 +425,8 @@ struct snd_sst_dbufs { #define SNDRV_SST_FW_INFO _IOR('L', 0x20, struct snd_sst_fw_info *) #define SNDRV_SST_SET_TARGET_DEVICE _IOW('L', 0x21, \ struct snd_sst_target_device *) +/*DSP Ioctls on /dev/intel_sst_ctrl only*/ +#define SNDRV_SST_SET_ALGO _IOW('L', 0x30, struct snd_ppp_params *) +#define SNDRV_SST_GET_ALGO _IOWR('L', 0x31, struct snd_ppp_params *) #endif /* __INTEL_SST_IOCTL_H__ */ diff --git a/drivers/staging/intel_sst/intel_sst_ipc.c b/drivers/staging/intel_sst/intel_sst_ipc.c index 5aa92ba9018c..0742dde2685d 100644 --- a/drivers/staging/intel_sst/intel_sst_ipc.c +++ b/drivers/staging/intel_sst/intel_sst_ipc.c @@ -336,6 +336,55 @@ void sst_process_reply(struct work_struct *work) wake_up(&sst_drv_ctx->wait_queue); } break; + case IPC_IA_ALG_PARAMS: { + pr_debug("sst:IPC_ALG_PARAMS response %x\n", msg->header.full); + pr_debug("sst: data value %x\n", msg->header.part.data); + pr_debug("sst: large value %x\n", msg->header.part.large); + + if (!msg->header.part.large) { + if (!msg->header.part.data) { + pr_debug("sst: alg set success\n"); + sst_drv_ctx->ppp_params_blk.ret_code = 0; + } else { + pr_debug("sst: alg set failed\n"); + sst_drv_ctx->ppp_params_blk.ret_code = + -msg->header.part.data; + } + + } else if (msg->header.part.data) { + struct snd_ppp_params *mailbox_params, *get_params; + char *params; + + pr_debug("sst: alg get success\n"); + mailbox_params = (struct snd_ppp_params *)msg->mailbox; + get_params = kzalloc(sizeof(*get_params), GFP_KERNEL); + if (get_params == NULL) { + pr_err("sst: out of memory for ALG PARAMS"); + break; + } + memcpy_fromio(get_params, mailbox_params, + sizeof(*get_params)); + get_params->params = kzalloc(mailbox_params->size, + GFP_KERNEL); + if (get_params->params == NULL) { + kfree(get_params); + pr_err("sst: out of memory for ALG PARAMS block"); + break; + } + params = msg->mailbox; + params = params + sizeof(*mailbox_params) - sizeof(u32); + memcpy_fromio(get_params->params, params, + get_params->size); + sst_drv_ctx->ppp_params_blk.ret_code = 0; + sst_drv_ctx->ppp_params_blk.data = get_params; + } + + if (sst_drv_ctx->ppp_params_blk.on == true) { + sst_drv_ctx->ppp_params_blk.condition = true; + wake_up(&sst_drv_ctx->wait_queue); + } + break; + } case IPC_IA_GET_FW_INFO: { struct snd_sst_fw_info *fw_info = (struct snd_sst_fw_info *)msg->mailbox; -- cgit v1.2.3-59-g8ed1b