|
@@ -935,17 +935,26 @@ void sst_fill_ssp_defaults(struct snd_soc_dai *dai)
|
|
|
int send_ssp_cmd(struct snd_soc_dai *dai, const char *id, bool enable)
|
|
|
{
|
|
|
struct sst_data *drv = snd_soc_dai_get_drvdata(dai);
|
|
|
- const struct sst_ssp_config *config;
|
|
|
+ int ssp_id;
|
|
|
|
|
|
dev_info(dai->dev, "Enter: enable=%d port_name=%s\n", enable, id);
|
|
|
|
|
|
+ if (strcmp(id, "ssp0-port") == 0)
|
|
|
+ ssp_id = SSP_MODEM;
|
|
|
+ else if (strcmp(id, "ssp2-port") == 0)
|
|
|
+ ssp_id = SSP_CODEC;
|
|
|
+ else {
|
|
|
+ dev_dbg(dai->dev, "port %s is not supported\n", id);
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
SST_FILL_DEFAULT_DESTINATION(drv->ssp_cmd.header.dst);
|
|
|
drv->ssp_cmd.header.command_id = SBA_HW_SET_SSP;
|
|
|
drv->ssp_cmd.header.length = sizeof(struct sst_cmd_sba_hw_set_ssp)
|
|
|
- sizeof(struct sst_dsp_header);
|
|
|
|
|
|
- config = &sst_ssp_configs;
|
|
|
- dev_dbg(dai->dev, "ssp_id: %u\n", config->ssp_id);
|
|
|
+ drv->ssp_cmd.selection = ssp_id;
|
|
|
+ dev_dbg(dai->dev, "ssp_id: %u\n", ssp_id);
|
|
|
|
|
|
if (enable)
|
|
|
drv->ssp_cmd.switch_state = SST_SWITCH_ON;
|