alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Hauke Krüger" <public-hk@ind.rwth-aachen.de>
To: alsa-devel@alsa-project.org
Subject: Alsa Application using the "default" plugin
Date: Sun, 7 Aug 2016 18:29:54 +0200	[thread overview]
Message-ID: <57A76202.9040304@ind.rwth-aachen.de> (raw)

Hi everyone,

I have created an ALSA audio application which works fine for any kind 
of hardware device (all devices addressed by "hw:n,m").

Today, I planned to implement the functionality to also address plugins. 
My test case is the "default" plugin.
When using this, I see significant differences:

1) Function "snd_pcm_hw_params_any" returns a value of 1. For hardware 
devices it returns 0. There is no documentation of the return type from 
that function. What does the 1 say?
2) I want to simultaneously capture and playback. Therefore I call 
"snd_pcm_link". This function fails with the error saying that this 
function is not implemented. Is that the intended behavior and how would 
I synchronize input and output? What I do to fix this is to start input 
and output ("snd_pcm_start") independently if "snd_pcm_link" fails.
3) The program stops working on the second call to "snd_pcm_writei": The 
function call simply never returns. I guess that the pcm output 
interface does not run at this moment and the output buffer has been 
completely filled before.

All other functions calls work as expected but the described behavior 
prevents the application from working properly. And - to repeat - the 
same code works for all hardware soundcards "hw:n,m" which I tested.

What is the recommended way to address the "default" plugin pcm device?

Best regards

Hauke

                 reply	other threads:[~2016-08-07 16:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57A76202.9040304@ind.rwth-aachen.de \
    --to=public-hk@ind.rwth-aachen.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).