From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Robin Gareus <robin@gareus.org>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, clemens@ladisch.de,
ffado-devel@lists.sf.net, Damien Zammit <damien.zammit@gmail.com>
Subject: Re: [PATCH 11/11] ALSA: digi00x: apply double-oh-three algorism to multiplex PCM samples
Date: Fri, 20 Mar 2015 07:46:20 +0900 [thread overview]
Message-ID: <550B51BC.80506@sakamocchi.jp> (raw)
In-Reply-To: <550AD65F.10803@gareus.org>
Robin and Damien,
On Mar 19 2015 22:59, Robin Gareus wrote:
> On 03/18/2015 02:06 AM, Takashi Sakamoto wrote:
>> Please explain the importance, especially the reason to include the
>> selector into kernel code instead of userspace application.
>
> Can one access the device from userspace while the kernel is using it to
> stream audio or midi ("Device or resource busy") ?
I can't understand what character devices you mention about. If you
mention about ALSA PCM character devices (usually
/dev/snd/pcmC%uD%d[p|c]), it's yes. In fact, one ALSA application can
use ALSA PCM character device for one direction (playback/capture). So
the access by any other applications causes -EBUSY. (here, I ignore
alsa-lib's PCM direct mixing layer.)
But, when you utilize kernel control functionality, the character device
is not PCM one, it's Control one (/dev/snd/controlC%u).
By the way, we can program any userspace application via FireWire
character device (/dev/fw*). Actually, I utilize firewire-request in
Linux FireWire utilities (former known as jujuutils), and write my own
I/O library, libhinawa.
Linux FireWire utilities
https://github.com/cladisch/linux-firewire-utils
libhinawa
http://mailman.alsa-project.org/pipermail/alsa-devel/2015-January/086969.html
For example, to control the clock selector of Digi 002/003 family, we
just execute this command with firewire-request.
$ ./firewire-request /dev/fw1 write 0xffffe0000118 0x0000000[0|1|2|3]
We can perform to control them from userspace.
> This is one of the reasons, why USB soundcards expose all settings
> though the alsa mixer interface. It also offers a standardized interface
> for userspace apps to build on top and a method to directly link mixer
> to soundcard for systems with multiple soundcards.
>
> How do you envisage to handle this?
These USB-connected sound devices basically tells their control
capabilities by USB descriptor information. This mechanism is
standardized and included in USB specification. Thus single parser has a
meaning.
On the other hand, IEEE 1394 bus-connected sound devices implements its
own way to tell their control capabilities and model-specific way to
perform control. Thus we should prepare for model-specific parsers. The
idea to include these parsers into kernel-space increases maintaining
efforts.
(Actually, USB-connected sound devices includes vendor-specific
interface. Such interfaces require own codes and snd-usb-audio includes
these code. You can see such codes in sound/usb/mixer_quirks.c and the
other USB Audio device class driver codes.)
In an aspect of user experience, I cannot find any differences between
using alsamixer (or amixer) and using specific-application. ALSA PCM
character devices, ALSA Control character devices and Linux FireWire
character devices are completely different and users don't mind the
differences. What the users' want is to control their physical devices,
to consider about to which character devices they access.
Regards
Takashi Sakamoto
next prev parent reply other threads:[~2015-03-19 22:46 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-15 16:00 [RFC][PATCH 00/11] digi00x: new driver for Digidesign 002/003 family Takashi Sakamoto
2015-03-15 16:00 ` [PATCH 01/11] ALSA: digi00x: add skelton for Digi 002/003 device driver Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 02/11] ALSA: digi00x: add streaming functionality Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 03/11] ALSA: digi00x: add proc node for clock status Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 04/11] ALSA: digi00x: add PCM functionality Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 05/11] ALSA: digi00x: add MIDI functionality Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 06/11] ALSA: digi00x: add hwdep interface Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 07/11] ALSA: digi00x: support unknown asynchronous message Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 08/11] ALSA: digi00x: support MIDI ports for device control Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 09/11] ALSA: firewire-lib: allows to implement external MIDI callback function Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 10/11] digi00x: improve MIDI capture/playback Takashi Sakamoto
2015-03-15 16:01 ` [PATCH 11/11] ALSA: digi00x: apply double-oh-three algorism to multiplex PCM samples Takashi Sakamoto
2015-03-16 11:39 ` Damien Zammit
2015-03-16 13:24 ` Takashi Sakamoto
2015-03-16 14:25 ` Robin Gareus
2015-03-16 16:25 ` Takashi Sakamoto
2015-03-16 17:13 ` Robin Gareus
2015-03-16 22:47 ` Takashi Sakamoto
2015-03-17 13:37 ` Robin Gareus
2015-03-17 13:49 ` Damien Zammit
2015-03-18 1:06 ` Takashi Sakamoto
2015-03-19 5:18 ` Damien Zammit
2015-03-19 13:59 ` Robin Gareus
2015-03-19 22:46 ` Takashi Sakamoto [this message]
2015-03-19 22:51 ` Takashi Sakamoto
2015-03-20 12:05 ` firewire mixer interface -- was " Robin Gareus
2015-03-20 13:00 ` Clemens Ladisch
2015-03-20 13:25 ` Takashi Sakamoto
2015-03-20 13:35 ` Takashi Iwai
2015-03-20 13:51 ` Takashi Sakamoto
2015-03-20 14:13 ` Takashi Iwai
2015-03-20 14:45 ` Takashi Sakamoto
2015-03-20 15:01 ` Takashi Iwai
2015-03-21 5:59 ` Damien Zammit
2015-03-22 2:55 ` Takashi Sakamoto
2015-03-22 5:56 ` [FFADO-devel] " Jonathan Woithe
2015-03-24 3:15 ` Robin Gareus
2015-03-20 13:55 ` Damien Zammit
2015-03-20 14:07 ` Clemens Ladisch
2015-03-22 6:11 ` [FFADO-devel] " Jonathan Woithe
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=550B51BC.80506@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=damien.zammit@gmail.com \
--cc=ffado-devel@lists.sf.net \
--cc=robin@gareus.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox