summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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>
2018-10-26Adding table of for contents for README documentationJames O'Shannessy1-10/+1
Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Updating build instructionsJames O'Shannessy4-106/+45
Cleaning up build instructions for building AVIRT Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Changes to readme filesJames O'Shannessy1-20/+4
Dot points to introduction, and shifting the build instructions to docs/2.\ Building.md Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Added load/unload documentation.James O'Shannessy1-0/+10
Updated documentation to use load/unload Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Committing usage documentJames O'Shannessy1-0/+70
Updated usage document with loading/unloading, configuration information Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Updating build instructionsJames O'Shannessy1-4/+20
Cleaning up build instructions for building AVIRT Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Changes to readme filesJames O'Shannessy2-0/+57
Dot points to introduction, and shifting the build instructions to docs/2.\ Building.md Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Add docs folder for in depth breakdown of module.James O'Shannessy3-0/+0
After discussion at AGL F2F, it was suggested to have simpler readmes that summarise the system/architecture/build process/etc. Starting to dotpoint out that process with these readmes. Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
2018-10-26Update VSC tasks, XDS confMark Farrugia2-74/+64
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Add working loopback implementation, helper scriptsMark Farrugia5-185/+1013
Reworked the original aloop implementation to have the PCM devices loop on themselves, and subscribe the the AVIRT system. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Fix DO_AUDIOPATH_CB, remove unused PCM cbs for nowMark Farrugia2-67/+51
We don't want to return inside the macro call necessarily. Some PCM cbs require differing return values. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Remove remaining blocksize associated calcsMark Farrugia1-4/+0
These should be done in the Audio Path Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Make Audio Path searching dynamic againMark Farrugia1-3/+3
Remove hardcoded test Audio Path UID, and use dynamic Audio Path UID Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Refactor avirt_card_register, move PCM creation to it.Mark Farrugia4-31/+56
When creating the PCMs we need information regarding the stream's mapping. For the loopback, we need to add both playback and capture substreams. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Add card to the configure callbackMark Farrugia2-4/+5
The loopback audio path might need to add it's own controls. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2018-10-26Refactor to use new DINFO macrosMark Farrugia4-30/+51
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>