All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Peter Wurmsdobler <peter@wurmsdobler.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: ioctl request code for specific alsa control
Date: Wed, 14 May 2008 11:17:02 +0200	[thread overview]
Message-ID: <482AAE0E.1020509@ladisch.de> (raw)
In-Reply-To: <4829DE70.7050103@wurmsdobler.org>

Peter Wurmsdobler wrote:
> ...
> Another control is called pmic_control_op_sw (.name = "Master Output
> Playback Volume") and appears in amixer as "Master Output" (in fact it
> is not a volume control but a switch).

Then I'd guess its name should be "Master Playback Switch".
See Documentation/sound/alsa/ControlNames.txt.

> What is the ioctl request code for a particular snd_kcontrol_new_t
> defined in the driver?

ALSA controls do not have separate ioctl codes.  Controls are identified
by their name (or by their ID, which is a number that ALSA assigns
automatically).  There is one ioctl request that writes the value of a
control and which gets the control ID as parameter.

> Alternatively, how does the OSS layer in ALSA map the different ALSA
> controls to the predefined and fixed OSS controls?

The OSS API has some predefined mixer controls that are identifed by a
number or ioctl request.  By default, ALSA maps these OSS controls to
certain ALSA control names; see section "Mixer Elements" in
Documentation/sound/alsa/OSS-Emulation.txt.


HTH
Clemens

  reply	other threads:[~2008-05-14  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13 18:31 ioctl request code for specific alsa control Peter Wurmsdobler
2008-05-14  9:17 ` Clemens Ladisch [this message]
     [not found]   ` <482AB7A1.6090303@wurmsdobler.org>
2008-05-15  7:28     ` Clemens Ladisch
2008-05-16  9:16       ` Peter Wurmsdobler

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=482AAE0E.1020509@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=peter@wurmsdobler.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 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.