drivers: audio: Port to the new timeout API
Port the I2S and DMIC drivers to the new timeout API so that they do not need to enable legacy timeouts. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
8e297e87b3
commit
9ba20dd48e
8 changed files with 20 additions and 15 deletions
|
@ -384,7 +384,7 @@ static int i2s_stm32_read(struct device *dev, void **mem_block, size_t *size)
|
|||
|
||||
if (dev_data->rx.state != I2S_STATE_ERROR) {
|
||||
ret = k_sem_take(&dev_data->rx.sem,
|
||||
K_MSEC(dev_data->rx.cfg.timeout));
|
||||
SYS_TIMEOUT_MS(dev_data->rx.cfg.timeout));
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
@ -410,7 +410,8 @@ static int i2s_stm32_write(struct device *dev, void *mem_block, size_t size)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
ret = k_sem_take(&dev_data->tx.sem, K_MSEC(dev_data->tx.cfg.timeout));
|
||||
ret = k_sem_take(&dev_data->tx.sem,
|
||||
SYS_TIMEOUT_MS(dev_data->tx.cfg.timeout));
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue