Age | Commit message (Collapse) | Author | Files | Lines |
|
We do not need this wrapper function any longer,
can use snd_pcm_period_elapsed instead.
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Configfs interface for adding 'routes' is added, and allows two audio paths to chain together particular inputs/outputs, allowing for multistage audio driver handling.
A particular use-case is that of an ADSP driver. We can feed in audio to it, and capture the processed, and/or mixed, audio at it's output, and direct to another audio path driver, such as the UNICENS audio driver.
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Explicitly define callback type, refactor name
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
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>
|
|
Clean up logging
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
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>
|
|
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>
|
|
We can achieve this using the snd_device_register function
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
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>
|
|
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>
|
|
This was not being checked, and resulted in kernel panic when null
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Need to set, otherwise there is an unrecognized option '-Wl,-01'
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
- 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>
|
|
Make void* audiopath a struct and_avirt_audiopath, standardize
naming in the struct
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
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>
|
|
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>
|
|
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>
|
|
avirt_class can become avirt,
SND_AVIRTUAL_DRIVER becomes SND_AVIRT_DRIVER
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
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>
|
|
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>
|
|
Missing blank quotations beside fmt
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
This is required to build properly in Yocto
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Change the name of the modules to reflect the new names
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Some Usage doc changes
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
No need for alsa- prefix any longer
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
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>
|
|
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>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
No need to be using kasprintf in a debug macro!
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Change include guards to reflect Linux sound driver format
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Added debug macros for Dummy AP
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
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>
|
|
All license headers need to be uniform across AVIRT
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
These need to be in the format the Linux expects, and uniform across AVIRT
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Tidy other docs
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|
|
Add 'map' to configfs test, remove old mentions of module parameters
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
|