summaryrefslogtreecommitdiffstats
path: root/alsa.c
diff options
context:
space:
mode:
authorJames O'Shannessy <james.oshannessy@fiberdyne.com.au>2018-10-02 15:55:55 +1000
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-26 17:27:29 +1100
commit55d9a9f22aa909449925da9cb2e8de4d5a41bdfb (patch)
treef07b99a5b5955128e3a48aa25e3a2a97013eceb5 /alsa.c
parentbc249f293cab17c0dcde886fccc26deb0dfca33c (diff)
Loopback progress
Loopback currently reads from dma_area but the initial copy from playback to capture has not been implemented. Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
Diffstat (limited to 'alsa.c')
-rwxr-xr-xalsa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/alsa.c b/alsa.c
index e283794..44e0b15 100755
--- a/alsa.c
+++ b/alsa.c
@@ -32,10 +32,11 @@ static int pcm_constructor(struct snd_card *card)
for (i = 0; i < _driver->playback.devices; i++) {
CHK_ERR(snd_pcm_new(card,
_driver->playback.config[i].devicename, i,
- 1, 0, &pcm));
+ 1, 1, &pcm));
/** Register driver callbacks */
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &pcm_ops);
+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pcm_ops);
pcm->info_flags = 0;
strcpy(pcm->name, _driver->playback.config[i].devicename);
@@ -112,9 +113,8 @@ struct avirt_alsa_dev_group *avirt_alsa_get_dev_group(int direction)
switch (direction) {
case SNDRV_PCM_STREAM_PLAYBACK:
- return &_driver->playback;
case SNDRV_PCM_STREAM_CAPTURE:
- return &_driver->capture;
+ return &_driver->playback;
default:
pr_err("[%s] Direction must be SNDRV_PCM_STREAM_XXX!",
__func__);