All of lore.kernel.org
 help / color / mirror / Atom feed
From: sylvain.bertrand@gmail.com
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>
Subject: Re: right way to enumerate pcm devices
Date: Wed, 13 Feb 2019 22:25:18 +0000	[thread overview]
Message-ID: <20190213222518.GA974@freedom> (raw)
In-Reply-To: <20190213141328.GA358@freedom>

Ok, I think got it.

Jaroslav Kysela, thx for your intervention, actually my device does
not need fixing, it's a simple USB mic.

Takashi Iwai, ok, then it's actually the alsa-lib configuration system
which seems to be the problem, where the "bugs" should be squashed.

If I want to do the thing which I think it's right, then I would have to move
the "lines" between the user application'S' and the alsa-lib. Something
"middleground", nothing extreme like the excessively massive pulseaudio.

It boils down to how and how much the alsa-lib shares pcm devices among user
applications. I would beef up only the user applications sharing code, aka dmix
and dsnoop, and would move all the rest into the user application realm, aka
trashing almost everything else.

Each "hardware pcm" would get only 1 pcm device with integrated beefed up dmix
or dsnoop.

The "hardware fixing" would go into the kernel where I think it belongs.

As for a user application sharing policy, as I said, I would avoid the extreme
like the excessively massive pulseaudio, and would go for the middleground: the
first user application to program the pcm device does set the configuration of
it (channels,formats,etc). The other concurrent user applications
would have a way to know they were beaten in speed, and could be given the
chance to adapt (new return codes in current pcm api) to the current
configuration of the pcm device or take other action.

Access rights would be those from the file system. 

The beefed up dmix and dsnoop would expose as much as they can of the
underlying hw regarding what they can do (available mixing formats for dmix).
No more graph/chain of plugins which would be moved into the user
applications).

The configuration would be limited to THE default (maybe one for playback and
one for capture).

As for now, I would present to basic users the default pcms and filter out
anything else (at best, give a chance to input the pcm string of a specific pcm
for the most advanced basic users).

regards,

-- 
Sylvain

  parent reply	other threads:[~2019-02-13 22:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 12:33 right way to enumerate pcm devices sylvain.bertrand
2019-02-12 13:36 ` Takashi Iwai
2019-02-12 20:33   ` sylvain.bertrand
2019-02-13  6:25     ` Takashi Iwai
2019-02-13 14:13       ` sylvain.bertrand
2019-02-13 14:33         ` Takashi Iwai
2019-02-13 14:38         ` Jaroslav Kysela
2019-02-13 22:25         ` sylvain.bertrand [this message]
2019-02-13 22:43           ` sylvain.bertrand
     [not found]             ` <CA+Owze4OqfSystQ5ZNaF6sO+L-L-FceN5XBPJkqyYf7zjkp+GQ@mail.gmail.com>
2019-02-13 23:11               ` Fwd: " Joël Krähemann
2019-02-14 13:12                 ` sylvain.bertrand

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=20190213222518.GA974@freedom \
    --to=sylvain.bertrand@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.