summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-03-01Refactor avirt_private_freeMark Farrugia2-13/+19
Explicitly define callback type, refactor name Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-03-01Update some helper scriptsMark Farrugia6-5/+11
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-02-14Update make-agl script to latest AGL SDKMark Farrugia1-1/+1
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-02-13Ensure number of channels in configfs is greater than 0Mark Farrugia1-1/+1
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-01-30Fix configure callback logging, tidy unused variablesMark Farrugia1-6/+6
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-01-29Check if card is sealed before attempting to map a streamhalibut_7.90.0halibut/7.90.07.90.0Mark Farrugia1-0/+5
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-01-29Rework setting the AVIRT map, and stream creationMark Farrugia4-43/+79
To ensure that a stream is able to change it's mapping (before card is sealed), we cannot create the stream PCM upon setting the mapping. This had to be reworked to allow multiple setting of the mapping if so required. The PCM ops table for a given stream is now allocated and stored in the snd_avirt_stream struct, to allow retrieval and manipulation upon mapping change. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-01-29Make snd_avirt_stream_get an exported functionMark Farrugia2-1/+10
Clean up logging Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-01-04Create PCM devices as soon as the AVIRT map is setguppy_6.99.4guppy/6.99.46.99.4Mark Farrugia3-12/+12
We no longer need to wait until the card is sealed to create the PCM device. We can create it right away. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-12-18Add check for channel count in pcm_openMark Farrugia1-0/+4
We need to ensure that this is not set to 0, otherwise audio will not work properly. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-12-17Make card discoverable at module loadguppy_6.99.3guppy/6.99.36.99.3Mark Farrugia1-6/+8
We can achieve this using the snd_device_register function Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-12-13Ensure that PCM callback 'close' is never NULLMark Farrugia1-1/+0
ALSA requires a 'close' callback. It does not have any checks internally to not call a NULL callback. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-12-13Add build script for AGL without XDSMark Farrugia3-72/+106
This adds the function to build with or without AGL XDS build system. Functionality is updated to work with vscode. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-28Add null check for supplied Audio Path PCM opsguppy_6.99.2guppy/6.99.26.99.2Mark Farrugia1-0/+6
This was not being checked, and resulted in kernel panic when null Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-23Clear LDFLAGS in Makefileguppy_6.99.1guppy/6.99.16.99.1Mark Farrugia2-1/+2
Need to set, otherwise there is an unrecognized option '-Wl,-01' Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-23Fix vmalloc failure for some platformsMark Farrugia1-5/+2
On the Intel minnowboard, vmalloc was failing for such a large amount of requested memory. We do not need to be requesting so much. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-23Remove rogue info printMark Farrugia1-2/+0
This print occurs on every trigger PCM callback - which is a lot! Need to remove, as it was originally only there for debugging Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-20Add missing return on errorMark Farrugia1-0/+2
If we return an error value from the callee, we need to return from to the caller immediately. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-20Ensure snd_avirt_private_free is not called if NULLMark Farrugia1-4/+4
We only want to call the snd_avirt_private_free callback if it is set. Some Audio Paths may only set the private data, and not the private free callback, so we need to accommodate for this. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-20Fix missing 'close' PCM callbackMark Farrugia1-0/+17
We need to have to close PCM callback set, otherwise we get a kernel crash when the PCM middle layer attempts to dereference a NULL pointer. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-13Rework PCM ops callback mechanismMark Farrugia6-240/+73
- Fix issues regarding PCM ops callbacks via AVIRT - As PCMs are created, the PCM ops are set according to the Audio Path's needs. A default PCM ops table is applied for all PCMs, which includes callbacks such as open, and hw_free, since AVIRT requires these for intermediate processing, whether or not a given Audio Path may need them. - Separate PCM ops into separate playback and capture ops tables Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-13Refactor/tidy snd_avirt_private_dataMark Farrugia3-10/+11
Make void* audiopath a struct and_avirt_audiopath, standardize naming in the struct Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-09Only call 'configure' cb if there are streams for Audio Pathflounder_6.0.2flounder/6.0.26.0.2Mark Farrugia1-5/+5
We only want to call the Audio Path 'configure' callback when there is at least 1 stream mapped to that Audio Path. Change the return of snd_avirt_streams_get to return the number of mapped streams for a given Audio Path. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-08Add private data structure to PCM for audio path managementJames O'Shannessy3-27/+87
Expand upon the private data structure currently used by avirt to allow audio paths to store own user data to PCM implementation. Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-11-02Transform AVIRT into platform driverMark Farrugia2-25/+64
Like aloop, we need to be able to find AVIRT by-path as platform-snd_avirt.0. The 4a-mixer uses this method to find cards. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-02Refactor some variables for better readabilityMark Farrugia2-10/+10
avirt_class can become avirt, SND_AVIRTUAL_DRIVER becomes SND_AVIRT_DRIVER Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-11-01Only expose streams mapped to audiopaths on configure() cbMark Farrugia5-101/+106
When the configure() callback occurs for each audiopath, we only want those streams that are mapped to the given audiopath to be exposed to the audiopath. E.g. only streams mapped to loopback should be propagated to loopback via configure() callback, rather than all streams. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-31Remove coreinfo, absorb version info into coreMark Farrugia5-28/+12
Since coreinfo only has version info, and this is not being used at all, we can absorb the version info into the private avirt_core structure. We could in future implement a function to retrieve the version, when, and if, it is required. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-30Fix debug print macroMark Farrugia1-1/+1
Missing blank quotations beside fmt Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-30Add modules and modules_install to MakefileMark Farrugia1-1/+7
This is required to build properly in Yocto Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-30Fix .vscode deploy tasksMark Farrugia1-1/+1
Change the name of the modules to reflect the new names Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-29Merge remote-tracking branch 'agl/master' into flounderMark Farrugia31-4/+3967
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Add missing changes after GitHub rebaseMark Farrugia1-2/+3
Some Usage doc changes Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Refactor alsa-pcm.c to pcm.cMark Farrugia2-2/+2
No need for alsa- prefix any longer Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Update .clang-formatMark Farrugia1-2/+2
This is taken from the mainline Linux kernel This is used for automatically formatting the source to Linus' strict standards Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Refactor all avirt_ symbols to have have snd prefix, as per Linux soundMark Farrugia16-313/+325
This will aid the eventual migration the the upstream mainline Linux kernel Fix some checkpatch warnings, and other compiler warnings Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Refactor core_internal.h to core.hMark Farrugia4-5/+5
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Optimize CHK_ macrosMark Farrugia2-17/+9
No need to be using kasprintf in a debug macro! Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Move system-leavel header to sound directoryMark Farrugia10-32/+30
Change include guards to reflect Linux sound driver format Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Remove unused MODULE_SUPPORTED_DEVICE macros, removed obsolete commentsMark Farrugia4-8/+9
Added debug macros for Dummy AP Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Reinstate temporarily removed PCM callbacksMark Farrugia1-4/+4
These can still be used, although proceed with caution when adding new Audio Paths. The copy_user PCM callback caused lots of strife when porting the loopback driver! Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Update license headersMark Farrugia6-51/+43
All license headers need to be uniform across AVIRT Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Fix module authors/descriptionsMark Farrugia3-8/+9
These need to be in the format the Linux expects, and uniform across AVIRT Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Add docs: Add architecture diagram for 4AMark Farrugia4-18/+38
Tidy other docs Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Update docs to include loopbackMark Farrugia3-4/+11
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Update documentationMark Farrugia4-16/+70
Add 'map' to configfs test, remove old mentions of module parameters Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Adding github preview extensions for vs codeJames O'Shannessy1-0/+1
Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Update README.mdJames O'Shannessy2-13/+14
Fix table of contents Markdown links Fixing whitespace problems in Markdown docs Fix alignment of table of contents Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Updating Introduction docJames O'Shannessy2-4/+18
Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Fixing table of contents in README documentationJames O'Shannessy5-1/+5
Restructure docs file tree Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>