All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uli Franke <uli.franke@weiss.ch>
To: alsa-devel@alsa-project.org
Cc: Daniel Weiss <weiss@weiss.ch>, Rolf Anderegg <rolf.anderegg@weiss.ch>
Subject: Constraints and hw_params with highly configurable HW
Date: Tue, 03 Sep 2013 17:45:31 +0200	[thread overview]
Message-ID: <5226041B.4010105@weiss.ch> (raw)

Hi everybody

We're currently working on some neat enhancements for the still
experimental snd_dice driver originally initiated by Clemens Ladisch. To
list some of the new and already working features:
 * firmware loading, backed by a user-space command line utility
 * generic ALSA control support for mostly all device specific settings
     for all our (i.e. Weiss Engineering) DICE based products
and last but not least
 * capture support
 * slave mode (external clock source support).

I'm currently debugging and fine-tuning things and that's where some
questions arose. The initial implementation of Clemens tried to fetch
all possible configurations of a device during probe in order to have
all combinations of rates and channels at hand when it comes to
formulate the constraints set within the ALSA pcm substream open
callback. That's a nice approach but will fail with a lot of devices as
their configurations can (and mostly will) be volatile. Our devices for
instance feature several switches, options and alike which have heavy
influence on the channel layout and sample rates and combination of both.

I consulted Takashi's documentation on constraints which suggests to
"use the source" but I couldn't find any similar situation within other
drivers (in case I should have missed something, just let me know of
course).

Therefore I had the idea to define some maximum constraints and let the
ALSA hw_params callback fail in case some settings or combinations are
determined to be not supported during its invocation.

Is this viable? Could this be/is this consistent with the specs? If yes,
would EINVAL an appropriate error code to return?

Regards
Uli

             reply	other threads:[~2013-09-03 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 15:45 Uli Franke [this message]
2013-09-03 17:58 ` Constraints and hw_params with highly configurable HW Clemens Ladisch
2013-09-04  9:42   ` Uli Franke
2013-09-05  8:47     ` Clemens Ladisch

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=5226041B.4010105@weiss.ch \
    --to=uli.franke@weiss.ch \
    --cc=alsa-devel@alsa-project.org \
    --cc=rolf.anderegg@weiss.ch \
    --cc=weiss@weiss.ch \
    /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.