mirror of https://github.com/thesofproject/sof.git
src/audio/volume.c: fix style
Make checkpatch happy Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This commit is contained in:
parent
59513055f4
commit
8d1af8e397
|
@ -58,12 +58,12 @@
|
||||||
*/
|
*/
|
||||||
static void vol_sync_host(struct comp_data *cd, uint32_t chan)
|
static void vol_sync_host(struct comp_data *cd, uint32_t chan)
|
||||||
{
|
{
|
||||||
if (cd->hvol == NULL)
|
if (!cd->hvol)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (chan < SOF_IPC_MAX_CHANNELS)
|
if (chan < SOF_IPC_MAX_CHANNELS) {
|
||||||
cd->hvol[chan].value = cd->volume[chan];
|
cd->hvol[chan].value = cd->volume[chan];
|
||||||
else {
|
} else {
|
||||||
trace_volume_error("vol_sync_host() error: "
|
trace_volume_error("vol_sync_host() error: "
|
||||||
"chan = %u < SOF_IPC_MAX_CHANNELS", chan);
|
"chan = %u < SOF_IPC_MAX_CHANNELS", chan);
|
||||||
}
|
}
|
||||||
|
@ -108,9 +108,9 @@ static uint64_t vol_work(void *data, uint64_t delay)
|
||||||
vol += VOL_RAMP_STEP;
|
vol += VOL_RAMP_STEP;
|
||||||
|
|
||||||
/* ramp completed ? */
|
/* ramp completed ? */
|
||||||
if (vol >= cd->tvolume[i] || vol >= cd->max_volume)
|
if (vol >= cd->tvolume[i] || vol >= cd->max_volume) {
|
||||||
vol_update(cd, i);
|
vol_update(cd, i);
|
||||||
else {
|
} else {
|
||||||
cd->volume[i] = vol;
|
cd->volume[i] = vol;
|
||||||
again = 1;
|
again = 1;
|
||||||
}
|
}
|
||||||
|
@ -184,14 +184,14 @@ static struct comp_dev *volume_new(struct sof_ipc_comp *comp)
|
||||||
|
|
||||||
dev = rzalloc(RZONE_RUNTIME, SOF_MEM_CAPS_RAM,
|
dev = rzalloc(RZONE_RUNTIME, SOF_MEM_CAPS_RAM,
|
||||||
COMP_SIZE(struct sof_ipc_comp_volume));
|
COMP_SIZE(struct sof_ipc_comp_volume));
|
||||||
if (dev == NULL)
|
if (!dev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
vol = (struct sof_ipc_comp_volume *)&dev->comp;
|
vol = (struct sof_ipc_comp_volume *)&dev->comp;
|
||||||
memcpy(vol, ipc_vol, sizeof(struct sof_ipc_comp_volume));
|
memcpy(vol, ipc_vol, sizeof(struct sof_ipc_comp_volume));
|
||||||
|
|
||||||
cd = rzalloc(RZONE_RUNTIME, SOF_MEM_CAPS_RAM, sizeof(*cd));
|
cd = rzalloc(RZONE_RUNTIME, SOF_MEM_CAPS_RAM, sizeof(*cd));
|
||||||
if (cd == NULL) {
|
if (!cd) {
|
||||||
rfree(dev);
|
rfree(dev);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -330,9 +330,9 @@ static int volume_ctrl_set_cmd(struct comp_dev *dev,
|
||||||
"channel = %u, value = %u",
|
"channel = %u, value = %u",
|
||||||
cdata->chanv[j].channel, cdata->chanv[j].value);
|
cdata->chanv[j].channel, cdata->chanv[j].value);
|
||||||
i = cdata->chanv[j].channel;
|
i = cdata->chanv[j].channel;
|
||||||
if ((i >= 0) && (i < SOF_IPC_MAX_CHANNELS))
|
if ((i >= 0) && (i < SOF_IPC_MAX_CHANNELS)) {
|
||||||
volume_set_chan(dev, i, cdata->chanv[j].value);
|
volume_set_chan(dev, i, cdata->chanv[j].value);
|
||||||
else {
|
} else {
|
||||||
trace_volume_error("volume_ctrl_set_cmd() "
|
trace_volume_error("volume_ctrl_set_cmd() "
|
||||||
"error: "
|
"error: "
|
||||||
"SOF_CTRL_CMD_VOLUME, "
|
"SOF_CTRL_CMD_VOLUME, "
|
||||||
|
|
Loading…
Reference in New Issue