-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable ALSA driver and System V IPC in Linux Kernel. For ALSA, the debug is enabled and will be removed once this commit is ready. Add description of descriptor chaining, yet need refactoring the description as well as code (exists uncertainty of the query struct). Succeed to initialize virtio-snd. Handle requests in control and TX queue, and print the address and length of each virtq element to check the validness of self-implement queue. For macOS, an experimental core audio library check is implemented. As the driver sends the PCM frames asynchronously, use a dedicated thread for receiving frames from driver. The reason that pcm_release state hangs is because of PulseAudio, need to address this later. Add ring buffer struct so that we don't need to allocate space frequently. However, the white noise produced by speaker-test does not come out.
- Loading branch information
Showing
14 changed files
with
1,509 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "cnfa"] | ||
path = cnfa | ||
url = https://github.com/cntools/cnfa | ||
shallow = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Create a mininal ALSA program | ||
define create-alsa-prog | ||
echo '\ | ||
#include <alsa/asoundlib.h>\n\ | ||
int main(){\n\ | ||
snd_pcm_t *pcm;\n\ | ||
snd_pcm_open(&pcm, "default", SND_PCM_STREAM_PLAYBACK, 0);\n\ | ||
snd_pcm_close(pcm);\n\ | ||
return 0;\n\ | ||
}\n' | ||
endef | ||
|
||
# Create a mininal Core Audio program | ||
define create-coreaudio-prog | ||
echo '\ | ||
#include <CoreAudio/CoreAudio.h>\n\ | ||
int main(){\n\ | ||
AudioComponent comp;\n\ | ||
comp = AudioComponentFindNext(NULL, &desc);\n\ | ||
if (comp == NULL) exit (-1);\n\ | ||
return 0;\n\ | ||
}\n' | ||
endef | ||
|
||
# Check ALSA installation | ||
define check-alsa | ||
$(shell $(call create-alsa-prog) | $(CC) -x c -lasound -o /dev/null > /dev/null 2> /dev/null - | ||
&& echo $$?) | ||
endef | ||
|
||
# Check Core Audio installation | ||
define check-coreaudio | ||
$(shell $(call create-coreaudio-prog) | $(CC) -x c -framework CoreAudio -o /dev/null > /dev/null 2> /dev/null - | ||
&& echo $$?) | ||
endef |
Oops, something went wrong.