Commit Graph

12 Commits

Author SHA1 Message Date
Masayuki Ishikawa
ae92afd250 drivers: audio: Fix cxd56_stop in cxd56.c
In the previous implementation, cxd56_stop() checked the internal
state before sending AUDIO_MSG_STOP to the message queue. However,
if the worker thread took time to turn on AMP, cxd560_stop() was
not able to send the message and caused a deadlock.

This commit fixes this issue by always sending AUDIO_MSG_STOP
regardless of the internal state.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-16 08:52:40 +02:00
Masayuki Ishikawa
958ddc1926 drivers: audio: Add a buffering feature to cxd56
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-10 09:11:15 -03:00
Masayuki Ishikawa
8a60cc01e2 drivers: audio: Send stop message when received the final buffer
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-10 09:11:15 -03:00
Tobias Johansson
368fbd0dea cxd56: Fix lock issue in Spresense audio driver
Replace semaphore with spinlock in the DMA buffer handling code
since it is called from an interrupt.
2020-06-05 19:50:27 +08:00
Masayuki Ishikawa
4b9886fa29 drivers: audio: Return -ENOTTY in xxx_ioctl() if not handled
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-05 12:02:33 +08:00
Tobias Johansson
f2c957144a cxd56: Add input support to Spresense audio driver
Add recording support to the Nuttx audio driver for Spresense.
- Supports 16 bit data with 48 kHz sample rate only for now.
- Supports 1 (dual mono) 2 or 4 channels.
- Only analog mics have been tested so digital is considered
  unsupported.
2020-05-08 07:18:22 -06:00
Tobias Johansson
79589eca1a cxd56: replace Sony return values
- Replace Sony error codes with standard ones where possible
- Unify error message and remove some unnecessary info prints
2020-04-21 17:19:52 -06:00
Tobias Johansson
ecc4939453 cxd56: fix volume setting and improve volume range
- Setting volume now works except when in paused state
- Volume range decreased to be a little more sane
2020-04-21 17:19:52 -06:00
Tobias Johansson
36e756a915 cxd56: add support for pause and resume
Implements pause and resume functionality
2020-04-21 17:19:52 -06:00
Tobias Johansson
7a83177419 cxd56: disable unused audio effects
Disables audio effects that are not currently in use.
Also fixes some minor indentation issues.
2020-04-21 17:19:52 -06:00
Alin Jerpelea
d9d720b296 audio: nxstyle fixes for core and drivers
nxstyle fixes for the audio core and drivers

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-21 17:19:52 -06:00
Tobias Johansson
57e8f0451a cxd56: add initial Nuttx audio driver
Adds an initial Nuttx audio driver supporting the Spresense CXD56.
Being a work in progress the driver has a number of limitations:
- Audio playback only, no recording yet.
- Only 16 bit stereo playback is supported.
- In practice only 48kHz playback is supported due to missing SRC.
- Configure driver in "Device Drivers --> Audio Device Support".
2020-04-16 12:50:05 -06:00