On 8/27/2023 5:41 AM, Tim Hardisty wrote:
Or am I completely missing the point and I just need to use the nxaudio
system!!??
I think you have been missing point. You have two options:
1. As you suggest, extend nxaudio to be a source of tone data (just
like audio file data) and uses the audio subsystem to pas that
laong the audio chain as any other audio. Or
2. Create a character driver that wraps the audio_ops_s as a character
driver that can be directly accessed from applications. You could
use tone.c and a model to get started. This would not be part of the
OS audio system but a kludgy "bad" hanging to the side of the audio
subsystem. But simpler.
One thing that is certain is that you cannot open and use the audio
device interface directly from the application. Only via the audio
subsystem or via some hack custom logic.
That is equivalent to saying that you want to use the Ethernet driver
directly without going though the network layer. For the network layer,
you would use the raw socket interface to accomplish the same thing
without using the Ethernet driver directly.
We had the same kind of discussion about radios a few years back.
Capable radios are treated as network devices and support full TCP/UDP
communications. Less capable radios use simpler character drivers.
And, worse, some radios use both network and character drivers which
ends up being quite a mess.