Improved sound support #291
Replies: 6 comments 8 replies
-
If somebody wants to contribute support for additional I2S-based sound devices, you are invited to send a pull request to be merged into the branch sound-improved. If you want to support more features than the currently provided in the class |
Beta Was this translation helpful? Give feedback.
-
Hello René, just a quick message to say thank you for the proposal and sorry for the late answer (still swamped lately). I should be able at some stage to contribute controllers for the FePi, The PiSound, and the MAX98090 codecs/boards. I'll probably need to modify the input/output selector API in the case where the user would like to use both line output and headphone output for example on the MAX98090. And probably to add things like jack detection. All in due time :) |
Beta Was this translation helpful? Give feedback.
-
Hello Rene, I am afraid I will not be able to work on this in the next few weeks :-/ |
Beta Was this translation helpful? Give feedback.
-
The branch sound-improved has been merged to develop. sound-improved will be removed. For users, who work with the develop branch, this has one important effect: All classes |
Beta Was this translation helpful? Give feedback.
-
Circle 45 is out with some improvements for the sound support. This is probably not the end of the development in this direction. Users are invited to contribute code for new codecs and features. |
Beta Was this translation helpful? Give feedback.
-
Great news thank you ! The first codec I'll implement is the venerable wm8731 - I need it relatively quickly for a project of mine :) |
Beta Was this translation helpful? Give feedback.
-
My suggested modifications to the sound API are on the branch sound-improved. I moved all sound related classes to include/circle/sound/ and lib/sound/. Please note that I used the term "sound" instead of "audio", when I started with adding sound drivers to Circle. This cannot be changed easily and should remain consistent.
There is a new class
CSoundController
, which represents an entity, which provides functions to control an audio stream, which is maintained by another class (e.g.CI2SSoundBaseDevice
). Hardware specific implementations ofCSoundController
(e.g.CPCM512xSoundController
) act on the I2C interface of the device and also provide a method for probing the existence of this device. The current declaration ofCSoundController
is only an example, and should be extended in several ways.The class
CSoundBaseDevice
got an additional virtual methodGetController()
, which returns a pointer to the sound controller for the respective class. Please note thatGetController()
can returnnullptr
, when there is no controller available (e.g. forCPWMSoundBaseDevice
or for PCM5102A I2S devices).As an example, I added a volume control via the MIDI CC event 7 to sample/29-miniorgan/. This is currently implemented and tested for PCM512x devices only. There is also a sound controller implemented for the class
CVCHIQSoundBaseDevice
in addon/vc4/sound/.What do you think about this?
Beta Was this translation helpful? Give feedback.
All reactions