All of lore.kernel.org
 help / color / mirror / Atom feed
* [lennart@poettering.net: Status of ALSA "simple" mixer interface]
@ 2007-11-20  0:51 Lennart Poettering
  2007-11-21 11:09 ` Takashi Iwai
                   ` (6 more replies)
  0 siblings, 7 replies; 37+ messages in thread
From: Lennart Poettering @ 2007-11-20  0:51 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

Hi!

A few days ago I sent the attached emails to Takashi and filed a
couple of bugs on the ALSA BTS. Takashi suggested to post these issues
on the ML as well, to allow public discussion. So, here we go.

The relevant bugs are:

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3570
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3569
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3568
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3572
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3571

Lennart

[-- Attachment #2: Type: message/rfc822, Size: 1342 bytes --]

From: Lennart Poettering <lennart@poettering.net>
To: Takashi Iwai <tiwai@suse.de>
Subject: Status of ALSA "simple" mixer interface
Date: Mon, 12 Nov 2007 01:31:30 +0100
Message-ID: <20071112003130.GA3266@tango.0pointer.de>

Hi!

/usr/include/alsa/mixer.h contains this comment:

   /* Simple (legacy) mixer elements API */

What does the "legacy" exactly mean? Shouldn't I be using it in new
code? I am currently looking for some way I can find out which PCM
channel for a stream on something like "surround51:0" maps to which
mixer element. How am I supposed to implement something like this
without stuff like the snd_mixer_selem_channel_id_t?

A second question: 

aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
usb webcam that only has a single mono channel.  What's going wrong?
Any idea where I should be looking?

Thanks,

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

[-- Attachment #3: Type: message/rfc822, Size: 8329 bytes --]

From: Lennart Poettering <lennart@poettering.net>
To: Takashi Iwai <tiwai@suse.de>
Subject: Re: Status of ALSA "simple" mixer interface
Date: Tue, 13 Nov 2007 17:56:46 +0100
Message-ID: <20071113165646.GA735@tango.0pointer.de>

On Tue, 13.11.07 12:28, Takashi Iwai (tiwai@suse.de) wrote:

Hi!

> > aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
> > usb webcam that only has a single mono channel.  What's going wrong?
> > Any idea where I should be looking?
> 
> I guess it's C-Media one?  Its controller accepts only 8-channel
> interleaved output even if the hardware supports only less channels.
> Perhaps to save a few cent for the controller chip.

It's a cheap Philips webcam which really has only a single channel. If
I try to open the device with "arecord", i get:

<snip>
$ arecord -D surround71:CARD=U0x4710x311,DEV=0  -r 44100 -c 8 -f s16_le
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Channels 8
arecord: set_params:879: Broken configuration for this PCM: no configurations available
</snip>

i.e. the device string that arecord -L lists for the device is not
working at all. Actually, speaking of it, on my machine with 5 sound
devices "aplay/arecord -L" generate almost exclusively total
rubbish -- only for one device the list makes sense. Here's the 
full list:

<snip>
$ aplay -L | grep -v "^ "
front:CARD=AudioPCI,DEV=0
surround40:CARD=AudioPCI,DEV=0
iec958:CARD=AudioPCI,DEV=0
null
front:CARD=V8237,DEV=0
surround40:CARD=V8237,DEV=0
surround41:CARD=V8237,DEV=0
surround50:CARD=V8237,DEV=0
surround51:CARD=V8237,DEV=0
iec958:CARD=V8237,DEV=0
surround41:CARD=U0x4710x311,DEV=0
surround50:CARD=U0x4710x311,DEV=0
surround51:CARD=U0x4710x311,DEV=0
surround71:CARD=U0x4710x311,DEV=0
surround41:CARD=Audio,DEV=0
surround50:CARD=Audio,DEV=0
surround51:CARD=Audio,DEV=0
surround71:CARD=Audio,DEV=0
</snip>

And this is the output of "arecord -L":

<snip>
$ arecord -L | grep -v "^ "
front:CARD=AudioPCI,DEV=0
rear:CARD=AudioPCI,DEV=0
surround40:CARD=AudioPCI,DEV=0
iec958:CARD=AudioPCI,DEV=0
null
front:CARD=V8237,DEV=0
surround40:CARD=V8237,DEV=0
surround41:CARD=V8237,DEV=0
surround50:CARD=V8237,DEV=0
surround51:CARD=V8237,DEV=0
iec958:CARD=V8237,DEV=0
surround41:CARD=Audio,DEV=0
surround50:CARD=Audio,DEV=0
surround51:CARD=Audio,DEV=0
surround71:CARD=Audio,DEV=0
</snip>

For comparison, here's what /proc/asound/pcm contains:

<snip>
00-01: ES1371/2 : ES1371 DAC1 : playback 1
00-00: ES1371/1 : ES1371 DAC2/ADC : playback 1 : capture 1
01-01: VIA 8237 : VIA 8237 : playback 1 : capture 1
01-00: VIA 8237 : VIA 8237 : playback 4 : capture 1
02-01: Bt87x Analog : Bt87x Analog : capture 1
02-00: Bt87x Digital : Bt87x Digital : capture 1
03-00: USB Audio : USB Audio : capture 1
04-00: USB Audio : USB Audio : playback 1 : capture 1
</snip>

First of all, the -L lists miss one device: my Bt878 tv card. It's
hwoever shown properly in /proc/asound/pcm, and works fine if
accessed.

Then, as mentioned above, it lists the mono-only webcam (U0x4710x311)
with the four surround suggestions -- which doesn't make any sense at
all. And only on "aplay -L" -- although it is a record only
channel. If I try to open the audio device with any of the four
suggestions I just get the "configuration error" back that is shown
above. The way to open it is "hw:CARD=U0x4710x311,DEV=0" -- and
of course only with arecord.

Then, it doesn't list either "front:" nor "iec958" for my USB surround
sound card (The one listed as "Audio") -- both of which happen to work
fine. However, it does list "surround71:", which is quite surprising,
since the sound card doesn't have that many output ports -- but I
guess that is one of the cases where the hardware just doesn't have
soldered all outputs the device theoretically supports. Opening the
device as surround71: works fine, BTW.

Then, for the "AudioPCI" card, it lists a "surround40:" device, which
when opened just yields:

<snip>
$ aplay -D surround40:CARD=AudioPCI,DEV=0
ALSA lib setup.c:555:(add_elem) Cannot obtain info for CTL elem (MIXER,'AC97 2ch->4ch Copy Switch',0,0,0): No such file or directory
aplay: main:546: audio open error: No such file or directory
</snip>

And it also lists a "iec958" device for the same "AudioPCI", which
just yields this:

<snip>
$ aplay -D iec958:CARD=AudioPCI,DEV=0
ALSA lib setup.c:555:(add_elem) Cannot obtain info for CTL elem (PCM,'IEC958 Playback PCM Stream',0,0,0): No such file or directory
aplay: main:546: audio open error: No such file or directory
</snip>

The hardware has no SPDIF and is stereo only.

And then, surprisingly it lists a "rear:" device -- but only for
recording (!). Not surprisingly, this one doesn't work either.

The devices listed for the V8237 are the only ones which fully work
and are complete.

So, in summary. For the five audio cards I have connected to my
machine, "aplay -L" and "arecord -L" show 11 device hints that don't
work at all. And it misses 6 device hints that are important.

I am not sure what to make of this, besides that the name hinting
system is just badly broken. 

This is alsa-lib 1.0.15 on kernel 2.6.22, btw.

Five more things I am wondering about, though:

1) Wouldn't it make sense to have a "mono:" device similar to the
   other surround/front/rear devices? The single use case would be the
   mono-only usb webcam I mentioned above.

2) If I understood correctly, then on some devices it is possible to
   open a analog output and a SPDIF output simultaneously and
   independently. On others however, they are exclusive to each
   other. The name hinting system doesn't really distuinguish
   those cases. Any idea how I could detect this? The reason is, I'd like to
   open both SPDIF and analog out in PulseAudio at the same time -- if
   it is possible. If it is not I want to give the user a quick way to
   switch the outputs.

3) Some newer soundcards lack a hw volume control if I understood
   correctly. Unfortunately I don't have access to them myself. But
   apparently if PulseAudio is run on those devices, volume control in
   PulseAudio doesn't work at all. Apparently ALSA uses softvol to add
   a software volume control (attenuation) to the mixer on those
   soundcards. PA finds that control and makes use of it -- however,
   since it accesses the PCM via the raw devices (hw:, surround41: and
   so on) softvol doesn't work: i.e. the volume that people can change
   through the PA mixer is not reflected in any way in the audio
   output.

   Now, is there a way I can detect for a mixer element if it is
   "real" or if it is implemented only for the "plughw" PCM? As it
   seems the "hw:0" mixer device does contain "virtual" tracks, isn't that a
   bit strange? Shouldn't the virtual mixer tracks be available only
   in a mixer device "plughw:0"? That at least would be symmetric to
   the PCM case, wouldn't it?

4) If I open an audio device with "plughw:" i can disable the software
   resampling that takes place via
   "snd_pcm_hw_params_get_rate_resample()". However, there is no
   equivalent for disabling the channel number adjustment or the
   sample format conversion. This would be very useful in PA however,
   since this would allow me to use only the parts of plughw I am
   interested in (softvol), and disable all the rest (resampling,
   conversion, channel remixing).

5) I really dislike the fact that ALSA insists to do the channel
   reordering for me if I access the audio device via
   "surround51:". In the interest of having the shortest pipeline
   possible with no redundant steps in PA, I'd prefer if I could open
   the device as hw:0, and query the suggested channel ordering of the
   HW, instead of always having ALSA around doing the rearranging.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

[-- Attachment #4: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [lennart@poettering.net: Status of ALSA "simple" mixer interface]
  2007-11-20  0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
@ 2007-11-21 11:09 ` Takashi Iwai
  2007-11-21 11:11 ` Takashi Iwai
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 11:09 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel

At Tue, 20 Nov 2007 01:51:51 +0100,
Lennart Poettering wrote:
> 
> Hi!
> 
> A few days ago I sent the attached emails to Takashi and filed a
> couple of bugs on the ALSA BTS. Takashi suggested to post these issues
> on the ML as well, to allow public discussion. So, here we go.
> 
> The relevant bugs are:
> 
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3570
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3569
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3568
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3572
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3571

Thanks.  Let's work on them in traditional tactics, divide and
conquer.  Here, the first one:


> /usr/include/alsa/mixer.h contains this comment:
> 
>    /* Simple (legacy) mixer elements API */
> 
> What does the "legacy" exactly mean? Shouldn't I be using it in new
> code? I am currently looking for some way I can find out which PCM
> channel for a stream on something like "surround51:0" maps to which
> mixer element. How am I supposed to implement something like this
> without stuff like the snd_mixer_selem_channel_id_t?

The "legacy" here seems to mean a legacy-style mixer elements API, not
as a deprecated API.  The abstraction is done for the playback/capture
volumes and switches and channels are re-composed to match with the
traditional channel setting.  In the earlier version, it had no enum
controls, too.

The mapping between the mixer element and the PCM element is a missing
piece, together with the PCM channel mapping.  I think we'll be able
to implement both features together.


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [lennart@poettering.net: Status of ALSA "simple" mixer interface]
  2007-11-20  0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
  2007-11-21 11:09 ` Takashi Iwai
@ 2007-11-21 11:11 ` Takashi Iwai
  2007-11-21 15:23   ` Clemens Ladisch
  2007-11-21 11:14 ` Mono device definition Takashi Iwai
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 11:11 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel, clemens

At Tue, 20 Nov 2007 01:51:51 +0100,
Lennart Poettering wrote:
> 
> A second question: 
> 
> aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
> usb webcam that only has a single mono channel.  What's going wrong?
> Any idea where I should be looking?

Since it's a USB device, maybe Clemens has a better clue...

> To: Takashi Iwai <tiwai@suse.de>
> Subject: Re: Status of ALSA "simple" mixer interface
> From: Lennart Poettering <lennart@poettering.net>
> Date: Tue, 13 Nov 2007 17:56:46 +0100
> Message-ID: <20071113165646.GA735@tango.0pointer.de>
> MIME-Version: 1.0
> Content-Disposition: inline
> In-Reply-To: <s5habpiv0z2.wl%tiwai@suse.de>
> Organization: Red Hat, Inc.
> User-Agent: Leviathan/19.8.0 zh (Cray 3; I; Solaris 4.711; Console)
> 
> On Tue, 13.11.07 12:28, Takashi Iwai (tiwai@suse.de) wrote:
> 
> Hi!
> 
> > > aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
> > > usb webcam that only has a single mono channel.  What's going wrong?
> > > Any idea where I should be looking?
> > 
> > I guess it's C-Media one?  Its controller accepts only 8-channel
> > interleaved output even if the hardware supports only less channels.
> > Perhaps to save a few cent for the controller chip.
> 
> It's a cheap Philips webcam which really has only a single channel. If
> I try to open the device with "arecord", i get:
> 
> <snip>
> $ arecord -D surround71:CARD=U0x4710x311,DEV=0  -r 44100 -c 8 -f s16_le
> Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Channels 8
> arecord: set_params:879: Broken configuration for this PCM: no configurations available
> </snip>
> 
> i.e. the device string that arecord -L lists for the device is not
> working at all. Actually, speaking of it, on my machine with 5 sound
> devices "aplay/arecord -L" generate almost exclusively total
> rubbish -- only for one device the list makes sense. Here's the 
> full list:
> 
> <snip>
> $ aplay -L | grep -v "^ "
> front:CARD=AudioPCI,DEV=0
> surround40:CARD=AudioPCI,DEV=0
> iec958:CARD=AudioPCI,DEV=0
> null
> front:CARD=V8237,DEV=0
> surround40:CARD=V8237,DEV=0
> surround41:CARD=V8237,DEV=0
> surround50:CARD=V8237,DEV=0
> surround51:CARD=V8237,DEV=0
> iec958:CARD=V8237,DEV=0
> surround41:CARD=U0x4710x311,DEV=0
> surround50:CARD=U0x4710x311,DEV=0
> surround51:CARD=U0x4710x311,DEV=0
> surround71:CARD=U0x4710x311,DEV=0
> surround41:CARD=Audio,DEV=0
> surround50:CARD=Audio,DEV=0
> surround51:CARD=Audio,DEV=0
> surround71:CARD=Audio,DEV=0
> </snip>
> 
> And this is the output of "arecord -L":
> 
> <snip>
> $ arecord -L | grep -v "^ "
> front:CARD=AudioPCI,DEV=0
> rear:CARD=AudioPCI,DEV=0
> surround40:CARD=AudioPCI,DEV=0
> iec958:CARD=AudioPCI,DEV=0
> null
> front:CARD=V8237,DEV=0
> surround40:CARD=V8237,DEV=0
> surround41:CARD=V8237,DEV=0
> surround50:CARD=V8237,DEV=0
> surround51:CARD=V8237,DEV=0
> iec958:CARD=V8237,DEV=0
> surround41:CARD=Audio,DEV=0
> surround50:CARD=Audio,DEV=0
> surround51:CARD=Audio,DEV=0
> surround71:CARD=Audio,DEV=0
> </snip>
> 
> For comparison, here's what /proc/asound/pcm contains:
> 
> <snip>
> 00-01: ES1371/2 : ES1371 DAC1 : playback 1
> 00-00: ES1371/1 : ES1371 DAC2/ADC : playback 1 : capture 1
> 01-01: VIA 8237 : VIA 8237 : playback 1 : capture 1
> 01-00: VIA 8237 : VIA 8237 : playback 4 : capture 1
> 02-01: Bt87x Analog : Bt87x Analog : capture 1
> 02-00: Bt87x Digital : Bt87x Digital : capture 1
> 03-00: USB Audio : USB Audio : capture 1
> 04-00: USB Audio : USB Audio : playback 1 : capture 1
> </snip>
> 
> First of all, the -L lists miss one device: my Bt878 tv card. It's
> hwoever shown properly in /proc/asound/pcm, and works fine if
> accessed.
> 
> Then, as mentioned above, it lists the mono-only webcam (U0x4710x311)
> with the four surround suggestions -- which doesn't make any sense at
> all. And only on "aplay -L" -- although it is a record only
> channel. If I try to open the audio device with any of the four
> suggestions I just get the "configuration error" back that is shown
> above. The way to open it is "hw:CARD=U0x4710x311,DEV=0" -- and
> of course only with arecord.
> 
> Then, it doesn't list either "front:" nor "iec958" for my USB surround
> sound card (The one listed as "Audio") -- both of which happen to work
> fine. However, it does list "surround71:", which is quite surprising,
> since the sound card doesn't have that many output ports -- but I
> guess that is one of the cases where the hardware just doesn't have
> soldered all outputs the device theoretically supports. Opening the
> device as surround71: works fine, BTW.
> 
> Then, for the "AudioPCI" card, it lists a "surround40:" device, which
> when opened just yields:
> 
> <snip>
> $ aplay -D surround40:CARD=AudioPCI,DEV=0
> ALSA lib setup.c:555:(add_elem) Cannot obtain info for CTL elem (MIXER,'AC97 2ch->4ch Copy Switch',0,0,0): No such file or directory
> aplay: main:546: audio open error: No such file or directory
> </snip>
> 
> And it also lists a "iec958" device for the same "AudioPCI", which
> just yields this:
> 
> <snip>
> $ aplay -D iec958:CARD=AudioPCI,DEV=0
> ALSA lib setup.c:555:(add_elem) Cannot obtain info for CTL elem (PCM,'IEC958 Playback PCM Stream',0,0,0): No such file or directory
> aplay: main:546: audio open error: No such file or directory
> </snip>
> 
> The hardware has no SPDIF and is stereo only.
> 
> And then, surprisingly it lists a "rear:" device -- but only for
> recording (!). Not surprisingly, this one doesn't work either.
> 
> The devices listed for the V8237 are the only ones which fully work
> and are complete.
> 
> So, in summary. For the five audio cards I have connected to my
> machine, "aplay -L" and "arecord -L" show 11 device hints that don't
> work at all. And it misses 6 device hints that are important.
> 
> I am not sure what to make of this, besides that the name hinting
> system is just badly broken. 
> 
> This is alsa-lib 1.0.15 on kernel 2.6.22, btw.


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Mono device definition
  2007-11-20  0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
  2007-11-21 11:09 ` Takashi Iwai
  2007-11-21 11:11 ` Takashi Iwai
@ 2007-11-21 11:14 ` Takashi Iwai
  2007-11-21 11:20 ` Analog-SPDIF dup Takashi Iwai
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 11:14 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel

At Tue, 20 Nov 2007 01:51:51 +0100,
Lennart Poettering wrote:
> 
> Five more things I am wondering about, though:
> 
> 1) Wouldn't it make sense to have a "mono:" device similar to the
>    other surround/front/rear devices? The single use case would be the
>    mono-only usb webcam I mentioned above.

Hm, I don't think it's so useful since "mono" channel itself is not so
common.  The usefulness of "front" or "rear" is that the definition is
relatively clear.  But "mono" has no clear definition what it should
be.

The addition of this new defintion would be easy, though...


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Analog-SPDIF dup
  2007-11-20  0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
                   ` (2 preceding siblings ...)
  2007-11-21 11:14 ` Mono device definition Takashi Iwai
@ 2007-11-21 11:20 ` Takashi Iwai
  2007-11-21 11:22 ` Softvol controls Takashi Iwai
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 11:20 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel

At Tue, 20 Nov 2007 01:51:51 +0100,
Lennart Poettering wrote:
> 
> 2) If I understood correctly, then on some devices it is possible to
>    open a analog output and a SPDIF output simultaneously and
>    independently. On others however, they are exclusive to each
>    other. The name hinting system doesn't really distuinguish
>    those cases. Any idea how I could detect this? The reason is, I'd like to
>    open both SPDIF and analog out in PulseAudio at the same time -- if
>    it is possible. If it is not I want to give the user a quick way to
>    switch the outputs.

There is no 100% certain way, so far.  A practical way would be to
open analog then SPDIF PCMs at the same time with non-blocking mode.
If both can be opened, it's likely non-duplicated one.

Or, we can change the "default" PCM to always output both.  Not sure
whether it's a good change, though.  But usually SPDIF output can be
turned off via a mixer switch, so this wouldn't be a big problem (I
hope).


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Softvol controls
  2007-11-20  0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
                   ` (3 preceding siblings ...)
  2007-11-21 11:20 ` Analog-SPDIF dup Takashi Iwai
@ 2007-11-21 11:22 ` Takashi Iwai
  2007-11-29 23:28   ` Lennart Poettering
  2007-11-21 11:40 ` Disable conversions Takashi Iwai
  2007-11-21 11:42 ` Channel mapping Takashi Iwai
  6 siblings, 1 reply; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 11:22 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel

At Tue, 20 Nov 2007 01:51:51 +0100,
Lennart Poettering wrote:
> 
> 3) Some newer soundcards lack a hw volume control if I understood
>    correctly. Unfortunately I don't have access to them myself. But
>    apparently if PulseAudio is run on those devices, volume control in
>    PulseAudio doesn't work at all. Apparently ALSA uses softvol to add
>    a software volume control (attenuation) to the mixer on those
>    soundcards. PA finds that control and makes use of it -- however,
>    since it accesses the PCM via the raw devices (hw:, surround41: and
>    so on) softvol doesn't work: i.e. the volume that people can change
>    through the PA mixer is not reflected in any way in the audio
>    output.
> 
>    Now, is there a way I can detect for a mixer element if it is
>    "real" or if it is implemented only for the "plughw" PCM? As it
>    seems the "hw:0" mixer device does contain "virtual" tracks, isn't that a
>    bit strange? Shouldn't the virtual mixer tracks be available only
>    in a mixer device "plughw:0"? That at least would be symmetric to
>    the PCM case, wouldn't it?

Check snd_ctl_elem_info_is_user().  All softvol controls are
implemented as user elements.


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Disable conversions
  2007-11-20  0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
                   ` (4 preceding siblings ...)
  2007-11-21 11:22 ` Softvol controls Takashi Iwai
@ 2007-11-21 11:40 ` Takashi Iwai
  2007-11-21 14:29   ` Takashi Iwai
  2007-11-25 20:41   ` Lennart Poettering
  2007-11-21 11:42 ` Channel mapping Takashi Iwai
  6 siblings, 2 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 11:40 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel

At Tue, 20 Nov 2007 01:51:51 +0100,
Lennart Poettering wrote:
> 
> 4) If I open an audio device with "plughw:" i can disable the software
>    resampling that takes place via
>    "snd_pcm_hw_params_get_rate_resample()". However, there is no
>    equivalent for disabling the channel number adjustment or the
>    sample format conversion. This would be very useful in PA however,
>    since this would allow me to use only the parts of plughw I am
>    interested in (softvol), and disable all the rest (resampling,
>    conversion, channel remixing).

Hmm..  It's a bit difficult to implement in a clean way.
For example, what would be the reason to disable softvol?  It's
basically irrelevant with the PCM parameters.  It's added just because
of lack of hardware volume controls.

One idea I have is to make an API like

	snd_pcm_alias_plugin(src, dst);

For example,

	snd_pcm_alias_plugin("softvol", "passthru");

would take passthru plugin instead of softvol plugin.
(Suppose passthru plugin as a simply pass-through plugin to its
 slave.pcm)


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Channel mapping
  2007-11-20  0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
                   ` (5 preceding siblings ...)
  2007-11-21 11:40 ` Disable conversions Takashi Iwai
@ 2007-11-21 11:42 ` Takashi Iwai
  2007-11-21 15:17   ` Clemens Ladisch
  6 siblings, 1 reply; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 11:42 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel

At Tue, 20 Nov 2007 01:51:51 +0100,
Lennart Poettering wrote:
> 
> 5) I really dislike the fact that ALSA insists to do the channel
>    reordering for me if I access the audio device via
>    "surround51:". In the interest of having the shortest pipeline
>    possible with no redundant steps in PA, I'd prefer if I could open
>    the device as hw:0, and query the suggested channel ordering of the
>    HW, instead of always having ALSA around doing the rearranging.

Yes, querying channel mapping is another missing piece with popular
demand.

The implementation would be easy, I guess.  But we have to define the
way to inform this from kernel to user space: whether create a new
ioctl or extend the existing ones (if possible)...


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Disable conversions
  2007-11-21 11:40 ` Disable conversions Takashi Iwai
@ 2007-11-21 14:29   ` Takashi Iwai
  2007-11-21 15:16     ` Jaroslav Kysela
  2007-11-25 20:41   ` Lennart Poettering
  1 sibling, 1 reply; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 14:29 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel

At Wed, 21 Nov 2007 12:40:54 +0100,
I wrote:
> 
> At Tue, 20 Nov 2007 01:51:51 +0100,
> Lennart Poettering wrote:
> > 
> > 4) If I open an audio device with "plughw:" i can disable the software
> >    resampling that takes place via
> >    "snd_pcm_hw_params_get_rate_resample()". However, there is no
> >    equivalent for disabling the channel number adjustment or the
> >    sample format conversion. This would be very useful in PA however,
> >    since this would allow me to use only the parts of plughw I am
> >    interested in (softvol), and disable all the rest (resampling,
> >    conversion, channel remixing).
> 
> Hmm..  It's a bit difficult to implement in a clean way.
> For example, what would be the reason to disable softvol?  It's
> basically irrelevant with the PCM parameters.  It's added just because
> of lack of hardware volume controls.
> 
> One idea I have is to make an API like
> 
> 	snd_pcm_alias_plugin(src, dst);
> 
> For example,
> 
> 	snd_pcm_alias_plugin("softvol", "passthru");
> 
> would take passthru plugin instead of softvol plugin.
> (Suppose passthru plugin as a simply pass-through plugin to its
>  slave.pcm)

The below is an experimental patch.  We have already "empty" plugin
as passthru.  So, call
	snd_pcm_alias_plugin("softvol", "empty");
before snd_pcm_open() to suppress the softvol in all configs.


Takashi

diff -r 3539f279ec38 include/pcm.h
--- a/include/pcm.h	Wed Nov 21 12:19:43 2007 +0100
+++ b/include/pcm.h	Wed Nov 21 16:03:51 2007 +0100
@@ -935,6 +935,7 @@ int snd_pcm_areas_copy(const snd_pcm_cha
 int snd_pcm_areas_copy(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
 		       const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset,
 		       unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
+	int snd_pcm_alias_plugin(const char *plugin, const char *target);
 
 /** \} */
 
diff -r 3539f279ec38 src/pcm/pcm.c
--- a/src/pcm/pcm.c	Wed Nov 21 12:19:43 2007 +0100
+++ b/src/pcm/pcm.c	Wed Nov 21 16:03:51 2007 +0100
@@ -1987,6 +1987,33 @@ static char *build_in_pcms[] = {
 	NULL
 };
 
+/* plugin alias list */
+struct plugin_alias {
+	char *name;
+	char *target;
+	struct plugin_alias *next;
+};
+
+static struct plugin_alias *plugin_alias_list;
+
+/* find a plugin alias and set previous pointer */
+static struct plugin_alias *find_plugin_alias(const char *name,
+					      struct plugin_alias **prevp)
+{
+	struct plugin_alias *c, *prev;
+	prev = NULL;
+	for (c = plugin_alias_list; c; prev = c, c = c->next) {
+		if (!strcmp(c->name, name)) {
+			if (prevp)
+				*prevp = prev;
+			return c;
+		}
+	}
+	if (prevp)
+		*prevp = prev;
+	return NULL;
+}
+
 static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
 			     snd_config_t *pcm_root, snd_config_t *pcm_conf,
 			     snd_pcm_stream_t stream, int mode)
@@ -2004,6 +2031,7 @@ static int snd_pcm_open_conf(snd_pcm_t *
 #ifndef PIC
 	extern void *snd_pcm_open_symbols(void);
 #endif
+	struct plugin_alias *palias;
 	void *h = NULL;
 	if (snd_config_get_type(pcm_conf) != SND_CONFIG_TYPE_COMPOUND) {
 		char *val;
@@ -2030,6 +2058,10 @@ static int snd_pcm_open_conf(snd_pcm_t *
 		SNDERR("Invalid type for %s", id);
 		return err;
 	}
+
+	while ((palias = find_plugin_alias(str, NULL)) != NULL)
+		str = palias->target;
+
 	err = snd_config_search_definition(pcm_root, "pcm_type", str, &type_conf);
 	if (err >= 0) {
 		if (snd_config_get_type(type_conf) != SND_CONFIG_TYPE_COMPOUND) {
@@ -2241,6 +2273,67 @@ int snd_pcm_open_slave(snd_pcm_t **pcmp,
 	return snd_pcm_open_conf(pcmp, NULL, root, conf, stream, mode);
 }
 #endif
+
+/**
+ * \brief Make or remove an alias for a plugin
+ * \param plugin The plugin
+ * \param target The name of the aliased target plugin
+ * \return zero if successful or a negative error code
+ */
+int snd_pcm_alias_plugin(const char *plugin, const char *target)
+{
+	struct plugin_alias *c, *prev;
+
+	if (target) {
+		/* check any loop in the alias list */
+		const char *aname;
+		if (!strcmp(plugin, target)) {
+			SNDERR("Cannot alias to itself for plugin %s", plugin);
+			return -EINVAL;
+		}
+		aname = target;
+		while ((c = find_plugin_alias(aname, NULL)) != NULL) {
+			aname = c->target;
+			if (!strcmp(aname, plugin)) {
+				SNDERR("Loop is detected for alias %s", aname);
+				return -EINVAL;
+			}
+		}
+	}
+
+	c = find_plugin_alias(plugin, &prev);
+	if (c) {
+		/* remove the existing one */
+		if (prev)
+			prev->next = c->next;
+		else
+			plugin_alias_list = c->next;
+		free(c->name);
+		free(c->target);
+		free(c);
+		if (!target)
+			return 0;
+	} else {
+		if (!target)
+			return -ENOENT;
+	}
+		
+	/* create a new list member and add it */
+	c = malloc(sizeof(*c));
+	if (!c)
+		return -ENOMEM;
+	c->name = strdup(plugin);
+	c->target = strdup(target);
+	if (!c->name || !c->target) {
+		free(c->name);
+		free(c->target);
+		free(c);
+		return -ENOMEM;
+	}
+	c->next = plugin_alias_list;
+	plugin_alias_list = c;
+	return 0;
+}
 
 /**
  * \brief Wait for a PCM to become ready
diff -r 3539f279ec38 src/pcm/pcm_empty.c
--- a/src/pcm/pcm_empty.c	Wed Nov 21 12:19:43 2007 +0100
+++ b/src/pcm/pcm_empty.c	Wed Nov 21 16:03:51 2007 +0100
@@ -90,8 +90,7 @@ int _snd_pcm_empty_open(snd_pcm_t **pcmp
 			slave = n;
 			continue;
 		}
-		SNDERR("Unknown field %s", id);
-		return -EINVAL;
+		continue;
 	}
 	if (!slave) {
 		SNDERR("slave is not defined");

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Disable conversions
  2007-11-21 15:16     ` Jaroslav Kysela
@ 2007-11-21 14:51       ` Takashi Iwai
  0 siblings, 0 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 14:51 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: ALSA development, Lennart Poettering

At Wed, 21 Nov 2007 16:16:21 +0100 (CET),
Jaroslav Kysela wrote:
> 
> On Wed, 21 Nov 2007, Takashi Iwai wrote:
> 
> > At Wed, 21 Nov 2007 12:40:54 +0100,
> > I wrote:
> > > 
> > > At Tue, 20 Nov 2007 01:51:51 +0100,
> > > Lennart Poettering wrote:
> > > > 
> > > > 4) If I open an audio device with "plughw:" i can disable the software
> > > >    resampling that takes place via
> > > >    "snd_pcm_hw_params_get_rate_resample()". However, there is no
> > > >    equivalent for disabling the channel number adjustment or the
> > > >    sample format conversion. This would be very useful in PA however,
> > > >    since this would allow me to use only the parts of plughw I am
> > > >    interested in (softvol), and disable all the rest (resampling,
> > > >    conversion, channel remixing).
> > > 
> > > Hmm..  It's a bit difficult to implement in a clean way.
> > > For example, what would be the reason to disable softvol?  It's
> > > basically irrelevant with the PCM parameters.  It's added just because
> > > of lack of hardware volume controls.
> > > 
> > > One idea I have is to make an API like
> > > 
> > > 	snd_pcm_alias_plugin(src, dst);
> > > 
> > > For example,
> > > 
> > > 	snd_pcm_alias_plugin("softvol", "passthru");
> 
> I don't like this idea nor implementation much. It will be much better to 
> design a run-time communication with plugins to change configuration 
> parameters / behaviour (something like ioctl on opened pcm handle).

Or, we may provide a simpler way to change the local configurations
dynamically without changing the config file.  Change the default
configuration to be more selective, e.g. skip softvol if a certain
config vaiable is set, or so.


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 15:17   ` Clemens Ladisch
@ 2007-11-21 14:57     ` Takashi Iwai
  2007-11-21 15:27     ` Jaroslav Kysela
  1 sibling, 0 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 14:57 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel, Lennart Poettering

At Wed, 21 Nov 2007 16:17:41 +0100,
Clemens Ladisch wrote:
> 
> Takashi Iwai wrote:
> > Yes, querying channel mapping is another missing piece with popular
> > demand.
> > 
> > The implementation would be easy, I guess.  But we have to define the
> > way to inform this from kernel to user space: whether create a new
> > ioctl or extend the existing ones (if possible)...
> 
> It's just metadata that describes a PCM device, so I think we should use
> TLV for this.

Yes, TLV came to my mind, too.
First I thought it might be possible to extend channel_info, but it's
apparently not.  So, an ioctl would be the only way.

> The existing struct snd_ctl_tlv uses a single integer to identify
> control elements.  We could restrict control numid's to 31 bits and
> use the upper bit to signal that this value includes device type and
> device number in the lower bits, if we want to reuse the same TLV
> ioctls.

IMO, adding a new ioctl to PCM is better than reusing ctl TLV.
The channel mapping is variable and depends on the hw_params currently
set.  So, it cannot be returned properly until a PCM is opened.
Impelenting it in ctl ioctl implies rather a global information.


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 15:27     ` Jaroslav Kysela
@ 2007-11-21 15:04       ` Takashi Iwai
  2007-11-27 16:54         ` Takashi Iwai
  2007-11-21 15:52       ` Clemens Ladisch
  1 sibling, 1 reply; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 15:04 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel, Lennart Poettering

At Wed, 21 Nov 2007 16:27:47 +0100 (CET),
Jaroslav Kysela wrote:
> 
> On Wed, 21 Nov 2007, Clemens Ladisch wrote:
> 
> > Takashi Iwai wrote:
> > > Yes, querying channel mapping is another missing piece with popular
> > > demand.
> > > 
> > > The implementation would be easy, I guess.  But we have to define the
> > > way to inform this from kernel to user space: whether create a new
> > > ioctl or extend the existing ones (if possible)...
> > 
> > It's just metadata that describes a PCM device, so I think we should use
> > TLV for this.
> > 
> > The existing struct snd_ctl_tlv uses a single integer to identify
> > control elements.  We could restrict control numid's to 31 bits and
> > use the upper bit to signal that this value includes device type and
> > device number in the lower bits, if we want to reuse the same TLV
> > ioctls.
> 
> We can also encode PCM device / subdevice numbers to data structure. But
> I think that best way is to extend channel_info PCM ioctl (create new 
> version and emulate old one - it should be quite easy to implement).

OK, that sounds feasible.

Do we have any other missing channel meta data?


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Disable conversions
  2007-11-21 14:29   ` Takashi Iwai
@ 2007-11-21 15:16     ` Jaroslav Kysela
  2007-11-21 14:51       ` Takashi Iwai
  0 siblings, 1 reply; 37+ messages in thread
From: Jaroslav Kysela @ 2007-11-21 15:16 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: ALSA development, Lennart Poettering

On Wed, 21 Nov 2007, Takashi Iwai wrote:

> At Wed, 21 Nov 2007 12:40:54 +0100,
> I wrote:
> > 
> > At Tue, 20 Nov 2007 01:51:51 +0100,
> > Lennart Poettering wrote:
> > > 
> > > 4) If I open an audio device with "plughw:" i can disable the software
> > >    resampling that takes place via
> > >    "snd_pcm_hw_params_get_rate_resample()". However, there is no
> > >    equivalent for disabling the channel number adjustment or the
> > >    sample format conversion. This would be very useful in PA however,
> > >    since this would allow me to use only the parts of plughw I am
> > >    interested in (softvol), and disable all the rest (resampling,
> > >    conversion, channel remixing).
> > 
> > Hmm..  It's a bit difficult to implement in a clean way.
> > For example, what would be the reason to disable softvol?  It's
> > basically irrelevant with the PCM parameters.  It's added just because
> > of lack of hardware volume controls.
> > 
> > One idea I have is to make an API like
> > 
> > 	snd_pcm_alias_plugin(src, dst);
> > 
> > For example,
> > 
> > 	snd_pcm_alias_plugin("softvol", "passthru");

I don't like this idea nor implementation much. It will be much better to 
design a run-time communication with plugins to change configuration 
parameters / behaviour (something like ioctl on opened pcm handle).

					Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 11:42 ` Channel mapping Takashi Iwai
@ 2007-11-21 15:17   ` Clemens Ladisch
  2007-11-21 14:57     ` Takashi Iwai
  2007-11-21 15:27     ` Jaroslav Kysela
  0 siblings, 2 replies; 37+ messages in thread
From: Clemens Ladisch @ 2007-11-21 15:17 UTC (permalink / raw)
  To: Takashi Iwai, Lennart Poettering; +Cc: alsa-devel

Takashi Iwai wrote:
> Yes, querying channel mapping is another missing piece with popular
> demand.
> 
> The implementation would be easy, I guess.  But we have to define the
> way to inform this from kernel to user space: whether create a new
> ioctl or extend the existing ones (if possible)...

It's just metadata that describes a PCM device, so I think we should use
TLV for this.

The existing struct snd_ctl_tlv uses a single integer to identify
control elements.  We could restrict control numid's to 31 bits and
use the upper bit to signal that this value includes device type and
device number in the lower bits, if we want to reuse the same TLV
ioctls.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [lennart@poettering.net: Status of ALSA "simple" mixer interface]
  2007-11-21 11:11 ` Takashi Iwai
@ 2007-11-21 15:23   ` Clemens Ladisch
  2007-11-25 19:56     ` The sense or non-sense of the device listing API (was: Status of ALSA "simple" mixer interface]) Lennart Poettering
  0 siblings, 1 reply; 37+ messages in thread
From: Clemens Ladisch @ 2007-11-21 15:23 UTC (permalink / raw)
  To: Takashi Iwai, Lennart Poettering; +Cc: alsa-devel

Takashi Iwai wrote:
> Lennart Poettering wrote:
> > aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
> > usb webcam that only has a single mono channel.  What's going wrong?
> > Any idea where I should be looking?
> 
> Since it's a USB device, maybe Clemens has a better clue...

USB-Audio.conf defines all the surround devices because there are some
devices that actually use them.  I could understand if "aplay -L" shows
all the default device names _including_ surround71.

I'm not sure how the device name list gets constructed; AFAICT the card-
specific .conf files are not supposed to define hints.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 15:17   ` Clemens Ladisch
  2007-11-21 14:57     ` Takashi Iwai
@ 2007-11-21 15:27     ` Jaroslav Kysela
  2007-11-21 15:04       ` Takashi Iwai
  2007-11-21 15:52       ` Clemens Ladisch
  1 sibling, 2 replies; 37+ messages in thread
From: Jaroslav Kysela @ 2007-11-21 15:27 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: Takashi Iwai, alsa-devel, Lennart Poettering

On Wed, 21 Nov 2007, Clemens Ladisch wrote:

> Takashi Iwai wrote:
> > Yes, querying channel mapping is another missing piece with popular
> > demand.
> > 
> > The implementation would be easy, I guess.  But we have to define the
> > way to inform this from kernel to user space: whether create a new
> > ioctl or extend the existing ones (if possible)...
> 
> It's just metadata that describes a PCM device, so I think we should use
> TLV for this.
> 
> The existing struct snd_ctl_tlv uses a single integer to identify
> control elements.  We could restrict control numid's to 31 bits and
> use the upper bit to signal that this value includes device type and
> device number in the lower bits, if we want to reuse the same TLV
> ioctls.

We can also encode PCM device / subdevice numbers to data structure. But
I think that best way is to extend channel_info PCM ioctl (create new 
version and emulate old one - it should be quite easy to implement).

						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 15:52       ` Clemens Ladisch
@ 2007-11-21 15:36         ` Takashi Iwai
  2007-11-21 18:37           ` Jaroslav Kysela
  2007-11-22  8:55           ` Clemens Ladisch
  0 siblings, 2 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-21 15:36 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel, Lennart Poettering

At Wed, 21 Nov 2007 16:52:20 +0100,
Clemens Ladisch wrote:
> 
> Jaroslav Kysela wrote:
> > On Wed, 21 Nov 2007, Clemens Ladisch wrote:
> > > Takashi Iwai wrote:
> > > > Yes, querying channel mapping is another missing piece with popular
> > > > demand.
> > > > 
> > > > The implementation would be easy, I guess.  But we have to define the
> > > > way to inform this from kernel to user space: whether create a new
> > > > ioctl or extend the existing ones (if possible)...
> > > 
> > > It's just metadata that describes a PCM device, so I think we should use
> > > TLV for this.
> > > 
> > > The existing struct snd_ctl_tlv uses a single integer to identify
> > > control elements.  We could restrict control numid's to 31 bits and
> > > use the upper bit to signal that this value includes device type and
> > > device number in the lower bits, if we want to reuse the same TLV
> > > ioctls.
> 
> Using a ioctl on the ctl device is difficult if the information is
> dependent on the hw_params, so this isn't a good idea.

Yep.

> > We can also encode PCM device / subdevice numbers to data structure. But
> > I think that best way is to extend channel_info PCM ioctl (create new 
> > version and emulate old one - it should be quite easy to implement).
> 
> The channel_info ioctl returns only information about one channel.

OTOH, it's simple and easy to parse.  But, certainly TLV is more
flexible for additional metadata.

> I think we should have a more flexible ioctl that also allows us to
> describe the PCM device itself (such as volume controls that affect
> all channels, or latency information).

Indeed, the mixer <-> PCM mapping can be useful.  For such
information, the fixed size struct isn't suitable as multiple mixer
elements correspond to a single PCM channel.

BTW, what latency information do you have in mind?


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 15:27     ` Jaroslav Kysela
  2007-11-21 15:04       ` Takashi Iwai
@ 2007-11-21 15:52       ` Clemens Ladisch
  2007-11-21 15:36         ` Takashi Iwai
  1 sibling, 1 reply; 37+ messages in thread
From: Clemens Ladisch @ 2007-11-21 15:52 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Takashi Iwai, alsa-devel, Lennart Poettering

Jaroslav Kysela wrote:
> On Wed, 21 Nov 2007, Clemens Ladisch wrote:
> > Takashi Iwai wrote:
> > > Yes, querying channel mapping is another missing piece with popular
> > > demand.
> > > 
> > > The implementation would be easy, I guess.  But we have to define the
> > > way to inform this from kernel to user space: whether create a new
> > > ioctl or extend the existing ones (if possible)...
> > 
> > It's just metadata that describes a PCM device, so I think we should use
> > TLV for this.
> > 
> > The existing struct snd_ctl_tlv uses a single integer to identify
> > control elements.  We could restrict control numid's to 31 bits and
> > use the upper bit to signal that this value includes device type and
> > device number in the lower bits, if we want to reuse the same TLV
> > ioctls.

Using a ioctl on the ctl device is difficult if the information is
dependent on the hw_params, so this isn't a good idea.

> We can also encode PCM device / subdevice numbers to data structure. But
> I think that best way is to extend channel_info PCM ioctl (create new 
> version and emulate old one - it should be quite easy to implement).

The channel_info ioctl returns only information about one channel.

I think we should have a more flexible ioctl that also allows us to
describe the PCM device itself (such as volume controls that affect
all channels, or latency information).


Regards,
Clemens

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 15:36         ` Takashi Iwai
@ 2007-11-21 18:37           ` Jaroslav Kysela
  2007-11-22  9:17             ` Clemens Ladisch
  2007-11-22  8:55           ` Clemens Ladisch
  1 sibling, 1 reply; 37+ messages in thread
From: Jaroslav Kysela @ 2007-11-21 18:37 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: ALSA development, Lennart Poettering

On Wed, 21 Nov 2007, Takashi Iwai wrote:

> > > We can also encode PCM device / subdevice numbers to data structure. 
> > > But I think that best way is to extend channel_info PCM ioctl 
> > > (create new version and emulate old one - it should be quite easy to 
> > > implement).
>
> > The channel_info ioctl returns only information about one channel.
>
> OTOH, it's simple and easy to parse.  But, certainly TLV is more
> flexible for additional metadata.

I also think that it's easy to iterate over all channels to get a map.

> > I think we should have a more flexible ioctl that also allows us to
> > describe the PCM device itself (such as volume controls that affect
> > all channels, or latency information).
> 
> Indeed, the mixer <-> PCM mapping can be useful.  For such
> information, the fixed size struct isn't suitable as multiple mixer
> elements correspond to a single PCM channel.

I think that we have already such interface, but maybe not well described 
and used. I would propose to use SNDRV_CTL_ELEM_IFACE_PCM for PCM mixer 
related controls and device & subdevice from control_id structure. In this 
way, we can easy group and assign all control elements to PCM substream.

We may have only one problem - to identify which elements are mixer 
related and which are not. Maybe, we can use one bit from access flags to 
determine, if it's a mixer control element if interface != MIXER.

						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 15:36         ` Takashi Iwai
  2007-11-21 18:37           ` Jaroslav Kysela
@ 2007-11-22  8:55           ` Clemens Ladisch
  1 sibling, 0 replies; 37+ messages in thread
From: Clemens Ladisch @ 2007-11-22  8:55 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Lennart Poettering

Takashi Iwai wrote:
> Clemens Ladisch wrote:
> > Jaroslav Kysela wrote:
> > > We can also encode PCM device / subdevice numbers to data structure. But
> > > I think that best way is to extend channel_info PCM ioctl (create new 
> > > version and emulate old one - it should be quite easy to implement).
> > 
> > The channel_info ioctl returns only information about one channel.
> 
> OTOH, it's simple and easy to parse.  But, certainly TLV is more
> flexible for additional metadata.
> 
> > I think we should have a more flexible ioctl that also allows us to
> > describe the PCM device itself (such as volume controls that affect
> > all channels, or latency information).
> 
> Indeed, the mixer <-> PCM mapping can be useful.  For such
> information, the fixed size struct isn't suitable as multiple mixer
> elements correspond to a single PCM channel.

Okay, we already have the control's (sub)device fields for that ...

> BTW, what latency information do you have in mind?

How long it takes audio data to travel through the device, probably
DSP processing time + group delay.  I doubt that this value will be
known in many cases, or that applications will care.


It seems at the moment there isn't any information except the channel
order that is of interest to applications, so extended channel_info
would suffice for now.  I'm just concerned that there will be more
information in the future and that using TLV will prepare us for that.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 18:37           ` Jaroslav Kysela
@ 2007-11-22  9:17             ` Clemens Ladisch
  0 siblings, 0 replies; 37+ messages in thread
From: Clemens Ladisch @ 2007-11-22  9:17 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: ALSA development, Lennart Poettering

Jaroslav Kysela wrote:
> On Wed, 21 Nov 2007, Takashi Iwai wrote:
> > Indeed, the mixer <-> PCM mapping can be useful.  For such
> > information, the fixed size struct isn't suitable as multiple mixer
> > elements correspond to a single PCM channel.
> 
> I think that we have already such interface, but maybe not well described 
> and used. I would propose to use SNDRV_CTL_ELEM_IFACE_PCM for PCM mixer 
> related controls and device & subdevice from control_id structure. In this 
> way, we can easy group and assign all control elements to PCM substream.

At the moment, this is only used for sound cards that have multiple
substreams.

> We may have only one problem - to identify which elements are mixer 
> related and which are not. Maybe, we can use one bit from access flags to 
> determine, if it's a mixer control element if interface != MIXER.

I'm not sure if this information (mixer or not) is that useful - an
application is likely to access a mixer control with a 'known' meaning,
like volume or mute, and in this case it has to search the controls by
their name anyway.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 37+ messages in thread

* The sense or non-sense of the device listing API (was: Status of ALSA "simple" mixer interface])
  2007-11-21 15:23   ` Clemens Ladisch
@ 2007-11-25 19:56     ` Lennart Poettering
  2007-11-25 20:38       ` Jaroslav Kysela
  0 siblings, 1 reply; 37+ messages in thread
From: Lennart Poettering @ 2007-11-25 19:56 UTC (permalink / raw)
  To: ALSA

On Wed, 21.11.07 16:23, Clemens Ladisch (cladisch@fastmail.net) wrote:

> Takashi Iwai wrote:
> > Lennart Poettering wrote:
> > > aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
> > > usb webcam that only has a single mono channel.  What's going wrong?
> > > Any idea where I should be looking?
> > 
> > Since it's a USB device, maybe Clemens has a better clue...
> 
> USB-Audio.conf defines all the surround devices because there are some
> devices that actually use them.  I could understand if "aplay -L" shows
> all the default device names _including_ surround71.
> 
> I'm not sure how the device name list gets constructed; AFAICT the card-
> specific .conf files are not supposed to define hints.

Hmm, that would would be a serious limitation.

As it appears the device name lists *never* includes any suitable
device strings for mono-only devices, correct?

That too is a serious limitation, and makes the name listing API a bit worthless.

I am really not sure what to make of this device listing API, if it
lists mostly non-working devices, and doesn't list working devices.

Quite frankly, the whole device name API is not really useful as is
anyway, since it doesn't provide any hint to the code using it what
the properties are of the devices it lists. How should client code
ever know that "surround51" is the one to pick from the list when 5.1
sound is requested -- without having a static table of possible
devices and their properties somewhere in its own code? But if the
client codes has to define that table in its own code than the point
of the device naming API is mostly lost.

To work around the fact that the device naming API doesn't work as
documented, and also is not really that useful as an API anyway,
PulseAudio now probes all potentially available devices by opening
them, and having a large table listing the well known ALSA device
strings and their properties. Probing for possible devices like this
is ugly, and produces a lot of libasound debug output (which one
apparently can not disable without recompiling ALSA itself, or did I
miss something?).

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: The sense or non-sense of the device listing API (was: Status of ALSA "simple" mixer interface])
  2007-11-25 19:56     ` The sense or non-sense of the device listing API (was: Status of ALSA "simple" mixer interface]) Lennart Poettering
@ 2007-11-25 20:38       ` Jaroslav Kysela
  0 siblings, 0 replies; 37+ messages in thread
From: Jaroslav Kysela @ 2007-11-25 20:38 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: ALSA

On Sun, 25 Nov 2007, Lennart Poettering wrote:

> On Wed, 21.11.07 16:23, Clemens Ladisch (cladisch@fastmail.net) wrote:
> 
> > Takashi Iwai wrote:
> > > Lennart Poettering wrote:
> > > > aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
> > > > usb webcam that only has a single mono channel.  What's going wrong?
> > > > Any idea where I should be looking?
> > > 
> > > Since it's a USB device, maybe Clemens has a better clue...
> > 
> > USB-Audio.conf defines all the surround devices because there are some
> > devices that actually use them.  I could understand if "aplay -L" shows
> > all the default device names _including_ surround71.
> > 
> > I'm not sure how the device name list gets constructed; AFAICT the card-
> > specific .conf files are not supposed to define hints.
> 
> Hmm, that would would be a serious limitation.

Card specific files can give information to device name hint functions. 
Unfortunately, all USB cards have only one configuration file which is too 
much generic (basically all PCM devices are described there even if they 
do not exist in hardware). I think we need to extend our configuration 
files here.

Also if only surround71 device is available, it appears like a bug in the 
device name hint function. Anyway, users can create own device name hints,
so the result of device name hint function can be forced until a right 
behaviour is not implemented by default.

						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Disable conversions
  2007-11-21 11:40 ` Disable conversions Takashi Iwai
  2007-11-21 14:29   ` Takashi Iwai
@ 2007-11-25 20:41   ` Lennart Poettering
  2007-11-26 15:55     ` Jaroslav Kysela
  1 sibling, 1 reply; 37+ messages in thread
From: Lennart Poettering @ 2007-11-25 20:41 UTC (permalink / raw)
  To: ALSA Development Mailing List

On Wed, 21.11.07 12:40, Takashi Iwai (tiwai@suse.de) wrote:

> At Tue, 20 Nov 2007 01:51:51 +0100,
> Lennart Poettering wrote:
> > 
> > 4) If I open an audio device with "plughw:" i can disable the software
> >    resampling that takes place via
> >    "snd_pcm_hw_params_get_rate_resample()". However, there is no
> >    equivalent for disabling the channel number adjustment or the
> >    sample format conversion. This would be very useful in PA however,
> >    since this would allow me to use only the parts of plughw I am
> >    interested in (softvol), and disable all the rest (resampling,
> >    conversion, channel remixing).
> 
> Hmm..  It's a bit difficult to implement in a clean way.
> For example, what would be the reason to disable softvol?  

Hmm, I think there's some kind of misunderstand here: softvol is the
only part I am interested in to use. It's the resampling, the sample
type conversion, and the channel map changing I want to disable. Right
now, I can only disable the resampling, but the type conversion and
channel conversion always stay enabled. Or did I miss something?

> It's basically irrelevant with the PCM parameters.  It's added just
> because of lack of hardware volume controls.
> 
> One idea I have is to make an API like
> 
> 	snd_pcm_alias_plugin(src, dst);
> 
> For example,
> 
> 	snd_pcm_alias_plugin("softvol", "passthru");
> 
> would take passthru plugin instead of softvol plugin.
> (Suppose passthru plugin as a simply pass-through plugin to its
>  slave.pcm)

I am not sure if I understand what this would be useful for?

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Disable conversions
  2007-11-25 20:41   ` Lennart Poettering
@ 2007-11-26 15:55     ` Jaroslav Kysela
  2007-12-22 22:37       ` Lennart Poettering
  0 siblings, 1 reply; 37+ messages in thread
From: Jaroslav Kysela @ 2007-11-26 15:55 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: ALSA Development Mailing List

On Sun, 25 Nov 2007, Lennart Poettering wrote:

> On Wed, 21.11.07 12:40, Takashi Iwai (tiwai@suse.de) wrote:
> 
> > At Tue, 20 Nov 2007 01:51:51 +0100,
> > Lennart Poettering wrote:
> > > 
> > > 4) If I open an audio device with "plughw:" i can disable the software
> > >    resampling that takes place via
> > >    "snd_pcm_hw_params_get_rate_resample()". However, there is no
> > >    equivalent for disabling the channel number adjustment or the
> > >    sample format conversion. This would be very useful in PA however,
> > >    since this would allow me to use only the parts of plughw I am
> > >    interested in (softvol), and disable all the rest (resampling,
> > >    conversion, channel remixing).
> > 
> > Hmm..  It's a bit difficult to implement in a clean way.
> > For example, what would be the reason to disable softvol?  
> 
> Hmm, I think there's some kind of misunderstand here: softvol is the
> only part I am interested in to use. It's the resampling, the sample
> type conversion, and the channel map changing I want to disable. Right
> now, I can only disable the resampling, but the type conversion and
> channel conversion always stay enabled. Or did I miss something?

I though about this idea again. Resampling is a bit exception, because we 
have no very good implementation in alsa-lib and there are rounding 
problems regarding period sizes due to nature of ALSA API, so it's better 
to resample on bytestream if possible.

I think that Takashi already proposed to handle "disabling" using
a configuration file (interface). We can even create an argument for 
plughw device:

1) Proposal - one argument specifying multiple disabled conversions:

   plughw:CARD=0,DEV=0,DISABLECONV=cfr

   c = channels
   f = format
   r = rate

   And add 'disableconv' to pcm/pcm_plug.c configuration parser.

2) Proposal - multiple arguments

   plughw:CARD=0,DEV=0,DISABLECHANNELS=1,DISABLERATE=1,DISABLEFORMAT=1

I prefer first proposal (I don't think that it will be widely used), but I 
have no objections for second, too.

This can be applied to plug: device as well.

						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Channel mapping
  2007-11-21 15:04       ` Takashi Iwai
@ 2007-11-27 16:54         ` Takashi Iwai
  0 siblings, 0 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-27 16:54 UTC (permalink / raw)
  To: alsa-devel; +Cc: Lennart Poettering

At Wed, 21 Nov 2007 16:04:04 +0100,
I wrote:
> 
> At Wed, 21 Nov 2007 16:27:47 +0100 (CET),
> Jaroslav Kysela wrote:
> > 
> > On Wed, 21 Nov 2007, Clemens Ladisch wrote:
> > 
> > > Takashi Iwai wrote:
> > > > Yes, querying channel mapping is another missing piece with popular
> > > > demand.
> > > > 
> > > > The implementation would be easy, I guess.  But we have to define the
> > > > way to inform this from kernel to user space: whether create a new
> > > > ioctl or extend the existing ones (if possible)...
> > > 
> > > It's just metadata that describes a PCM device, so I think we should use
> > > TLV for this.
> > > 
> > > The existing struct snd_ctl_tlv uses a single integer to identify
> > > control elements.  We could restrict control numid's to 31 bits and
> > > use the upper bit to signal that this value includes device type and
> > > device number in the lower bits, if we want to reuse the same TLV
> > > ioctls.
> > 
> > We can also encode PCM device / subdevice numbers to data structure. But
> > I think that best way is to extend channel_info PCM ioctl (create new 
> > version and emulate old one - it should be quite easy to implement).
> 
> OK, that sounds feasible.
> 
> Do we have any other missing channel meta data?

I'm tring to implement in this way, and made preliminary patches.

One is to replace pcm_ops->ioctl to new pcm_ops->channel_info and
pcm_ops->reset callbacks.  This will make easier to extend the new
channel_info stuff, and even clean up a lot of drivers.

The patch is below.  The extended channel_info patch will follow later
(maybe tomorrow).


Takashi

diff -r 5829c288c7df Documentation/DocBook/writing-an-alsa-driver.tmpl
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl	Mon Nov 26 15:00:40 2007 +0100
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl	Mon Nov 26 16:52:39 2007 +0100
@@ -1891,7 +1891,6 @@
   static struct snd_pcm_ops snd_mychip_playback_ops = {
           .open =        snd_mychip_playback_open,
           .close =       snd_mychip_playback_close,
-          .ioctl =       snd_pcm_lib_ioctl,
           .hw_params =   snd_mychip_pcm_hw_params,
           .hw_free =     snd_mychip_pcm_hw_free,
           .prepare =     snd_mychip_pcm_prepare,
@@ -1903,7 +1902,6 @@
   static struct snd_pcm_ops snd_mychip_capture_ops = {
           .open =        snd_mychip_capture_open,
           .close =       snd_mychip_capture_close,
-          .ioctl =       snd_pcm_lib_ioctl,
           .hw_params =   snd_mychip_pcm_hw_params,
           .hw_free =     snd_mychip_pcm_hw_free,
           .prepare =     snd_mychip_pcm_prepare,
@@ -2038,7 +2036,6 @@
   static struct snd_pcm_ops snd_mychip_playback_ops = {
           .open =        snd_mychip_pcm_open,
           .close =       snd_mychip_pcm_close,
-          .ioctl =       snd_pcm_lib_ioctl,
           .hw_params =   snd_mychip_pcm_hw_params,
           .hw_free =     snd_mychip_pcm_hw_free,
           .prepare =     snd_mychip_pcm_prepare,
@@ -2710,12 +2707,24 @@ struct _snd_pcm_runtime {
         </para>
       </section>
 
-      <section id="pcm-interface-operators-ioctl-callback">
-        <title>ioctl callback</title>
-        <para>
-          This is used for any special call to pcm ioctls. But
-        usually you can pass a generic ioctl callback, 
-        <function>snd_pcm_lib_ioctl</function>.
+      <section id="pcm-interface-operators-reset-callback">
+        <title>reset callback</title>
+        <para>
+          This is used for resetting the PCM buffer and position, issued
+	when an explicit prepare or reset action is done by user.
+	You can pass <constant>NULL</constant> usually.
+        </para>
+      </section>
+
+      <section id="pcm-interface-operators-reset-callback">
+        <title>channel_info callback</title>
+        <para>
+          This is used for returning the channel information of the
+	given channel.  The channel information contains the offset,
+	size and step for MMAP access, and also some extended
+	attribute like channel-mapping.
+	You can pass <constant>NULL</constant> as long as you don't
+	need any special handling.
         </para>
       </section>
 
diff -r 5829c288c7df aoa/soundbus/i2sbus/i2sbus-pcm.c
--- a/aoa/soundbus/i2sbus/i2sbus-pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/aoa/soundbus/i2sbus/i2sbus-pcm.c	Mon Nov 26 16:52:39 2007 +0100
@@ -782,7 +782,6 @@ static struct snd_pcm_ops i2sbus_playbac
 static struct snd_pcm_ops i2sbus_playback_ops = {
 	.open =		i2sbus_playback_open,
 	.close =	i2sbus_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	i2sbus_hw_params,
 	.hw_free =	i2sbus_playback_hw_free,
 	.prepare =	i2sbus_playback_prepare,
@@ -852,7 +851,6 @@ static struct snd_pcm_ops i2sbus_record_
 static struct snd_pcm_ops i2sbus_record_ops = {
 	.open =		i2sbus_record_open,
 	.close =	i2sbus_record_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	i2sbus_hw_params,
 	.hw_free =	i2sbus_record_hw_free,
 	.prepare =	i2sbus_record_prepare,
diff -r 5829c288c7df arm/aaci.c
--- a/arm/aaci.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/arm/aaci.c	Mon Nov 26 16:52:39 2007 +0100
@@ -717,7 +717,6 @@ static struct snd_pcm_ops aaci_playback_
 static struct snd_pcm_ops aaci_playback_ops = {
 	.open		= aaci_pcm_open,
 	.close		= aaci_pcm_close,
-	.ioctl		= snd_pcm_lib_ioctl,
 	.hw_params	= aaci_pcm_playback_hw_params,
 	.hw_free	= aaci_pcm_hw_free,
 	.prepare	= aaci_pcm_prepare,
@@ -845,7 +844,6 @@ static struct snd_pcm_ops aaci_capture_o
 static struct snd_pcm_ops aaci_capture_ops = {
 	.open		= aaci_pcm_open,
 	.close		= aaci_pcm_close,
-	.ioctl		= snd_pcm_lib_ioctl,
 	.hw_params	= aaci_pcm_capture_hw_params,
 	.hw_free	= aaci_pcm_hw_free,
 	.prepare	= aaci_pcm_capture_prepare,
diff -r 5829c288c7df arm/pxa2xx-pcm.c
--- a/arm/pxa2xx-pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/arm/pxa2xx-pcm.c	Mon Nov 26 16:52:39 2007 +0100
@@ -272,7 +272,6 @@ static struct snd_pcm_ops pxa2xx_pcm_ops
 static struct snd_pcm_ops pxa2xx_pcm_ops = {
 	.open		= pxa2xx_pcm_open,
 	.close		= pxa2xx_pcm_close,
-	.ioctl		= snd_pcm_lib_ioctl,
 	.hw_params	= pxa2xx_pcm_hw_params,
 	.hw_free	= pxa2xx_pcm_hw_free,
 	.prepare	= pxa2xx_pcm_prepare,
diff -r 5829c288c7df arm/sa11xx-uda1341.c
--- a/arm/sa11xx-uda1341.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/arm/sa11xx-uda1341.c	Mon Nov 26 16:52:39 2007 +0100
@@ -777,7 +777,6 @@ static struct snd_pcm_ops snd_card_sa11x
 static struct snd_pcm_ops snd_card_sa11xx_uda1341_playback_ops = {
 	.open			= snd_card_sa11xx_uda1341_open,
 	.close			= snd_card_sa11xx_uda1341_close,
-	.ioctl			= snd_pcm_lib_ioctl,
 	.hw_params	        = snd_sa11xx_uda1341_hw_params,
 	.hw_free	        = snd_sa11xx_uda1341_hw_free,
 	.prepare		= snd_sa11xx_uda1341_prepare,
@@ -788,7 +787,6 @@ static struct snd_pcm_ops snd_card_sa11x
 static struct snd_pcm_ops snd_card_sa11xx_uda1341_capture_ops = {
 	.open			= snd_card_sa11xx_uda1341_open,
 	.close			= snd_card_sa11xx_uda1341_close,
-	.ioctl			= snd_pcm_lib_ioctl,
 	.hw_params	        = snd_sa11xx_uda1341_hw_params,
 	.hw_free	        = snd_sa11xx_uda1341_hw_free,
 	.prepare		= snd_sa11xx_uda1341_prepare,
diff -r 5829c288c7df core/pcm_lib.c
--- a/core/pcm_lib.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/core/pcm_lib.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1374,25 +1374,20 @@ int snd_pcm_hw_params_choose(struct snd_
 	return 0;
 }
 
-static int snd_pcm_lib_ioctl_reset(struct snd_pcm_substream *substream,
-				   void *arg)
+/**
+ * snd_pcm_lib_channel_info - a generic PCM channel_ioctl callback
+ * @substream: the pcm substream instance
+ * @info: channel_info argument
+ *
+ * Processes the generic channel_info ioctl for PCM.
+ * Can be passed as the channel_info callback for PCM ops.
+ *
+ * Returns zero if successful, or a negative error code on failure.
+ */
+
+int snd_pcm_lib_channel_info(struct snd_pcm_substream *substream,
+			     struct snd_pcm_channel_info *info)
 {
-	struct snd_pcm_runtime *runtime = substream->runtime;
-	unsigned long flags;
-	snd_pcm_stream_lock_irqsave(substream, flags);
-	if (snd_pcm_running(substream) &&
-	    snd_pcm_update_hw_ptr(substream) >= 0)
-		runtime->status->hw_ptr %= runtime->buffer_size;
-	else
-		runtime->status->hw_ptr = 0;
-	snd_pcm_stream_unlock_irqrestore(substream, flags);
-	return 0;
-}
-
-static int snd_pcm_lib_ioctl_channel_info(struct snd_pcm_substream *substream,
-					  void *arg)
-{
-	struct snd_pcm_channel_info *info = arg;
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	int width;
 	if (!(runtime->info & SNDRV_PCM_INFO_MMAP)) {
@@ -1423,33 +1418,6 @@ static int snd_pcm_lib_ioctl_channel_inf
 	}
 	return 0;
 }
-
-/**
- * snd_pcm_lib_ioctl - a generic PCM ioctl callback
- * @substream: the pcm substream instance
- * @cmd: ioctl command
- * @arg: ioctl argument
- *
- * Processes the generic ioctl commands for PCM.
- * Can be passed as the ioctl callback for PCM ops.
- *
- * Returns zero if successful, or a negative error code on failure.
- */
-int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
-		      unsigned int cmd, void *arg)
-{
-	switch (cmd) {
-	case SNDRV_PCM_IOCTL1_INFO:
-		return 0;
-	case SNDRV_PCM_IOCTL1_RESET:
-		return snd_pcm_lib_ioctl_reset(substream, arg);
-	case SNDRV_PCM_IOCTL1_CHANNEL_INFO:
-		return snd_pcm_lib_ioctl_channel_info(substream, arg);
-	}
-	return -ENXIO;
-}
-
-EXPORT_SYMBOL(snd_pcm_lib_ioctl);
 
 /*
  *  Conditions
diff -r 5829c288c7df core/pcm_native.c
--- a/core/pcm_native.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/core/pcm_native.c	Mon Nov 26 16:52:39 2007 +0100
@@ -109,11 +109,8 @@ int snd_pcm_info(struct snd_pcm_substrea
 	info->subdevices_avail = pstr->substream_count - pstr->substream_opened;
 	strlcpy(info->subname, substream->name, sizeof(info->subname));
 	runtime = substream->runtime;
-	/* AB: FIXME!!! This is definitely nonsense */
-	if (runtime) {
+	if (runtime)
 		info->sync = runtime->sync;
-		substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_INFO, info);
-	}
 	return 0;
 }
 
@@ -663,7 +660,10 @@ static int snd_pcm_channel_info(struct s
 		return -EINVAL;
 	memset(info, 0, sizeof(*info));
 	info->channel = channel;
-	return substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_CHANNEL_INFO, info);
+	if (substream->ops->channel_info)
+		return substream->ops->channel_info(substream, info);
+	else
+		return snd_pcm_lib_channel_info(substream, info);
 }
 
 static int snd_pcm_channel_info_user(struct snd_pcm_substream *substream,
@@ -1264,10 +1264,19 @@ static int snd_pcm_do_reset(struct snd_p
 static int snd_pcm_do_reset(struct snd_pcm_substream *substream, int state)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
-	int err = substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_RESET, NULL);
-	if (err < 0)
-		return err;
-	// snd_assert(runtime->status->hw_ptr < runtime->buffer_size, );
+	int err;
+
+	if (substream->ops->reset) {
+		err = substream->ops->reset(substream);
+		if (err < 0)
+			return err;
+	} else {
+		if (snd_pcm_running(substream) &&
+		    snd_pcm_update_hw_ptr(substream) >= 0)
+			runtime->status->hw_ptr %= runtime->buffer_size;
+		else
+			runtime->status->hw_ptr = 0;
+	}
 	runtime->hw_ptr_base = 0;
 	runtime->hw_ptr_interrupt = runtime->status->hw_ptr -
 		runtime->status->hw_ptr % runtime->period_size;
diff -r 5829c288c7df drivers/dummy.c
--- a/drivers/dummy.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/drivers/dummy.c	Mon Nov 26 16:52:39 2007 +0100
@@ -404,7 +404,6 @@ static struct snd_pcm_ops snd_card_dummy
 static struct snd_pcm_ops snd_card_dummy_playback_ops = {
 	.open =			snd_card_dummy_playback_open,
 	.close =		snd_card_dummy_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_card_dummy_hw_params,
 	.hw_free =		snd_card_dummy_hw_free,
 	.prepare =		snd_card_dummy_pcm_prepare,
@@ -415,7 +414,6 @@ static struct snd_pcm_ops snd_card_dummy
 static struct snd_pcm_ops snd_card_dummy_capture_ops = {
 	.open =			snd_card_dummy_capture_open,
 	.close =		snd_card_dummy_capture_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_card_dummy_hw_params,
 	.hw_free =		snd_card_dummy_hw_free,
 	.prepare =		snd_card_dummy_pcm_prepare,
diff -r 5829c288c7df drivers/ml403-ac97cr.c
--- a/drivers/ml403-ac97cr.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/drivers/ml403-ac97cr.c	Mon Nov 26 16:52:39 2007 +0100
@@ -762,7 +762,6 @@ static struct snd_pcm_ops snd_ml403_ac97
 static struct snd_pcm_ops snd_ml403_ac97cr_playback_ops = {
 	.open = snd_ml403_ac97cr_playback_open,
 	.close = snd_ml403_ac97cr_playback_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_ml403_ac97cr_hw_params,
 	.hw_free = snd_ml403_ac97cr_hw_free,
 	.prepare = snd_ml403_ac97cr_pcm_playback_prepare,
@@ -773,7 +772,6 @@ static struct snd_pcm_ops snd_ml403_ac97
 static struct snd_pcm_ops snd_ml403_ac97cr_capture_ops = {
 	.open = snd_ml403_ac97cr_capture_open,
 	.close = snd_ml403_ac97cr_capture_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_ml403_ac97cr_hw_params,
 	.hw_free = snd_ml403_ac97cr_hw_free,
 	.prepare = snd_ml403_ac97cr_pcm_capture_prepare,
diff -r 5829c288c7df drivers/vx/vx_pcm.c
--- a/drivers/vx/vx_pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/drivers/vx/vx_pcm.c	Mon Nov 26 16:52:39 2007 +0100
@@ -947,7 +947,6 @@ static struct snd_pcm_ops vx_pcm_playbac
 static struct snd_pcm_ops vx_pcm_playback_ops = {
 	.open =		vx_pcm_playback_open,
 	.close =	vx_pcm_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	vx_pcm_hw_params,
 	.hw_free =	vx_pcm_hw_free,
 	.prepare =	vx_pcm_prepare,
@@ -1166,7 +1165,6 @@ static struct snd_pcm_ops vx_pcm_capture
 static struct snd_pcm_ops vx_pcm_capture_ops = {
 	.open =		vx_pcm_capture_open,
 	.close =	vx_pcm_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	vx_pcm_hw_params,
 	.hw_free =	vx_pcm_hw_free,
 	.prepare =	vx_pcm_prepare,
diff -r 5829c288c7df include/pcm.h
--- a/include/pcm.h	Mon Nov 26 15:00:40 2007 +0100
+++ b/include/pcm.h	Mon Nov 26 16:52:39 2007 +0100
@@ -61,8 +61,9 @@ struct snd_pcm_ops {
 struct snd_pcm_ops {
 	int (*open)(struct snd_pcm_substream *substream);
 	int (*close)(struct snd_pcm_substream *substream);
-	int (*ioctl)(struct snd_pcm_substream * substream,
-		     unsigned int cmd, void *arg);
+	int (*reset)(struct snd_pcm_substream * substream);
+	int (*channel_info)(struct snd_pcm_substream * substream,
+			    struct snd_pcm_channel_info *info);
 	int (*hw_params)(struct snd_pcm_substream *substream,
 			 struct snd_pcm_hw_params *params);
 	int (*hw_free)(struct snd_pcm_substream *substream);
@@ -85,14 +86,6 @@ struct snd_pcm_ops {
  */
 
 #define SNDRV_PCM_DEVICES		8
-
-#define SNDRV_PCM_IOCTL1_FALSE		((void *)0)
-#define SNDRV_PCM_IOCTL1_TRUE		((void *)1)
-
-#define SNDRV_PCM_IOCTL1_RESET		0
-#define SNDRV_PCM_IOCTL1_INFO		1
-#define SNDRV_PCM_IOCTL1_CHANNEL_INFO	2
-#define SNDRV_PCM_IOCTL1_GSTATE		3
 
 #define SNDRV_PCM_TRIGGER_STOP		0
 #define SNDRV_PCM_TRIGGER_START		1
@@ -900,8 +893,8 @@ void snd_pcm_set_ops(struct snd_pcm * pc
 void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, struct snd_pcm_ops *ops);
 void snd_pcm_set_sync(struct snd_pcm_substream *substream);
 int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream);
-int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
-		      unsigned int cmd, void *arg);                      
+int snd_pcm_lib_channel_info(struct snd_pcm_substream *substream,
+			     struct snd_pcm_channel_info *info);
 int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream);
 int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream);
 int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream);
diff -r 5829c288c7df isa/ad1816a/ad1816a_lib.c
--- a/isa/ad1816a/ad1816a_lib.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/ad1816a/ad1816a_lib.c	Mon Nov 26 16:52:39 2007 +0100
@@ -641,7 +641,6 @@ static struct snd_pcm_ops snd_ad1816a_pl
 static struct snd_pcm_ops snd_ad1816a_playback_ops = {
 	.open =		snd_ad1816a_playback_open,
 	.close =	snd_ad1816a_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ad1816a_hw_params,
 	.hw_free =	snd_ad1816a_hw_free,
 	.prepare =	snd_ad1816a_playback_prepare,
@@ -652,7 +651,6 @@ static struct snd_pcm_ops snd_ad1816a_ca
 static struct snd_pcm_ops snd_ad1816a_capture_ops = {
 	.open =		snd_ad1816a_capture_open,
 	.close =	snd_ad1816a_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ad1816a_hw_params,
 	.hw_free =	snd_ad1816a_hw_free,
 	.prepare =	snd_ad1816a_capture_prepare,
diff -r 5829c288c7df isa/ad1848/ad1848_lib.c
--- a/isa/ad1848/ad1848_lib.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/ad1848/ad1848_lib.c	Mon Nov 26 16:52:39 2007 +0100
@@ -312,12 +312,6 @@ static unsigned char snd_ad1848_get_rate
 			return freq_bits[i];
 	snd_BUG();
 	return freq_bits[ARRAY_SIZE(rates) - 1];
-}
-
-static int snd_ad1848_ioctl(struct snd_pcm_substream *substream,
-			    unsigned int cmd, void *arg)
-{
-	return snd_pcm_lib_ioctl(substream, cmd, arg);
 }
 
 static unsigned char snd_ad1848_get_format(int format, int channels)
@@ -929,7 +923,6 @@ static struct snd_pcm_ops snd_ad1848_pla
 static struct snd_pcm_ops snd_ad1848_playback_ops = {
 	.open =		snd_ad1848_playback_open,
 	.close =	snd_ad1848_playback_close,
-	.ioctl =	snd_ad1848_ioctl,
 	.hw_params =	snd_ad1848_playback_hw_params,
 	.hw_free =	snd_ad1848_playback_hw_free,
 	.prepare =	snd_ad1848_playback_prepare,
@@ -940,7 +933,6 @@ static struct snd_pcm_ops snd_ad1848_cap
 static struct snd_pcm_ops snd_ad1848_capture_ops = {
 	.open =		snd_ad1848_capture_open,
 	.close =	snd_ad1848_capture_close,
-	.ioctl =	snd_ad1848_ioctl,
 	.hw_params =	snd_ad1848_capture_hw_params,
 	.hw_free =	snd_ad1848_capture_hw_free,
 	.prepare =	snd_ad1848_capture_prepare,
diff -r 5829c288c7df isa/cs423x/cs4231_lib.c
--- a/isa/cs423x/cs4231_lib.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/cs423x/cs4231_lib.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1499,7 +1499,6 @@ static struct snd_pcm_ops snd_cs4231_pla
 static struct snd_pcm_ops snd_cs4231_playback_ops = {
 	.open =		snd_cs4231_playback_open,
 	.close =	snd_cs4231_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cs4231_playback_hw_params,
 	.hw_free =	snd_cs4231_playback_hw_free,
 	.prepare =	snd_cs4231_playback_prepare,
@@ -1510,7 +1509,6 @@ static struct snd_pcm_ops snd_cs4231_cap
 static struct snd_pcm_ops snd_cs4231_capture_ops = {
 	.open =		snd_cs4231_capture_open,
 	.close =	snd_cs4231_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cs4231_capture_hw_params,
 	.hw_free =	snd_cs4231_capture_hw_free,
 	.prepare =	snd_cs4231_capture_prepare,
diff -r 5829c288c7df isa/es1688/es1688_lib.c
--- a/isa/es1688/es1688_lib.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/es1688/es1688_lib.c	Mon Nov 26 16:52:39 2007 +0100
@@ -317,12 +317,6 @@ static void snd_es1688_set_rate(struct s
 	/* write result to hardware */
 	snd_es1688_write(chip, 0xa1, bits);
 	snd_es1688_write(chip, 0xa2, divider);
-}
-
-static int snd_es1688_ioctl(struct snd_pcm_substream *substream,
-			    unsigned int cmd, void *arg)
-{
-	return snd_pcm_lib_ioctl(substream, cmd, arg);
 }
 
 static int snd_es1688_trigger(struct snd_es1688 *chip, int cmd, unsigned char value)
@@ -705,7 +699,6 @@ static struct snd_pcm_ops snd_es1688_pla
 static struct snd_pcm_ops snd_es1688_playback_ops = {
 	.open =			snd_es1688_playback_open,
 	.close =		snd_es1688_playback_close,
-	.ioctl =		snd_es1688_ioctl,
 	.hw_params =		snd_es1688_hw_params,
 	.hw_free =		snd_es1688_hw_free,
 	.prepare =		snd_es1688_playback_prepare,
@@ -716,7 +709,6 @@ static struct snd_pcm_ops snd_es1688_cap
 static struct snd_pcm_ops snd_es1688_capture_ops = {
 	.open =			snd_es1688_capture_open,
 	.close =		snd_es1688_capture_close,
-	.ioctl =		snd_es1688_ioctl,
 	.hw_params =		snd_es1688_hw_params,
 	.hw_free =		snd_es1688_hw_free,
 	.prepare =		snd_es1688_capture_prepare,
diff -r 5829c288c7df isa/es18xx.c
--- a/isa/es18xx.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/es18xx.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1671,7 +1671,6 @@ static struct snd_pcm_ops snd_es18xx_pla
 static struct snd_pcm_ops snd_es18xx_playback_ops = {
 	.open =		snd_es18xx_playback_open,
 	.close =	snd_es18xx_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_es18xx_playback_hw_params,
 	.hw_free =	snd_es18xx_pcm_hw_free,
 	.prepare =	snd_es18xx_playback_prepare,
@@ -1682,7 +1681,6 @@ static struct snd_pcm_ops snd_es18xx_cap
 static struct snd_pcm_ops snd_es18xx_capture_ops = {
 	.open =		snd_es18xx_capture_open,
 	.close =	snd_es18xx_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_es18xx_capture_hw_params,
 	.hw_free =	snd_es18xx_pcm_hw_free,
 	.prepare =	snd_es18xx_capture_prepare,
diff -r 5829c288c7df isa/gus/gus_pcm.c
--- a/isa/gus/gus_pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/gus/gus_pcm.c	Mon Nov 26 16:52:39 2007 +0100
@@ -811,7 +811,6 @@ static struct snd_pcm_ops snd_gf1_pcm_pl
 static struct snd_pcm_ops snd_gf1_pcm_playback_ops = {
 	.open =		snd_gf1_pcm_playback_open,
 	.close =	snd_gf1_pcm_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_gf1_pcm_playback_hw_params,
 	.hw_free =	snd_gf1_pcm_playback_hw_free,
 	.prepare =	snd_gf1_pcm_playback_prepare,
@@ -824,7 +823,6 @@ static struct snd_pcm_ops snd_gf1_pcm_ca
 static struct snd_pcm_ops snd_gf1_pcm_capture_ops = {
 	.open =		snd_gf1_pcm_capture_open,
 	.close =	snd_gf1_pcm_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_gf1_pcm_capture_hw_params,
 	.hw_free =	snd_gf1_pcm_capture_hw_free,
 	.prepare =	snd_gf1_pcm_capture_prepare,
diff -r 5829c288c7df isa/opti9xx/opti92x-ad1848.c
--- a/isa/opti9xx/opti92x-ad1848.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/opti9xx/opti92x-ad1848.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1333,7 +1333,6 @@ static struct snd_pcm_ops snd_opti93x_pl
 static struct snd_pcm_ops snd_opti93x_playback_ops = {
 	.open =		snd_opti93x_playback_open,
 	.close =	snd_opti93x_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_opti93x_hw_params,
 	.hw_free =	snd_opti93x_hw_free,
 	.prepare =	snd_opti93x_playback_prepare,
@@ -1344,7 +1343,6 @@ static struct snd_pcm_ops snd_opti93x_ca
 static struct snd_pcm_ops snd_opti93x_capture_ops = {
 	.open =		snd_opti93x_capture_open,
 	.close =	snd_opti93x_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_opti93x_hw_params,
 	.hw_free =	snd_opti93x_hw_free,
 	.prepare =	snd_opti93x_capture_prepare,
diff -r 5829c288c7df isa/sb/emu8000_pcm.c
--- a/isa/sb/emu8000_pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/sb/emu8000_pcm.c	Mon Nov 26 16:52:39 2007 +0100
@@ -666,7 +666,6 @@ static struct snd_pcm_ops emu8k_pcm_ops 
 static struct snd_pcm_ops emu8k_pcm_ops = {
 	.open =		emu8k_pcm_open,
 	.close =	emu8k_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	emu8k_pcm_hw_params,
 	.hw_free =	emu8k_pcm_hw_free,
 	.prepare =	emu8k_pcm_prepare,
diff -r 5829c288c7df isa/sb/sb16_main.c
--- a/isa/sb/sb16_main.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/sb/sb16_main.c	Mon Nov 26 16:52:39 2007 +0100
@@ -846,7 +846,6 @@ static struct snd_pcm_ops snd_sb16_playb
 static struct snd_pcm_ops snd_sb16_playback_ops = {
 	.open =		snd_sb16_playback_open,
 	.close =	snd_sb16_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_sb16_hw_params,
 	.hw_free =	snd_sb16_hw_free,
 	.prepare =	snd_sb16_playback_prepare,
@@ -857,7 +856,6 @@ static struct snd_pcm_ops snd_sb16_captu
 static struct snd_pcm_ops snd_sb16_capture_ops = {
 	.open =		snd_sb16_capture_open,
 	.close =	snd_sb16_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_sb16_hw_params,
 	.hw_free =	snd_sb16_hw_free,
 	.prepare =	snd_sb16_capture_prepare,
diff -r 5829c288c7df isa/sb/sb8_main.c
--- a/isa/sb/sb8_main.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/isa/sb/sb8_main.c	Mon Nov 26 16:52:39 2007 +0100
@@ -488,7 +488,6 @@ static struct snd_pcm_ops snd_sb8_playba
 static struct snd_pcm_ops snd_sb8_playback_ops = {
 	.open =			snd_sb8_open,
 	.close =		snd_sb8_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_sb8_hw_params,
 	.hw_free =		snd_sb8_hw_free,
 	.prepare =		snd_sb8_playback_prepare,
@@ -499,7 +498,6 @@ static struct snd_pcm_ops snd_sb8_captur
 static struct snd_pcm_ops snd_sb8_capture_ops = {
 	.open =			snd_sb8_open,
 	.close =		snd_sb8_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_sb8_hw_params,
 	.hw_free =		snd_sb8_hw_free,
 	.prepare =		snd_sb8_capture_prepare,
diff -r 5829c288c7df kernel/drivers/media/video/cx88/cx88-alsa.c
--- a/kernel/drivers/media/video/cx88/cx88-alsa.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/kernel/drivers/media/video/cx88/cx88-alsa.c	Mon Nov 26 16:52:39 2007 +0100
@@ -515,7 +515,6 @@ static struct snd_pcm_ops snd_cx88_pcm_o
 static struct snd_pcm_ops snd_cx88_pcm_ops = {
 	.open = snd_cx88_pcm_open,
 	.close = snd_cx88_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_cx88_hw_params,
 	.hw_free = snd_cx88_hw_free,
 	.prepare = snd_cx88_prepare,
diff -r 5829c288c7df kernel/drivers/media/video/saa7134/saa7134-alsa.c
--- a/kernel/drivers/media/video/saa7134/saa7134-alsa.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/kernel/drivers/media/video/saa7134/saa7134-alsa.c	Mon Nov 26 16:52:39 2007 +0100
@@ -658,7 +658,6 @@ static struct snd_pcm_ops snd_card_saa71
 static struct snd_pcm_ops snd_card_saa7134_capture_ops = {
 	.open =			snd_card_saa7134_capture_open,
 	.close =		snd_card_saa7134_capture_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_card_saa7134_hw_params,
 	.hw_free =		snd_card_saa7134_hw_free,
 	.prepare =		snd_card_saa7134_capture_prepare,
diff -r 5829c288c7df mips/au1x00.c
--- a/mips/au1x00.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/mips/au1x00.c	Mon Nov 26 16:52:39 2007 +0100
@@ -419,7 +419,6 @@ static struct snd_pcm_ops snd_card_au100
 static struct snd_pcm_ops snd_card_au1000_playback_ops = {
 	.open			= snd_au1000_playback_open,
 	.close			= snd_au1000_playback_close,
-	.ioctl			= snd_pcm_lib_ioctl,
 	.hw_params	        = snd_au1000_hw_params,
 	.hw_free	        = snd_au1000_hw_free,
 	.prepare		= snd_au1000_playback_prepare,
@@ -430,7 +429,6 @@ static struct snd_pcm_ops snd_card_au100
 static struct snd_pcm_ops snd_card_au1000_capture_ops = {
 	.open			= snd_au1000_capture_open,
 	.close			= snd_au1000_capture_close,
-	.ioctl			= snd_pcm_lib_ioctl,
 	.hw_params	        = snd_au1000_hw_params,
 	.hw_free	        = snd_au1000_hw_free,
 	.prepare		= snd_au1000_capture_prepare,
diff -r 5829c288c7df parisc/harmony.c
--- a/parisc/harmony.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/parisc/harmony.c	Mon Nov 26 16:52:39 2007 +0100
@@ -600,7 +600,6 @@ static struct snd_pcm_ops snd_harmony_pl
 static struct snd_pcm_ops snd_harmony_playback_ops = {
 	.open =	snd_harmony_playback_open,
 	.close = snd_harmony_playback_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_harmony_hw_params,
 	.hw_free = snd_harmony_hw_free,
 	.prepare = snd_harmony_playback_prepare,
@@ -611,7 +610,6 @@ static struct snd_pcm_ops snd_harmony_ca
 static struct snd_pcm_ops snd_harmony_capture_ops = {
         .open = snd_harmony_capture_open,
         .close = snd_harmony_capture_close,
-        .ioctl = snd_pcm_lib_ioctl,
         .hw_params = snd_harmony_hw_params,
         .hw_free = snd_harmony_hw_free,
         .prepare = snd_harmony_capture_prepare,
diff -r 5829c288c7df pci/ad1889.c
--- a/pci/ad1889.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/ad1889.c	Mon Nov 26 16:52:39 2007 +0100
@@ -576,7 +576,6 @@ static struct snd_pcm_ops snd_ad1889_pla
 static struct snd_pcm_ops snd_ad1889_playback_ops = {
 	.open = snd_ad1889_playback_open,
 	.close = snd_ad1889_playback_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_ad1889_hw_params,
 	.hw_free = snd_ad1889_hw_free,
 	.prepare = snd_ad1889_playback_prepare,
@@ -587,7 +586,6 @@ static struct snd_pcm_ops snd_ad1889_cap
 static struct snd_pcm_ops snd_ad1889_capture_ops = {
 	.open = snd_ad1889_capture_open,
 	.close = snd_ad1889_capture_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_ad1889_hw_params,
 	.hw_free = snd_ad1889_hw_free,
 	.prepare = snd_ad1889_capture_prepare,
diff -r 5829c288c7df pci/ali5451/ali5451.c
--- a/pci/ali5451/ali5451.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/ali5451/ali5451.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1615,7 +1615,6 @@ static struct snd_pcm_ops snd_ali_playba
 static struct snd_pcm_ops snd_ali_playback_ops = {
 	.open =		snd_ali_playback_open,
 	.close =	snd_ali_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ali_playback_hw_params,
 	.hw_free =	snd_ali_playback_hw_free,
 	.prepare =	snd_ali_playback_prepare,
@@ -1626,7 +1625,6 @@ static struct snd_pcm_ops snd_ali_captur
 static struct snd_pcm_ops snd_ali_capture_ops = {
 	.open =		snd_ali_capture_open,
 	.close =	snd_ali_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ali_hw_params,
 	.hw_free =	snd_ali_hw_free,
 	.prepare =	snd_ali_prepare,
@@ -1701,7 +1699,6 @@ static struct snd_pcm_ops snd_ali_modem_
 static struct snd_pcm_ops snd_ali_modem_playback_ops = {
 	.open =		snd_ali_modem_playback_open,
 	.close =	snd_ali_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ali_modem_hw_params,
 	.hw_free =	snd_ali_hw_free,
 	.prepare =	snd_ali_prepare,
@@ -1712,7 +1709,6 @@ static struct snd_pcm_ops snd_ali_modem_
 static struct snd_pcm_ops snd_ali_modem_capture_ops = {
 	.open =		snd_ali_modem_capture_open,
 	.close =	snd_ali_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ali_modem_hw_params,
 	.hw_free =	snd_ali_hw_free,
 	.prepare =	snd_ali_prepare,
diff -r 5829c288c7df pci/als300.c
--- a/pci/als300.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/als300.c	Mon Nov 26 16:52:39 2007 +0100
@@ -593,7 +593,6 @@ static struct snd_pcm_ops snd_als300_pla
 static struct snd_pcm_ops snd_als300_playback_ops = {
 	.open =		snd_als300_playback_open,
 	.close =	snd_als300_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_als300_pcm_hw_params,
 	.hw_free =	snd_als300_pcm_hw_free,
 	.prepare =	snd_als300_playback_prepare,
@@ -604,7 +603,6 @@ static struct snd_pcm_ops snd_als300_cap
 static struct snd_pcm_ops snd_als300_capture_ops = {
 	.open =		snd_als300_capture_open,
 	.close =	snd_als300_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_als300_pcm_hw_params,
 	.hw_free =	snd_als300_pcm_hw_free,
 	.prepare =	snd_als300_capture_prepare,
diff -r 5829c288c7df pci/als4000.c
--- a/pci/als4000.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/als4000.c	Mon Nov 26 16:52:39 2007 +0100
@@ -503,7 +503,6 @@ static struct snd_pcm_ops snd_als4000_pl
 static struct snd_pcm_ops snd_als4000_playback_ops = {
 	.open =		snd_als4000_playback_open,
 	.close =	snd_als4000_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_als4000_hw_params,
 	.hw_free =	snd_als4000_hw_free,
 	.prepare =	snd_als4000_playback_prepare,
@@ -514,7 +513,6 @@ static struct snd_pcm_ops snd_als4000_ca
 static struct snd_pcm_ops snd_als4000_capture_ops = {
 	.open =		snd_als4000_capture_open,
 	.close =	snd_als4000_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_als4000_hw_params,
 	.hw_free =	snd_als4000_hw_free,
 	.prepare =	snd_als4000_capture_prepare,
diff -r 5829c288c7df pci/atiixp.c
--- a/pci/atiixp.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/atiixp.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1149,7 +1149,6 @@ static struct snd_pcm_ops snd_atiixp_pla
 static struct snd_pcm_ops snd_atiixp_playback_ops = {
 	.open =		snd_atiixp_playback_open,
 	.close =	snd_atiixp_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_atiixp_pcm_hw_params,
 	.hw_free =	snd_atiixp_pcm_hw_free,
 	.prepare =	snd_atiixp_playback_prepare,
@@ -1161,7 +1160,6 @@ static struct snd_pcm_ops snd_atiixp_cap
 static struct snd_pcm_ops snd_atiixp_capture_ops = {
 	.open =		snd_atiixp_capture_open,
 	.close =	snd_atiixp_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_atiixp_pcm_hw_params,
 	.hw_free =	snd_atiixp_pcm_hw_free,
 	.prepare =	snd_atiixp_capture_prepare,
@@ -1173,7 +1171,6 @@ static struct snd_pcm_ops snd_atiixp_spd
 static struct snd_pcm_ops snd_atiixp_spdif_ops = {
 	.open =		snd_atiixp_spdif_open,
 	.close =	snd_atiixp_spdif_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_atiixp_pcm_hw_params,
 	.hw_free =	snd_atiixp_pcm_hw_free,
 	.prepare =	snd_atiixp_spdif_prepare,
diff -r 5829c288c7df pci/atiixp_modem.c
--- a/pci/atiixp_modem.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/atiixp_modem.c	Mon Nov 26 16:52:39 2007 +0100
@@ -947,7 +947,6 @@ static struct snd_pcm_ops snd_atiixp_pla
 static struct snd_pcm_ops snd_atiixp_playback_ops = {
 	.open =		snd_atiixp_playback_open,
 	.close =	snd_atiixp_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_atiixp_pcm_hw_params,
 	.hw_free =	snd_atiixp_pcm_hw_free,
 	.prepare =	snd_atiixp_playback_prepare,
@@ -959,7 +958,6 @@ static struct snd_pcm_ops snd_atiixp_cap
 static struct snd_pcm_ops snd_atiixp_capture_ops = {
 	.open =		snd_atiixp_capture_open,
 	.close =	snd_atiixp_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_atiixp_pcm_hw_params,
 	.hw_free =	snd_atiixp_pcm_hw_free,
 	.prepare =	snd_atiixp_capture_prepare,
diff -r 5829c288c7df pci/au88x0/au88x0_pcm.c
--- a/pci/au88x0/au88x0_pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/au88x0/au88x0_pcm.c	Mon Nov 26 16:52:39 2007 +0100
@@ -404,7 +404,6 @@ static struct snd_pcm_ops snd_vortex_pla
 static struct snd_pcm_ops snd_vortex_playback_ops = {
 	.open = snd_vortex_pcm_open,
 	.close = snd_vortex_pcm_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_vortex_pcm_hw_params,
 	.hw_free = snd_vortex_pcm_hw_free,
 	.prepare = snd_vortex_pcm_prepare,
diff -r 5829c288c7df pci/azt3328.c
--- a/pci/azt3328.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/azt3328.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1397,7 +1397,6 @@ static struct snd_pcm_ops snd_azf3328_pl
 static struct snd_pcm_ops snd_azf3328_playback_ops = {
 	.open =		snd_azf3328_playback_open,
 	.close =	snd_azf3328_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_azf3328_hw_params,
 	.hw_free =	snd_azf3328_hw_free,
 	.prepare =	snd_azf3328_playback_prepare,
@@ -1408,7 +1407,6 @@ static struct snd_pcm_ops snd_azf3328_ca
 static struct snd_pcm_ops snd_azf3328_capture_ops = {
 	.open =		snd_azf3328_capture_open,
 	.close =	snd_azf3328_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_azf3328_hw_params,
 	.hw_free =	snd_azf3328_hw_free,
 	.prepare =	snd_azf3328_capture_prepare,
diff -r 5829c288c7df pci/bt87x.c
--- a/pci/bt87x.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/bt87x.c	Mon Nov 26 16:52:39 2007 +0100
@@ -543,7 +543,6 @@ static struct snd_pcm_ops snd_bt87x_pcm_
 static struct snd_pcm_ops snd_bt87x_pcm_ops = {
 	.open = snd_bt87x_pcm_open,
 	.close = snd_bt87x_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_bt87x_hw_params,
 	.hw_free = snd_bt87x_hw_free,
 	.prepare = snd_bt87x_prepare,
diff -r 5829c288c7df pci/ca0106/ca0106_main.c
--- a/pci/ca0106/ca0106_main.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/ca0106/ca0106_main.c	Mon Nov 26 16:52:39 2007 +0100
@@ -967,7 +967,6 @@ static struct snd_pcm_ops snd_ca0106_pla
 static struct snd_pcm_ops snd_ca0106_playback_front_ops = {
 	.open =        snd_ca0106_pcm_open_playback_front,
 	.close =       snd_ca0106_pcm_close_playback,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_ca0106_pcm_hw_params_playback,
 	.hw_free =     snd_ca0106_pcm_hw_free_playback,
 	.prepare =     snd_ca0106_pcm_prepare_playback,
@@ -978,7 +977,6 @@ static struct snd_pcm_ops snd_ca0106_cap
 static struct snd_pcm_ops snd_ca0106_capture_0_ops = {
 	.open =        snd_ca0106_pcm_open_0_capture,
 	.close =       snd_ca0106_pcm_close_capture,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_ca0106_pcm_hw_params_capture,
 	.hw_free =     snd_ca0106_pcm_hw_free_capture,
 	.prepare =     snd_ca0106_pcm_prepare_capture,
@@ -989,7 +987,6 @@ static struct snd_pcm_ops snd_ca0106_cap
 static struct snd_pcm_ops snd_ca0106_capture_1_ops = {
 	.open =        snd_ca0106_pcm_open_1_capture,
 	.close =       snd_ca0106_pcm_close_capture,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_ca0106_pcm_hw_params_capture,
 	.hw_free =     snd_ca0106_pcm_hw_free_capture,
 	.prepare =     snd_ca0106_pcm_prepare_capture,
@@ -1000,7 +997,6 @@ static struct snd_pcm_ops snd_ca0106_cap
 static struct snd_pcm_ops snd_ca0106_capture_2_ops = {
 	.open =        snd_ca0106_pcm_open_2_capture,
 	.close =       snd_ca0106_pcm_close_capture,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_ca0106_pcm_hw_params_capture,
 	.hw_free =     snd_ca0106_pcm_hw_free_capture,
 	.prepare =     snd_ca0106_pcm_prepare_capture,
@@ -1011,7 +1007,6 @@ static struct snd_pcm_ops snd_ca0106_cap
 static struct snd_pcm_ops snd_ca0106_capture_3_ops = {
 	.open =        snd_ca0106_pcm_open_3_capture,
 	.close =       snd_ca0106_pcm_close_capture,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_ca0106_pcm_hw_params_capture,
 	.hw_free =     snd_ca0106_pcm_hw_free_capture,
 	.prepare =     snd_ca0106_pcm_prepare_capture,
@@ -1022,7 +1017,6 @@ static struct snd_pcm_ops snd_ca0106_pla
 static struct snd_pcm_ops snd_ca0106_playback_center_lfe_ops = {
         .open =         snd_ca0106_pcm_open_playback_center_lfe,
         .close =        snd_ca0106_pcm_close_playback,
-        .ioctl =        snd_pcm_lib_ioctl,
         .hw_params =    snd_ca0106_pcm_hw_params_playback,
         .hw_free =      snd_ca0106_pcm_hw_free_playback,
         .prepare =      snd_ca0106_pcm_prepare_playback,     
@@ -1033,7 +1027,6 @@ static struct snd_pcm_ops snd_ca0106_pla
 static struct snd_pcm_ops snd_ca0106_playback_unknown_ops = {
         .open =         snd_ca0106_pcm_open_playback_unknown,
         .close =        snd_ca0106_pcm_close_playback,
-        .ioctl =        snd_pcm_lib_ioctl,
         .hw_params =    snd_ca0106_pcm_hw_params_playback,
         .hw_free =      snd_ca0106_pcm_hw_free_playback,
         .prepare =      snd_ca0106_pcm_prepare_playback,     
@@ -1044,7 +1037,6 @@ static struct snd_pcm_ops snd_ca0106_pla
 static struct snd_pcm_ops snd_ca0106_playback_rear_ops = {
         .open =         snd_ca0106_pcm_open_playback_rear,
         .close =        snd_ca0106_pcm_close_playback,
-        .ioctl =        snd_pcm_lib_ioctl,
         .hw_params =    snd_ca0106_pcm_hw_params_playback,
 		.hw_free =      snd_ca0106_pcm_hw_free_playback,
         .prepare =      snd_ca0106_pcm_prepare_playback,     
diff -r 5829c288c7df pci/cmipci.c
--- a/pci/cmipci.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/cmipci.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1834,7 +1834,6 @@ static struct snd_pcm_ops snd_cmipci_pla
 static struct snd_pcm_ops snd_cmipci_playback_ops = {
 	.open =		snd_cmipci_playback_open,
 	.close =	snd_cmipci_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cmipci_hw_params,
 	.hw_free =	snd_cmipci_playback_hw_free,
 	.prepare =	snd_cmipci_playback_prepare,
@@ -1845,7 +1844,6 @@ static struct snd_pcm_ops snd_cmipci_cap
 static struct snd_pcm_ops snd_cmipci_capture_ops = {
 	.open =		snd_cmipci_capture_open,
 	.close =	snd_cmipci_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cmipci_hw_params,
 	.hw_free =	snd_cmipci_hw_free,
 	.prepare =	snd_cmipci_capture_prepare,
@@ -1856,7 +1854,6 @@ static struct snd_pcm_ops snd_cmipci_pla
 static struct snd_pcm_ops snd_cmipci_playback2_ops = {
 	.open =		snd_cmipci_playback2_open,
 	.close =	snd_cmipci_playback2_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cmipci_playback2_hw_params,
 	.hw_free =	snd_cmipci_playback2_hw_free,
 	.prepare =	snd_cmipci_capture_prepare,	/* channel B */
@@ -1867,7 +1864,6 @@ static struct snd_pcm_ops snd_cmipci_pla
 static struct snd_pcm_ops snd_cmipci_playback_spdif_ops = {
 	.open =		snd_cmipci_playback_spdif_open,
 	.close =	snd_cmipci_playback_spdif_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cmipci_hw_params,
 	.hw_free =	snd_cmipci_playback_hw_free,
 	.prepare =	snd_cmipci_playback_spdif_prepare,	/* set up rate */
@@ -1878,7 +1874,6 @@ static struct snd_pcm_ops snd_cmipci_cap
 static struct snd_pcm_ops snd_cmipci_capture_spdif_ops = {
 	.open =		snd_cmipci_capture_spdif_open,
 	.close =	snd_cmipci_capture_spdif_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cmipci_hw_params,
 	.hw_free =	snd_cmipci_capture_spdif_hw_free,
 	.prepare =	snd_cmipci_capture_spdif_prepare,
diff -r 5829c288c7df pci/cs4281.c
--- a/pci/cs4281.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/cs4281.c	Mon Nov 26 16:52:39 2007 +0100
@@ -947,7 +947,6 @@ static struct snd_pcm_ops snd_cs4281_pla
 static struct snd_pcm_ops snd_cs4281_playback_ops = {
 	.open =		snd_cs4281_playback_open,
 	.close =	snd_cs4281_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cs4281_hw_params,
 	.hw_free =	snd_cs4281_hw_free,
 	.prepare =	snd_cs4281_playback_prepare,
@@ -958,7 +957,6 @@ static struct snd_pcm_ops snd_cs4281_cap
 static struct snd_pcm_ops snd_cs4281_capture_ops = {
 	.open =		snd_cs4281_capture_open,
 	.close =	snd_cs4281_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cs4281_hw_params,
 	.hw_free =	snd_cs4281_hw_free,
 	.prepare =	snd_cs4281_capture_prepare,
diff -r 5829c288c7df pci/cs46xx/cs46xx_lib.c
--- a/pci/cs46xx/cs46xx_lib.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/cs46xx/cs46xx_lib.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1462,7 +1462,6 @@ static struct snd_pcm_ops snd_cs46xx_pla
 static struct snd_pcm_ops snd_cs46xx_playback_rear_ops = {
 	.open =			snd_cs46xx_playback_open_rear,
 	.close =		snd_cs46xx_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_playback_hw_params,
 	.hw_free =		snd_cs46xx_playback_hw_free,
 	.prepare =		snd_cs46xx_playback_prepare,
@@ -1473,7 +1472,6 @@ static struct snd_pcm_ops snd_cs46xx_pla
 static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops = {
 	.open =			snd_cs46xx_playback_open_rear,
 	.close =		snd_cs46xx_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_playback_hw_params,
 	.hw_free =		snd_cs46xx_playback_hw_free,
 	.prepare =		snd_cs46xx_playback_prepare,
@@ -1485,7 +1483,6 @@ static struct snd_pcm_ops snd_cs46xx_pla
 static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops = {
 	.open =			snd_cs46xx_playback_open_clfe,
 	.close =		snd_cs46xx_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_playback_hw_params,
 	.hw_free =		snd_cs46xx_playback_hw_free,
 	.prepare =		snd_cs46xx_playback_prepare,
@@ -1496,7 +1493,6 @@ static struct snd_pcm_ops snd_cs46xx_pla
 static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops = {
 	.open =			snd_cs46xx_playback_open_clfe,
 	.close =		snd_cs46xx_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_playback_hw_params,
 	.hw_free =		snd_cs46xx_playback_hw_free,
 	.prepare =		snd_cs46xx_playback_prepare,
@@ -1508,7 +1504,6 @@ static struct snd_pcm_ops snd_cs46xx_pla
 static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops = {
 	.open =			snd_cs46xx_playback_open_iec958,
 	.close =		snd_cs46xx_playback_close_iec958,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_playback_hw_params,
 	.hw_free =		snd_cs46xx_playback_hw_free,
 	.prepare =		snd_cs46xx_playback_prepare,
@@ -1519,7 +1514,6 @@ static struct snd_pcm_ops snd_cs46xx_pla
 static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops = {
 	.open =			snd_cs46xx_playback_open_iec958,
 	.close =		snd_cs46xx_playback_close_iec958,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_playback_hw_params,
 	.hw_free =		snd_cs46xx_playback_hw_free,
 	.prepare =		snd_cs46xx_playback_prepare,
@@ -1533,7 +1527,6 @@ static struct snd_pcm_ops snd_cs46xx_pla
 static struct snd_pcm_ops snd_cs46xx_playback_ops = {
 	.open =			snd_cs46xx_playback_open,
 	.close =		snd_cs46xx_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_playback_hw_params,
 	.hw_free =		snd_cs46xx_playback_hw_free,
 	.prepare =		snd_cs46xx_playback_prepare,
@@ -1544,7 +1537,6 @@ static struct snd_pcm_ops snd_cs46xx_pla
 static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops = {
 	.open =			snd_cs46xx_playback_open,
 	.close =		snd_cs46xx_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_playback_hw_params,
 	.hw_free =		snd_cs46xx_playback_hw_free,
 	.prepare =		snd_cs46xx_playback_prepare,
@@ -1556,7 +1548,6 @@ static struct snd_pcm_ops snd_cs46xx_cap
 static struct snd_pcm_ops snd_cs46xx_capture_ops = {
 	.open =			snd_cs46xx_capture_open,
 	.close =		snd_cs46xx_capture_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_capture_hw_params,
 	.hw_free =		snd_cs46xx_capture_hw_free,
 	.prepare =		snd_cs46xx_capture_prepare,
@@ -1567,7 +1558,6 @@ static struct snd_pcm_ops snd_cs46xx_cap
 static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops = {
 	.open =			snd_cs46xx_capture_open,
 	.close =		snd_cs46xx_capture_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_cs46xx_capture_hw_params,
 	.hw_free =		snd_cs46xx_capture_hw_free,
 	.prepare =		snd_cs46xx_capture_prepare,
diff -r 5829c288c7df pci/cs5535audio/cs5535audio_pcm.c
--- a/pci/cs5535audio/cs5535audio_pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/cs5535audio/cs5535audio_pcm.c	Mon Nov 26 16:52:39 2007 +0100
@@ -366,7 +366,6 @@ static struct snd_pcm_ops snd_cs5535audi
 static struct snd_pcm_ops snd_cs5535audio_playback_ops = {
 	.open =		snd_cs5535audio_playback_open,
 	.close =	snd_cs5535audio_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cs5535audio_hw_params,
 	.hw_free =	snd_cs5535audio_hw_free,
 	.prepare =	snd_cs5535audio_playback_prepare,
@@ -377,7 +376,6 @@ static struct snd_pcm_ops snd_cs5535audi
 static struct snd_pcm_ops snd_cs5535audio_capture_ops = {
 	.open =		snd_cs5535audio_capture_open,
 	.close =	snd_cs5535audio_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_cs5535audio_hw_params,
 	.hw_free =	snd_cs5535audio_hw_free,
 	.prepare =	snd_cs5535audio_capture_prepare,
diff -r 5829c288c7df pci/echoaudio/echoaudio.c
--- a/pci/echoaudio/echoaudio.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/echoaudio/echoaudio.c	Mon Nov 26 16:52:39 2007 +0100
@@ -795,7 +795,6 @@ static struct snd_pcm_ops analog_playbac
 static struct snd_pcm_ops analog_playback_ops = {
 	.open = pcm_analog_out_open,
 	.close = pcm_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = pcm_analog_out_hw_params,
 	.hw_free = pcm_hw_free,
 	.prepare = pcm_prepare,
@@ -806,7 +805,6 @@ static struct snd_pcm_ops analog_capture
 static struct snd_pcm_ops analog_capture_ops = {
 	.open = pcm_analog_in_open,
 	.close = pcm_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = pcm_analog_in_hw_params,
 	.hw_free = pcm_hw_free,
 	.prepare = pcm_prepare,
@@ -819,7 +817,6 @@ static struct snd_pcm_ops digital_playba
 static struct snd_pcm_ops digital_playback_ops = {
 	.open = pcm_digital_out_open,
 	.close = pcm_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = pcm_digital_out_hw_params,
 	.hw_free = pcm_hw_free,
 	.prepare = pcm_prepare,
@@ -831,7 +828,6 @@ static struct snd_pcm_ops digital_captur
 static struct snd_pcm_ops digital_capture_ops = {
 	.open = pcm_digital_in_open,
 	.close = pcm_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = pcm_digital_in_hw_params,
 	.hw_free = pcm_hw_free,
 	.prepare = pcm_prepare,
diff -r 5829c288c7df pci/emu10k1/emu10k1x.c
--- a/pci/emu10k1/emu10k1x.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/emu10k1/emu10k1x.c	Mon Nov 26 16:52:39 2007 +0100
@@ -547,7 +547,6 @@ static struct snd_pcm_ops snd_emu10k1x_p
 static struct snd_pcm_ops snd_emu10k1x_playback_ops = {
 	.open =        snd_emu10k1x_playback_open,
 	.close =       snd_emu10k1x_playback_close,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_emu10k1x_pcm_hw_params,
 	.hw_free =     snd_emu10k1x_pcm_hw_free,
 	.prepare =     snd_emu10k1x_pcm_prepare,
@@ -693,7 +692,6 @@ static struct snd_pcm_ops snd_emu10k1x_c
 static struct snd_pcm_ops snd_emu10k1x_capture_ops = {
 	.open =        snd_emu10k1x_pcm_open_capture,
 	.close =       snd_emu10k1x_pcm_close_capture,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_emu10k1x_pcm_hw_params_capture,
 	.hw_free =     snd_emu10k1x_pcm_hw_free_capture,
 	.prepare =     snd_emu10k1x_pcm_prepare_capture,
diff -r 5829c288c7df pci/emu10k1/emupcm.c
--- a/pci/emu10k1/emupcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/emu10k1/emupcm.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1318,7 +1318,6 @@ static struct snd_pcm_ops snd_emu10k1_pl
 static struct snd_pcm_ops snd_emu10k1_playback_ops = {
 	.open =			snd_emu10k1_playback_open,
 	.close =		snd_emu10k1_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_emu10k1_playback_hw_params,
 	.hw_free =		snd_emu10k1_playback_hw_free,
 	.prepare =		snd_emu10k1_playback_prepare,
@@ -1330,7 +1329,6 @@ static struct snd_pcm_ops snd_emu10k1_ca
 static struct snd_pcm_ops snd_emu10k1_capture_ops = {
 	.open =			snd_emu10k1_capture_open,
 	.close =		snd_emu10k1_capture_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_emu10k1_capture_hw_params,
 	.hw_free =		snd_emu10k1_capture_hw_free,
 	.prepare =		snd_emu10k1_capture_prepare,
@@ -1342,7 +1340,6 @@ static struct snd_pcm_ops snd_emu10k1_ef
 static struct snd_pcm_ops snd_emu10k1_efx_playback_ops = {
 	.open =			snd_emu10k1_efx_playback_open,
 	.close =		snd_emu10k1_efx_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_emu10k1_playback_hw_params,
 	.hw_free =		snd_emu10k1_efx_playback_hw_free,
 	.prepare =		snd_emu10k1_efx_playback_prepare,
@@ -1421,7 +1418,6 @@ static struct snd_pcm_ops snd_emu10k1_ca
 static struct snd_pcm_ops snd_emu10k1_capture_mic_ops = {
 	.open =			snd_emu10k1_capture_mic_open,
 	.close =		snd_emu10k1_capture_mic_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_emu10k1_capture_hw_params,
 	.hw_free =		snd_emu10k1_capture_hw_free,
 	.prepare =		snd_emu10k1_capture_prepare,
@@ -1521,7 +1517,6 @@ static struct snd_pcm_ops snd_emu10k1_ca
 static struct snd_pcm_ops snd_emu10k1_capture_efx_ops = {
 	.open =			snd_emu10k1_capture_efx_open,
 	.close =		snd_emu10k1_capture_efx_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_emu10k1_capture_hw_params,
 	.hw_free =		snd_emu10k1_capture_hw_free,
 	.prepare =		snd_emu10k1_capture_prepare,
@@ -1752,7 +1747,6 @@ static struct snd_pcm_ops snd_emu10k1_fx
 static struct snd_pcm_ops snd_emu10k1_fx8010_playback_ops = {
 	.open =			snd_emu10k1_fx8010_playback_open,
 	.close =		snd_emu10k1_fx8010_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_emu10k1_fx8010_playback_hw_params,
 	.hw_free =		snd_emu10k1_fx8010_playback_hw_free,
 	.prepare =		snd_emu10k1_fx8010_playback_prepare,
diff -r 5829c288c7df pci/emu10k1/p16v.c
--- a/pci/emu10k1/p16v.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/emu10k1/p16v.c	Mon Nov 26 16:52:39 2007 +0100
@@ -568,7 +568,6 @@ static struct snd_pcm_ops snd_p16v_playb
 static struct snd_pcm_ops snd_p16v_playback_front_ops = {
 	.open =        snd_p16v_pcm_open_playback_front,
 	.close =       snd_p16v_pcm_close_playback,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_p16v_pcm_hw_params_playback,
 	.hw_free =     snd_p16v_pcm_hw_free_playback,
 	.prepare =     snd_p16v_pcm_prepare_playback,
@@ -579,7 +578,6 @@ static struct snd_pcm_ops snd_p16v_captu
 static struct snd_pcm_ops snd_p16v_capture_ops = {
 	.open =        snd_p16v_pcm_open_capture,
 	.close =       snd_p16v_pcm_close_capture,
-	.ioctl =       snd_pcm_lib_ioctl,
 	.hw_params =   snd_p16v_pcm_hw_params_capture,
 	.hw_free =     snd_p16v_pcm_hw_free_capture,
 	.prepare =     snd_p16v_pcm_prepare_capture,
diff -r 5829c288c7df pci/ens1370.c
--- a/pci/ens1370.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/ens1370.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1213,7 +1213,6 @@ static struct snd_pcm_ops snd_ensoniq_pl
 static struct snd_pcm_ops snd_ensoniq_playback1_ops = {
 	.open =		snd_ensoniq_playback1_open,
 	.close =	snd_ensoniq_playback1_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ensoniq_hw_params,
 	.hw_free =	snd_ensoniq_hw_free,
 	.prepare =	snd_ensoniq_playback1_prepare,
@@ -1224,7 +1223,6 @@ static struct snd_pcm_ops snd_ensoniq_pl
 static struct snd_pcm_ops snd_ensoniq_playback2_ops = {
 	.open =		snd_ensoniq_playback2_open,
 	.close =	snd_ensoniq_playback2_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ensoniq_hw_params,
 	.hw_free =	snd_ensoniq_hw_free,
 	.prepare =	snd_ensoniq_playback2_prepare,
@@ -1235,7 +1233,6 @@ static struct snd_pcm_ops snd_ensoniq_ca
 static struct snd_pcm_ops snd_ensoniq_capture_ops = {
 	.open =		snd_ensoniq_capture_open,
 	.close =	snd_ensoniq_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ensoniq_hw_params,
 	.hw_free =	snd_ensoniq_hw_free,
 	.prepare =	snd_ensoniq_capture_prepare,
diff -r 5829c288c7df pci/es1938.c
--- a/pci/es1938.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/es1938.c	Mon Nov 26 16:52:39 2007 +0100
@@ -984,7 +984,6 @@ static struct snd_pcm_ops snd_es1938_pla
 static struct snd_pcm_ops snd_es1938_playback_ops = {
 	.open =		snd_es1938_playback_open,
 	.close =	snd_es1938_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_es1938_pcm_hw_params,
 	.hw_free =	snd_es1938_pcm_hw_free,
 	.prepare =	snd_es1938_playback_prepare,
@@ -995,7 +994,6 @@ static struct snd_pcm_ops snd_es1938_cap
 static struct snd_pcm_ops snd_es1938_capture_ops = {
 	.open =		snd_es1938_capture_open,
 	.close =	snd_es1938_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_es1938_pcm_hw_params,
 	.hw_free =	snd_es1938_pcm_hw_free,
 	.prepare =	snd_es1938_capture_prepare,
diff -r 5829c288c7df pci/es1968.c
--- a/pci/es1968.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/es1968.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1654,7 +1654,6 @@ static struct snd_pcm_ops snd_es1968_pla
 static struct snd_pcm_ops snd_es1968_playback_ops = {
 	.open =		snd_es1968_playback_open,
 	.close =	snd_es1968_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_es1968_hw_params,
 	.hw_free =	snd_es1968_hw_free,
 	.prepare =	snd_es1968_pcm_prepare,
@@ -1665,7 +1664,6 @@ static struct snd_pcm_ops snd_es1968_cap
 static struct snd_pcm_ops snd_es1968_capture_ops = {
 	.open =		snd_es1968_capture_open,
 	.close =	snd_es1968_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_es1968_hw_params,
 	.hw_free =	snd_es1968_hw_free,
 	.prepare =	snd_es1968_pcm_prepare,
diff -r 5829c288c7df pci/fm801.c
--- a/pci/fm801.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/fm801.c	Mon Nov 26 16:52:39 2007 +0100
@@ -663,7 +663,6 @@ static struct snd_pcm_ops snd_fm801_play
 static struct snd_pcm_ops snd_fm801_playback_ops = {
 	.open =		snd_fm801_playback_open,
 	.close =	snd_fm801_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_fm801_hw_params,
 	.hw_free =	snd_fm801_hw_free,
 	.prepare =	snd_fm801_playback_prepare,
@@ -674,7 +673,6 @@ static struct snd_pcm_ops snd_fm801_capt
 static struct snd_pcm_ops snd_fm801_capture_ops = {
 	.open =		snd_fm801_capture_open,
 	.close =	snd_fm801_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_fm801_hw_params,
 	.hw_free =	snd_fm801_hw_free,
 	.prepare =	snd_fm801_capture_prepare,
diff -r 5829c288c7df pci/hda/hda_intel.c
--- a/pci/hda/hda_intel.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/hda/hda_intel.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1340,7 +1340,6 @@ static struct snd_pcm_ops azx_pcm_ops = 
 static struct snd_pcm_ops azx_pcm_ops = {
 	.open = azx_pcm_open,
 	.close = azx_pcm_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = azx_pcm_hw_params,
 	.hw_free = azx_pcm_hw_free,
 	.prepare = azx_pcm_prepare,
diff -r 5829c288c7df pci/ice1712/ice1712.c
--- a/pci/ice1712/ice1712.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/ice1712/ice1712.c	Mon Nov 26 16:52:39 2007 +0100
@@ -841,7 +841,6 @@ static struct snd_pcm_ops snd_ice1712_pl
 static struct snd_pcm_ops snd_ice1712_playback_ops = {
 	.open =		snd_ice1712_playback_open,
 	.close =	snd_ice1712_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ice1712_hw_params,
 	.hw_free =	snd_ice1712_hw_free,
 	.prepare =	snd_ice1712_playback_prepare,
@@ -852,7 +851,6 @@ static struct snd_pcm_ops snd_ice1712_pl
 static struct snd_pcm_ops snd_ice1712_playback_ds_ops = {
 	.open =		snd_ice1712_playback_ds_open,
 	.close =	snd_ice1712_playback_ds_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ice1712_hw_params,
 	.hw_free =	snd_ice1712_hw_free,
 	.prepare =	snd_ice1712_playback_ds_prepare,
@@ -863,7 +861,6 @@ static struct snd_pcm_ops snd_ice1712_ca
 static struct snd_pcm_ops snd_ice1712_capture_ops = {
 	.open =		snd_ice1712_capture_open,
 	.close =	snd_ice1712_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ice1712_hw_params,
 	.hw_free =	snd_ice1712_hw_free,
 	.prepare =	snd_ice1712_capture_prepare,
@@ -1220,7 +1217,6 @@ static struct snd_pcm_ops snd_ice1712_pl
 static struct snd_pcm_ops snd_ice1712_playback_pro_ops = {
 	.open =		snd_ice1712_playback_pro_open,
 	.close =	snd_ice1712_playback_pro_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ice1712_playback_pro_hw_params,
 	.hw_free =	snd_ice1712_hw_free,
 	.prepare =	snd_ice1712_playback_pro_prepare,
@@ -1231,7 +1227,6 @@ static struct snd_pcm_ops snd_ice1712_ca
 static struct snd_pcm_ops snd_ice1712_capture_pro_ops = {
 	.open =		snd_ice1712_capture_pro_open,
 	.close =	snd_ice1712_capture_pro_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_ice1712_capture_pro_hw_params,
 	.hw_free =	snd_ice1712_hw_free,
 	.prepare =	snd_ice1712_capture_pro_prepare,
diff -r 5829c288c7df pci/ice1712/ice1724.c
--- a/pci/ice1712/ice1724.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/ice1712/ice1724.c	Mon Nov 26 16:52:39 2007 +0100
@@ -842,7 +842,6 @@ static struct snd_pcm_ops snd_vt1724_pla
 static struct snd_pcm_ops snd_vt1724_playback_pro_ops = {
 	.open =		snd_vt1724_playback_pro_open,
 	.close =	snd_vt1724_playback_pro_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_vt1724_pcm_hw_params,
 	.hw_free =	snd_vt1724_pcm_hw_free,
 	.prepare =	snd_vt1724_playback_pro_prepare,
@@ -853,7 +852,6 @@ static struct snd_pcm_ops snd_vt1724_cap
 static struct snd_pcm_ops snd_vt1724_capture_pro_ops = {
 	.open =		snd_vt1724_capture_pro_open,
 	.close =	snd_vt1724_capture_pro_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_vt1724_pcm_hw_params,
 	.hw_free =	snd_vt1724_pcm_hw_free,
 	.prepare =	snd_vt1724_pcm_prepare,
@@ -1018,7 +1016,6 @@ static struct snd_pcm_ops snd_vt1724_pla
 static struct snd_pcm_ops snd_vt1724_playback_spdif_ops = {
 	.open =		snd_vt1724_playback_spdif_open,
 	.close =	snd_vt1724_playback_spdif_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_vt1724_pcm_hw_params,
 	.hw_free =	snd_vt1724_pcm_hw_free,
 	.prepare =	snd_vt1724_playback_spdif_prepare,
@@ -1029,7 +1026,6 @@ static struct snd_pcm_ops snd_vt1724_cap
 static struct snd_pcm_ops snd_vt1724_capture_spdif_ops = {
 	.open =		snd_vt1724_capture_spdif_open,
 	.close =	snd_vt1724_capture_spdif_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_vt1724_pcm_hw_params,
 	.hw_free =	snd_vt1724_pcm_hw_free,
 	.prepare =	snd_vt1724_pcm_prepare,
@@ -1163,7 +1159,6 @@ static struct snd_pcm_ops snd_vt1724_pla
 static struct snd_pcm_ops snd_vt1724_playback_indep_ops = {
 	.open =		snd_vt1724_playback_indep_open,
 	.close =	snd_vt1724_playback_indep_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_vt1724_pcm_hw_params,
 	.hw_free =	snd_vt1724_pcm_hw_free,
 	.prepare =	snd_vt1724_playback_indep_prepare,
diff -r 5829c288c7df pci/intel8x0.c
--- a/pci/intel8x0.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/intel8x0.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1307,7 +1307,6 @@ static struct snd_pcm_ops snd_intel8x0_p
 static struct snd_pcm_ops snd_intel8x0_playback_ops = {
 	.open =		snd_intel8x0_playback_open,
 	.close =	snd_intel8x0_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1318,7 +1317,6 @@ static struct snd_pcm_ops snd_intel8x0_c
 static struct snd_pcm_ops snd_intel8x0_capture_ops = {
 	.open =		snd_intel8x0_capture_open,
 	.close =	snd_intel8x0_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1329,7 +1327,6 @@ static struct snd_pcm_ops snd_intel8x0_c
 static struct snd_pcm_ops snd_intel8x0_capture_mic_ops = {
 	.open =		snd_intel8x0_mic_open,
 	.close =	snd_intel8x0_mic_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1340,7 +1337,6 @@ static struct snd_pcm_ops snd_intel8x0_c
 static struct snd_pcm_ops snd_intel8x0_capture_mic2_ops = {
 	.open =		snd_intel8x0_mic2_open,
 	.close =	snd_intel8x0_mic2_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1351,7 +1347,6 @@ static struct snd_pcm_ops snd_intel8x0_c
 static struct snd_pcm_ops snd_intel8x0_capture2_ops = {
 	.open =		snd_intel8x0_capture2_open,
 	.close =	snd_intel8x0_capture2_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1362,7 +1357,6 @@ static struct snd_pcm_ops snd_intel8x0_s
 static struct snd_pcm_ops snd_intel8x0_spdif_ops = {
 	.open =		snd_intel8x0_spdif_open,
 	.close =	snd_intel8x0_spdif_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1373,7 +1367,6 @@ static struct snd_pcm_ops snd_intel8x0_a
 static struct snd_pcm_ops snd_intel8x0_ali_playback_ops = {
 	.open =		snd_intel8x0_playback_open,
 	.close =	snd_intel8x0_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1384,7 +1377,6 @@ static struct snd_pcm_ops snd_intel8x0_a
 static struct snd_pcm_ops snd_intel8x0_ali_capture_ops = {
 	.open =		snd_intel8x0_capture_open,
 	.close =	snd_intel8x0_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1395,7 +1387,6 @@ static struct snd_pcm_ops snd_intel8x0_a
 static struct snd_pcm_ops snd_intel8x0_ali_capture_mic_ops = {
 	.open =		snd_intel8x0_mic_open,
 	.close =	snd_intel8x0_mic_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1406,7 +1397,6 @@ static struct snd_pcm_ops snd_intel8x0_a
 static struct snd_pcm_ops snd_intel8x0_ali_ac97spdifout_ops = {
 	.open =		snd_intel8x0_ali_ac97spdifout_open,
 	.close =	snd_intel8x0_ali_ac97spdifout_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1418,7 +1408,6 @@ static struct snd_pcm_ops snd_intel8x0_a
 static struct snd_pcm_ops snd_intel8x0_ali_spdifin_ops = {
 	.open =		snd_intel8x0_ali_spdifin_open,
 	.close =	snd_intel8x0_ali_spdifin_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
@@ -1429,7 +1418,6 @@ static struct snd_pcm_ops snd_intel8x0_a
 static struct snd_pcm_ops snd_intel8x0_ali_spdifout_ops = {
 	.open =		snd_intel8x0_ali_spdifout_open,
 	.close =	snd_intel8x0_ali_spdifout_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0_pcm_prepare,
diff -r 5829c288c7df pci/intel8x0m.c
--- a/pci/intel8x0m.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/intel8x0m.c	Mon Nov 26 16:52:39 2007 +0100
@@ -675,7 +675,6 @@ static struct snd_pcm_ops snd_intel8x0m_
 static struct snd_pcm_ops snd_intel8x0m_playback_ops = {
 	.open =		snd_intel8x0m_playback_open,
 	.close =	snd_intel8x0m_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0m_pcm_prepare,
@@ -686,7 +685,6 @@ static struct snd_pcm_ops snd_intel8x0m_
 static struct snd_pcm_ops snd_intel8x0m_capture_ops = {
 	.open =		snd_intel8x0m_capture_open,
 	.close =	snd_intel8x0m_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_intel8x0_hw_params,
 	.hw_free =	snd_intel8x0_hw_free,
 	.prepare =	snd_intel8x0m_pcm_prepare,
diff -r 5829c288c7df pci/korg1212/korg1212.c
--- a/pci/korg1212/korg1212.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/korg1212/korg1212.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1478,21 +1478,17 @@ static int snd_korg1212_capture_close(st
         return 0;
 }
 
-static int snd_korg1212_ioctl(struct snd_pcm_substream *substream,
-			     unsigned int cmd, void *arg)
+static int snd_korg1212_channel_info(struct snd_pcm_substream *substream,
+				     struct snd_pcm_channel_info *info)
 {
-	K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_ioctl: cmd=%d\n", cmd);
-
-	if (cmd == SNDRV_PCM_IOCTL1_CHANNEL_INFO ) {
-		struct snd_pcm_channel_info *info = arg;
-        	info->offset = 0;
-        	info->first = info->channel * 16;
-        	info->step = 256;
-		K1212_DEBUG_PRINTK("K1212_DEBUG: channel_info %d:, offset=%ld, first=%d, step=%d\n", info->channel, info->offset, info->first, info->step);
-		return 0;
-	}
-
-        return snd_pcm_lib_ioctl(substream, cmd, arg);
+	info->offset = 0;
+	info->first = info->channel * 16;
+	info->step = 256;
+	K1212_DEBUG_PRINTK("K1212_DEBUG: channel_info %d:"
+			   ", offset=%ld, first=%d, step=%d\n",
+			   info->channel, info->offset, info->first,
+			   info->step);
+	return 0;
 }
 
 static int snd_korg1212_hw_params(struct snd_pcm_substream *substream,
@@ -1691,7 +1687,7 @@ static struct snd_pcm_ops snd_korg1212_p
 static struct snd_pcm_ops snd_korg1212_playback_ops = {
         .open =		snd_korg1212_playback_open,
         .close =	snd_korg1212_playback_close,
-        .ioctl =	snd_korg1212_ioctl,
+	.channel_info =	snd_korg1212_channel_info,
         .hw_params =	snd_korg1212_hw_params,
         .prepare =	snd_korg1212_prepare,
         .trigger =	snd_korg1212_trigger,
@@ -1703,7 +1699,7 @@ static struct snd_pcm_ops snd_korg1212_c
 static struct snd_pcm_ops snd_korg1212_capture_ops = {
 	.open =		snd_korg1212_capture_open,
 	.close =	snd_korg1212_capture_close,
-	.ioctl =	snd_korg1212_ioctl,
+	.channel_info =	snd_korg1212_channel_info,
 	.hw_params =	snd_korg1212_hw_params,
 	.prepare =	snd_korg1212_prepare,
 	.trigger =	snd_korg1212_trigger,
diff -r 5829c288c7df pci/maestro3.c
--- a/pci/maestro3.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/maestro3.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1864,7 +1864,6 @@ static struct snd_pcm_ops snd_m3_playbac
 static struct snd_pcm_ops snd_m3_playback_ops = {
 	.open =		snd_m3_playback_open,
 	.close =	snd_m3_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_m3_pcm_hw_params,
 	.hw_free =	snd_m3_pcm_hw_free,
 	.prepare =	snd_m3_pcm_prepare,
@@ -1875,7 +1874,6 @@ static struct snd_pcm_ops snd_m3_capture
 static struct snd_pcm_ops snd_m3_capture_ops = {
 	.open =		snd_m3_capture_open,
 	.close =	snd_m3_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_m3_pcm_hw_params,
 	.hw_free =	snd_m3_pcm_hw_free,
 	.prepare =	snd_m3_pcm_prepare,
diff -r 5829c288c7df pci/mixart/mixart.c
--- a/pci/mixart/mixart.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/mixart/mixart.c	Mon Nov 26 16:52:39 2007 +0100
@@ -889,7 +889,6 @@ static struct snd_pcm_ops snd_mixart_pla
 static struct snd_pcm_ops snd_mixart_playback_ops = {
 	.open      = snd_mixart_playback_open,
 	.close     = snd_mixart_close,
-	.ioctl     = snd_pcm_lib_ioctl,
 	.prepare   = snd_mixart_prepare,
 	.hw_params = snd_mixart_hw_params,
 	.hw_free   = snd_mixart_hw_free,
@@ -900,7 +899,6 @@ static struct snd_pcm_ops snd_mixart_cap
 static struct snd_pcm_ops snd_mixart_capture_ops = {
 	.open      = snd_mixart_capture_open,
 	.close     = snd_mixart_close,
-	.ioctl     = snd_pcm_lib_ioctl,
 	.prepare   = snd_mixart_prepare,
 	.hw_params = snd_mixart_hw_params,
 	.hw_free   = snd_mixart_hw_free,
diff -r 5829c288c7df pci/nm256/nm256.c
--- a/pci/nm256/nm256.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/nm256/nm256.c	Mon Nov 26 16:52:39 2007 +0100
@@ -898,7 +898,6 @@ static struct snd_pcm_ops snd_nm256_play
 static struct snd_pcm_ops snd_nm256_playback_ops = {
 	.open =		snd_nm256_playback_open,
 	.close =	snd_nm256_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_nm256_pcm_hw_params,
 	.prepare =	snd_nm256_pcm_prepare,
 	.trigger =	snd_nm256_playback_trigger,
@@ -913,7 +912,6 @@ static struct snd_pcm_ops snd_nm256_capt
 static struct snd_pcm_ops snd_nm256_capture_ops = {
 	.open =		snd_nm256_capture_open,
 	.close =	snd_nm256_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_nm256_pcm_hw_params,
 	.prepare =	snd_nm256_pcm_prepare,
 	.trigger =	snd_nm256_capture_trigger,
diff -r 5829c288c7df pci/pcxhr/pcxhr.c
--- a/pci/pcxhr/pcxhr.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/pcxhr/pcxhr.c	Mon Nov 26 16:52:39 2007 +0100
@@ -964,7 +964,6 @@ static struct snd_pcm_ops pcxhr_ops = {
 static struct snd_pcm_ops pcxhr_ops = {
 	.open      = pcxhr_open,
 	.close     = pcxhr_close,
-	.ioctl     = snd_pcm_lib_ioctl,
 	.prepare   = pcxhr_prepare,
 	.hw_params = pcxhr_hw_params,
 	.hw_free   = pcxhr_hw_free,
diff -r 5829c288c7df pci/riptide/riptide.c
--- a/pci/riptide/riptide.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/riptide/riptide.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1693,7 +1693,6 @@ static struct snd_pcm_ops snd_riptide_pl
 static struct snd_pcm_ops snd_riptide_playback_ops = {
 	.open = snd_riptide_playback_open,
 	.close = snd_riptide_playback_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_riptide_hw_params,
 	.hw_free = snd_riptide_hw_free,
 	.prepare = snd_riptide_prepare,
@@ -1704,7 +1703,6 @@ static struct snd_pcm_ops snd_riptide_ca
 static struct snd_pcm_ops snd_riptide_capture_ops = {
 	.open = snd_riptide_capture_open,
 	.close = snd_riptide_capture_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_riptide_hw_params,
 	.hw_free = snd_riptide_hw_free,
 	.prepare = snd_riptide_prepare,
diff -r 5829c288c7df pci/rme32.c
--- a/pci/rme32.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/rme32.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1204,7 +1204,6 @@ static struct snd_pcm_ops snd_rme32_play
 static struct snd_pcm_ops snd_rme32_playback_spdif_ops = {
 	.open =		snd_rme32_playback_spdif_open,
 	.close =	snd_rme32_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_playback_hw_params,
 	.hw_free =	snd_rme32_pcm_hw_free,
 	.prepare =	snd_rme32_playback_prepare,
@@ -1218,7 +1217,6 @@ static struct snd_pcm_ops snd_rme32_capt
 static struct snd_pcm_ops snd_rme32_capture_spdif_ops = {
 	.open =		snd_rme32_capture_spdif_open,
 	.close =	snd_rme32_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_capture_hw_params,
 	.hw_free =	snd_rme32_pcm_hw_free,
 	.prepare =	snd_rme32_capture_prepare,
@@ -1231,7 +1229,6 @@ static struct snd_pcm_ops snd_rme32_play
 static struct snd_pcm_ops snd_rme32_playback_adat_ops = {
 	.open =		snd_rme32_playback_adat_open,
 	.close =	snd_rme32_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_playback_hw_params,
 	.prepare =	snd_rme32_playback_prepare,
 	.trigger =	snd_rme32_pcm_trigger,
@@ -1244,7 +1241,6 @@ static struct snd_pcm_ops snd_rme32_capt
 static struct snd_pcm_ops snd_rme32_capture_adat_ops = {
 	.open =		snd_rme32_capture_adat_open,
 	.close =	snd_rme32_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_capture_hw_params,
 	.prepare =	snd_rme32_capture_prepare,
 	.trigger =	snd_rme32_pcm_trigger,
@@ -1257,7 +1253,6 @@ static struct snd_pcm_ops snd_rme32_play
 static struct snd_pcm_ops snd_rme32_playback_spdif_fd_ops = {
 	.open =		snd_rme32_playback_spdif_open,
 	.close =	snd_rme32_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_playback_hw_params,
 	.hw_free =	snd_rme32_pcm_hw_free,
 	.prepare =	snd_rme32_playback_prepare,
@@ -1269,7 +1264,6 @@ static struct snd_pcm_ops snd_rme32_capt
 static struct snd_pcm_ops snd_rme32_capture_spdif_fd_ops = {
 	.open =		snd_rme32_capture_spdif_open,
 	.close =	snd_rme32_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_capture_hw_params,
 	.hw_free =	snd_rme32_pcm_hw_free,
 	.prepare =	snd_rme32_capture_prepare,
@@ -1281,7 +1275,6 @@ static struct snd_pcm_ops snd_rme32_play
 static struct snd_pcm_ops snd_rme32_playback_adat_fd_ops = {
 	.open =		snd_rme32_playback_adat_open,
 	.close =	snd_rme32_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_playback_hw_params,
 	.prepare =	snd_rme32_playback_prepare,
 	.trigger =	snd_rme32_pcm_trigger,
@@ -1292,7 +1285,6 @@ static struct snd_pcm_ops snd_rme32_capt
 static struct snd_pcm_ops snd_rme32_capture_adat_fd_ops = {
 	.open =		snd_rme32_capture_adat_open,
 	.close =	snd_rme32_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme32_capture_hw_params,
 	.prepare =	snd_rme32_capture_prepare,
 	.trigger =	snd_rme32_pcm_trigger,
diff -r 5829c288c7df pci/rme96.c
--- a/pci/rme96.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/rme96.c	Mon Nov 26 16:52:39 2007 +0100
@@ -1456,7 +1456,6 @@ static struct snd_pcm_ops snd_rme96_play
 static struct snd_pcm_ops snd_rme96_playback_spdif_ops = {
 	.open =		snd_rme96_playback_spdif_open,
 	.close =	snd_rme96_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme96_playback_hw_params,
 	.prepare =	snd_rme96_playback_prepare,
 	.trigger =	snd_rme96_playback_trigger,
@@ -1469,7 +1468,6 @@ static struct snd_pcm_ops snd_rme96_capt
 static struct snd_pcm_ops snd_rme96_capture_spdif_ops = {
 	.open =		snd_rme96_capture_spdif_open,
 	.close =	snd_rme96_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme96_capture_hw_params,
 	.prepare =	snd_rme96_capture_prepare,
 	.trigger =	snd_rme96_capture_trigger,
@@ -1481,7 +1479,6 @@ static struct snd_pcm_ops snd_rme96_play
 static struct snd_pcm_ops snd_rme96_playback_adat_ops = {
 	.open =		snd_rme96_playback_adat_open,
 	.close =	snd_rme96_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme96_playback_hw_params,
 	.prepare =	snd_rme96_playback_prepare,
 	.trigger =	snd_rme96_playback_trigger,
@@ -1494,7 +1491,6 @@ static struct snd_pcm_ops snd_rme96_capt
 static struct snd_pcm_ops snd_rme96_capture_adat_ops = {
 	.open =		snd_rme96_capture_adat_open,
 	.close =	snd_rme96_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_rme96_capture_hw_params,
 	.prepare =	snd_rme96_capture_prepare,
 	.trigger =	snd_rme96_capture_trigger,
diff -r 5829c288c7df pci/rme9652/hdsp.c
--- a/pci/rme9652/hdsp.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/rme9652/hdsp.c	Mon Nov 26 16:52:40 2007 +0100
@@ -3915,21 +3915,6 @@ static int snd_hdsp_channel_info(struct 
 	return 0;
 }
 
-static int snd_hdsp_ioctl(struct snd_pcm_substream *substream,
-			     unsigned int cmd, void *arg)
-{
-	switch (cmd) {
-	case SNDRV_PCM_IOCTL1_RESET:
-		return snd_hdsp_reset(substream);
-	case SNDRV_PCM_IOCTL1_CHANNEL_INFO:
-		return snd_hdsp_channel_info(substream, arg);
-	default:
-		break;
-	}
-
-	return snd_pcm_lib_ioctl(substream, cmd, arg);
-}
-
 static int snd_hdsp_trigger(struct snd_pcm_substream *substream, int cmd)
 {
 	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
@@ -4663,7 +4648,8 @@ static struct snd_pcm_ops snd_hdsp_playb
 static struct snd_pcm_ops snd_hdsp_playback_ops = {
 	.open =		snd_hdsp_playback_open,
 	.close =	snd_hdsp_playback_release,
-	.ioctl =	snd_hdsp_ioctl,
+	.reset =	snd_hdsp_reset,
+	.channel_info =	snd_hdsp_channel_info,
 	.hw_params =	snd_hdsp_hw_params,
 	.prepare =	snd_hdsp_prepare,
 	.trigger =	snd_hdsp_trigger,
@@ -4675,7 +4661,8 @@ static struct snd_pcm_ops snd_hdsp_captu
 static struct snd_pcm_ops snd_hdsp_capture_ops = {
 	.open =		snd_hdsp_capture_open,
 	.close =	snd_hdsp_capture_release,
-	.ioctl =	snd_hdsp_ioctl,
+	.reset =	snd_hdsp_reset,
+	.channel_info =	snd_hdsp_channel_info,
 	.hw_params =	snd_hdsp_hw_params,
 	.prepare =	snd_hdsp_prepare,
 	.trigger =	snd_hdsp_trigger,
diff -r 5829c288c7df pci/rme9652/hdspm.c
--- a/pci/rme9652/hdspm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/rme9652/hdspm.c	Mon Nov 26 16:52:40 2007 +0100
@@ -3756,25 +3756,6 @@ static int snd_hdspm_channel_info(struct
 	return 0;
 }
 
-static int snd_hdspm_ioctl(struct snd_pcm_substream *substream,
-			   unsigned int cmd, void *arg)
-{
-	switch (cmd) {
-	case SNDRV_PCM_IOCTL1_RESET:
-		return snd_hdspm_reset(substream);
-
-	case SNDRV_PCM_IOCTL1_CHANNEL_INFO:
-	{
-		struct snd_pcm_channel_info *info = arg;
-		return snd_hdspm_channel_info(substream, info);
-	}
-	default:
-		break;
-	}
-
-	return snd_pcm_lib_ioctl(substream, cmd, arg);
-}
-
 static int snd_hdspm_trigger(struct snd_pcm_substream *substream, int cmd)
 {
 	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
@@ -4174,7 +4155,8 @@ static struct snd_pcm_ops snd_hdspm_play
 static struct snd_pcm_ops snd_hdspm_playback_ops = {
 	.open = snd_hdspm_playback_open,
 	.close = snd_hdspm_playback_release,
-	.ioctl = snd_hdspm_ioctl,
+	.reset = snd_hdspm_reset,
+	.channel_info = snd_hdspm_channel_info,
 	.hw_params = snd_hdspm_hw_params,
 	.hw_free = snd_hdspm_hw_free,
 	.prepare = snd_hdspm_prepare,
@@ -4188,7 +4170,8 @@ static struct snd_pcm_ops snd_hdspm_capt
 static struct snd_pcm_ops snd_hdspm_capture_ops = {
 	.open = snd_hdspm_capture_open,
 	.close = snd_hdspm_capture_release,
-	.ioctl = snd_hdspm_ioctl,
+	.reset = snd_hdspm_reset,
+	.channel_info = snd_hdspm_channel_info,
 	.hw_params = snd_hdspm_hw_params,
 	.hw_free = snd_hdspm_hw_free,
 	.prepare = snd_hdspm_prepare,
diff -r 5829c288c7df pci/rme9652/rme9652.c
--- a/pci/rme9652/rme9652.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/rme9652/rme9652.c	Mon Nov 26 16:52:40 2007 +0100
@@ -2066,26 +2066,6 @@ static int snd_rme9652_channel_info(stru
 	return 0;
 }
 
-static int snd_rme9652_ioctl(struct snd_pcm_substream *substream,
-			     unsigned int cmd, void *arg)
-{
-	switch (cmd) {
-	case SNDRV_PCM_IOCTL1_RESET:
-	{
-		return snd_rme9652_reset(substream);
-	}
-	case SNDRV_PCM_IOCTL1_CHANNEL_INFO:
-	{
-		struct snd_pcm_channel_info *info = arg;
-		return snd_rme9652_channel_info(substream, info);
-	}
-	default:
-		break;
-	}
-
-	return snd_pcm_lib_ioctl(substream, cmd, arg);
-}
-
 static void rme9652_silence_playback(struct snd_rme9652 *rme9652)
 {
 	memset(rme9652->playback_buffer, 0, RME9652_DMA_AREA_BYTES);
@@ -2391,7 +2371,8 @@ static struct snd_pcm_ops snd_rme9652_pl
 static struct snd_pcm_ops snd_rme9652_playback_ops = {
 	.open =		snd_rme9652_playback_open,
 	.close =	snd_rme9652_playback_release,
-	.ioctl =	snd_rme9652_ioctl,
+	.reset =	snd_rme9652_reset,
+	.channel_info =	snd_rme9652_channel_info,
 	.hw_params =	snd_rme9652_hw_params,
 	.prepare =	snd_rme9652_prepare,
 	.trigger =	snd_rme9652_trigger,
@@ -2403,7 +2384,8 @@ static struct snd_pcm_ops snd_rme9652_ca
 static struct snd_pcm_ops snd_rme9652_capture_ops = {
 	.open =		snd_rme9652_capture_open,
 	.close =	snd_rme9652_capture_release,
-	.ioctl =	snd_rme9652_ioctl,
+	.reset =	snd_rme9652_reset,
+	.channel_info =	snd_rme9652_channel_info,
 	.hw_params =	snd_rme9652_hw_params,
 	.prepare =	snd_rme9652_prepare,
 	.trigger =	snd_rme9652_trigger,
diff -r 5829c288c7df pci/sonicvibes.c
--- a/pci/sonicvibes.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/sonicvibes.c	Mon Nov 26 16:52:40 2007 +0100
@@ -824,7 +824,6 @@ static struct snd_pcm_ops snd_sonicvibes
 static struct snd_pcm_ops snd_sonicvibes_playback_ops = {
 	.open =		snd_sonicvibes_playback_open,
 	.close =	snd_sonicvibes_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_sonicvibes_hw_params,
 	.hw_free =	snd_sonicvibes_hw_free,
 	.prepare =	snd_sonicvibes_playback_prepare,
@@ -835,7 +834,6 @@ static struct snd_pcm_ops snd_sonicvibes
 static struct snd_pcm_ops snd_sonicvibes_capture_ops = {
 	.open =		snd_sonicvibes_capture_open,
 	.close =	snd_sonicvibes_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_sonicvibes_hw_params,
 	.hw_free =	snd_sonicvibes_hw_free,
 	.prepare =	snd_sonicvibes_capture_prepare,
diff -r 5829c288c7df pci/trident/trident_main.c
--- a/pci/trident/trident_main.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/trident/trident_main.c	Mon Nov 26 16:52:40 2007 +0100
@@ -775,29 +775,6 @@ static unsigned int snd_trident_control_
 /*
  *  PCM part
  */
-
-/*---------------------------------------------------------------------------
-   snd_trident_ioctl
-  
-   Description: Device I/O control handler for playback/capture parameters.
-  
-   Paramters:   substream  - PCM substream class
-                cmd     - what ioctl message to process
-                arg     - additional message infoarg     
-  
-   Returns:     Error status
-  
-  ---------------------------------------------------------------------------*/
-
-static int snd_trident_ioctl(struct snd_pcm_substream *substream,
-			     unsigned int cmd,
-			     void *arg)
-{
-	/* FIXME: it seems that with small periods the behaviour of
-	          trident hardware is unpredictable and interrupt generator
-	          is broken */
-	return snd_pcm_lib_ioctl(substream, cmd, arg);
-}
 
 /*---------------------------------------------------------------------------
    snd_trident_allocate_pcm_mem
@@ -2065,7 +2042,6 @@ static struct snd_pcm_ops snd_trident_pl
 static struct snd_pcm_ops snd_trident_playback_ops = {
 	.open =		snd_trident_playback_open,
 	.close =	snd_trident_playback_close,
-	.ioctl =	snd_trident_ioctl,
 	.hw_params =	snd_trident_hw_params,
 	.hw_free =	snd_trident_hw_free,
 	.prepare =	snd_trident_playback_prepare,
@@ -2076,7 +2052,6 @@ static struct snd_pcm_ops snd_trident_nx
 static struct snd_pcm_ops snd_trident_nx_playback_ops = {
 	.open =		snd_trident_playback_open,
 	.close =	snd_trident_playback_close,
-	.ioctl =	snd_trident_ioctl,
 	.hw_params =	snd_trident_hw_params,
 	.hw_free =	snd_trident_hw_free,
 	.prepare =	snd_trident_playback_prepare,
@@ -2088,7 +2063,6 @@ static struct snd_pcm_ops snd_trident_ca
 static struct snd_pcm_ops snd_trident_capture_ops = {
 	.open =		snd_trident_capture_open,
 	.close =	snd_trident_capture_close,
-	.ioctl =	snd_trident_ioctl,
 	.hw_params =	snd_trident_capture_hw_params,
 	.hw_free =	snd_trident_hw_free,
 	.prepare =	snd_trident_capture_prepare,
@@ -2099,7 +2073,6 @@ static struct snd_pcm_ops snd_trident_si
 static struct snd_pcm_ops snd_trident_si7018_capture_ops = {
 	.open =		snd_trident_capture_open,
 	.close =	snd_trident_capture_close,
-	.ioctl =	snd_trident_ioctl,
 	.hw_params =	snd_trident_si7018_capture_hw_params,
 	.hw_free =	snd_trident_si7018_capture_hw_free,
 	.prepare =	snd_trident_si7018_capture_prepare,
@@ -2110,7 +2083,6 @@ static struct snd_pcm_ops snd_trident_fo
 static struct snd_pcm_ops snd_trident_foldback_ops = {
 	.open =		snd_trident_foldback_open,
 	.close =	snd_trident_foldback_close,
-	.ioctl =	snd_trident_ioctl,
 	.hw_params =	snd_trident_hw_params,
 	.hw_free =	snd_trident_hw_free,
 	.prepare =	snd_trident_foldback_prepare,
@@ -2121,7 +2093,6 @@ static struct snd_pcm_ops snd_trident_nx
 static struct snd_pcm_ops snd_trident_nx_foldback_ops = {
 	.open =		snd_trident_foldback_open,
 	.close =	snd_trident_foldback_close,
-	.ioctl =	snd_trident_ioctl,
 	.hw_params =	snd_trident_hw_params,
 	.hw_free =	snd_trident_hw_free,
 	.prepare =	snd_trident_foldback_prepare,
@@ -2133,7 +2104,6 @@ static struct snd_pcm_ops snd_trident_sp
 static struct snd_pcm_ops snd_trident_spdif_ops = {
 	.open =		snd_trident_spdif_open,
 	.close =	snd_trident_spdif_close,
-	.ioctl =	snd_trident_ioctl,
 	.hw_params =	snd_trident_spdif_hw_params,
 	.hw_free =	snd_trident_hw_free,
 	.prepare =	snd_trident_spdif_prepare,
@@ -2144,7 +2114,6 @@ static struct snd_pcm_ops snd_trident_sp
 static struct snd_pcm_ops snd_trident_spdif_7018_ops = {
 	.open =		snd_trident_spdif_open,
 	.close =	snd_trident_spdif_close,
-	.ioctl =	snd_trident_ioctl,
 	.hw_params =	snd_trident_spdif_hw_params,
 	.hw_free =	snd_trident_hw_free,
 	.prepare =	snd_trident_spdif_prepare,
diff -r 5829c288c7df pci/via82xx.c
--- a/pci/via82xx.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/via82xx.c	Mon Nov 26 16:52:40 2007 +0100
@@ -1302,7 +1302,6 @@ static struct snd_pcm_ops snd_via686_pla
 static struct snd_pcm_ops snd_via686_playback_ops = {
 	.open =		snd_via82xx_playback_open,
 	.close =	snd_via82xx_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_via82xx_hw_params,
 	.hw_free =	snd_via82xx_hw_free,
 	.prepare =	snd_via686_playback_prepare,
@@ -1315,7 +1314,6 @@ static struct snd_pcm_ops snd_via686_cap
 static struct snd_pcm_ops snd_via686_capture_ops = {
 	.open =		snd_via82xx_capture_open,
 	.close =	snd_via82xx_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_via82xx_hw_params,
 	.hw_free =	snd_via82xx_hw_free,
 	.prepare =	snd_via686_capture_prepare,
@@ -1328,7 +1326,6 @@ static struct snd_pcm_ops snd_via8233_pl
 static struct snd_pcm_ops snd_via8233_playback_ops = {
 	.open =		snd_via82xx_playback_open,
 	.close =	snd_via82xx_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_via82xx_hw_params,
 	.hw_free =	snd_via82xx_hw_free,
 	.prepare =	snd_via8233_playback_prepare,
@@ -1341,7 +1338,6 @@ static struct snd_pcm_ops snd_via8233_mu
 static struct snd_pcm_ops snd_via8233_multi_ops = {
 	.open =		snd_via8233_multi_open,
 	.close =	snd_via82xx_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_via82xx_hw_params,
 	.hw_free =	snd_via82xx_hw_free,
 	.prepare =	snd_via8233_multi_prepare,
@@ -1354,7 +1350,6 @@ static struct snd_pcm_ops snd_via8233_ca
 static struct snd_pcm_ops snd_via8233_capture_ops = {
 	.open =		snd_via82xx_capture_open,
 	.close =	snd_via82xx_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_via82xx_hw_params,
 	.hw_free =	snd_via82xx_hw_free,
 	.prepare =	snd_via8233_capture_prepare,
diff -r 5829c288c7df pci/via82xx_modem.c
--- a/pci/via82xx_modem.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/via82xx_modem.c	Mon Nov 26 16:52:40 2007 +0100
@@ -798,7 +798,6 @@ static struct snd_pcm_ops snd_via686_pla
 static struct snd_pcm_ops snd_via686_playback_ops = {
 	.open =		snd_via82xx_playback_open,
 	.close =	snd_via82xx_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_via82xx_hw_params,
 	.hw_free =	snd_via82xx_hw_free,
 	.prepare =	snd_via82xx_pcm_prepare,
@@ -811,7 +810,6 @@ static struct snd_pcm_ops snd_via686_cap
 static struct snd_pcm_ops snd_via686_capture_ops = {
 	.open =		snd_via82xx_capture_open,
 	.close =	snd_via82xx_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_via82xx_hw_params,
 	.hw_free =	snd_via82xx_hw_free,
 	.prepare =	snd_via82xx_pcm_prepare,
diff -r 5829c288c7df pci/ymfpci/ymfpci_main.c
--- a/pci/ymfpci/ymfpci_main.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pci/ymfpci/ymfpci_main.c	Mon Nov 26 16:52:40 2007 +0100
@@ -1092,7 +1092,6 @@ static struct snd_pcm_ops snd_ymfpci_pla
 static struct snd_pcm_ops snd_ymfpci_playback_ops = {
 	.open =			snd_ymfpci_playback_open,
 	.close =		snd_ymfpci_playback_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_ymfpci_playback_hw_params,
 	.hw_free =		snd_ymfpci_playback_hw_free,
 	.prepare =		snd_ymfpci_playback_prepare,
@@ -1103,7 +1102,6 @@ static struct snd_pcm_ops snd_ymfpci_cap
 static struct snd_pcm_ops snd_ymfpci_capture_rec_ops = {
 	.open =			snd_ymfpci_capture_rec_open,
 	.close =		snd_ymfpci_capture_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_ymfpci_capture_hw_params,
 	.hw_free =		snd_ymfpci_capture_hw_free,
 	.prepare =		snd_ymfpci_capture_prepare,
@@ -1141,7 +1139,6 @@ static struct snd_pcm_ops snd_ymfpci_cap
 static struct snd_pcm_ops snd_ymfpci_capture_ac97_ops = {
 	.open =			snd_ymfpci_capture_ac97_open,
 	.close =		snd_ymfpci_capture_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_ymfpci_capture_hw_params,
 	.hw_free =		snd_ymfpci_capture_hw_free,
 	.prepare =		snd_ymfpci_capture_prepare,
@@ -1179,7 +1176,6 @@ static struct snd_pcm_ops snd_ymfpci_pla
 static struct snd_pcm_ops snd_ymfpci_playback_spdif_ops = {
 	.open =			snd_ymfpci_playback_spdif_open,
 	.close =		snd_ymfpci_playback_spdif_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_ymfpci_playback_hw_params,
 	.hw_free =		snd_ymfpci_playback_hw_free,
 	.prepare =		snd_ymfpci_playback_prepare,
@@ -1216,7 +1212,6 @@ static struct snd_pcm_ops snd_ymfpci_pla
 static struct snd_pcm_ops snd_ymfpci_playback_4ch_ops = {
 	.open =			snd_ymfpci_playback_4ch_open,
 	.close =		snd_ymfpci_playback_4ch_close,
-	.ioctl =		snd_pcm_lib_ioctl,
 	.hw_params =		snd_ymfpci_playback_hw_params,
 	.hw_free =		snd_ymfpci_playback_hw_free,
 	.prepare =		snd_ymfpci_playback_prepare,
diff -r 5829c288c7df pcmcia/pdaudiocf/pdaudiocf_pcm.c
--- a/pcmcia/pdaudiocf/pdaudiocf_pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/pcmcia/pdaudiocf/pdaudiocf_pcm.c	Mon Nov 26 16:52:40 2007 +0100
@@ -313,7 +313,6 @@ static struct snd_pcm_ops pdacf_pcm_capt
 static struct snd_pcm_ops pdacf_pcm_capture_ops = {
 	.open =		pdacf_pcm_capture_open,
 	.close =	pdacf_pcm_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	pdacf_pcm_hw_params,
 	.hw_free =	pdacf_pcm_hw_free,
 	.prepare =	pdacf_pcm_prepare,
diff -r 5829c288c7df ppc/pmac.c
--- a/ppc/pmac.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/ppc/pmac.c	Mon Nov 26 16:52:40 2007 +0100
@@ -589,7 +589,6 @@ static struct snd_pcm_ops snd_pmac_playb
 static struct snd_pcm_ops snd_pmac_playback_ops = {
 	.open =		snd_pmac_playback_open,
 	.close =	snd_pmac_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_pmac_pcm_hw_params,
 	.hw_free =	snd_pmac_pcm_hw_free,
 	.prepare =	snd_pmac_playback_prepare,
@@ -600,7 +599,6 @@ static struct snd_pcm_ops snd_pmac_captu
 static struct snd_pcm_ops snd_pmac_capture_ops = {
 	.open =		snd_pmac_capture_open,
 	.close =	snd_pmac_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_pmac_pcm_hw_params,
 	.hw_free =	snd_pmac_pcm_hw_free,
 	.prepare =	snd_pmac_capture_prepare,
diff -r 5829c288c7df ppc/snd_ps3.c
--- a/ppc/snd_ps3.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/ppc/snd_ps3.c	Mon Nov 26 16:52:40 2007 +0100
@@ -171,7 +171,6 @@ static struct snd_pcm_ops snd_ps3_pcm_sp
 	.open = snd_ps3_pcm_open,
 	.close = snd_ps3_pcm_close,
 	.prepare = snd_ps3_pcm_prepare,
-	.ioctl = snd_pcm_lib_ioctl,
 	.trigger = snd_ps3_pcm_trigger,
 	.pointer = snd_ps3_pcm_pointer,
 	.hw_params = snd_ps3_pcm_hw_params,
diff -r 5829c288c7df sh/aica.c
--- a/sh/aica.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/sh/aica.c	Mon Nov 26 16:52:40 2007 +0100
@@ -443,7 +443,6 @@ static struct snd_pcm_ops snd_aicapcm_pl
 static struct snd_pcm_ops snd_aicapcm_playback_ops = {
 	.open = snd_aicapcm_pcm_open,
 	.close = snd_aicapcm_pcm_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_aicapcm_pcm_hw_params,
 	.hw_free = snd_aicapcm_pcm_hw_free,
 	.prepare = snd_aicapcm_pcm_prepare,
diff -r 5829c288c7df soc/at91/at91-pcm.c
--- a/soc/at91/at91-pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/soc/at91/at91-pcm.c	Mon Nov 26 16:52:40 2007 +0100
@@ -279,7 +279,6 @@ struct snd_pcm_ops at91_pcm_ops = {
 struct snd_pcm_ops at91_pcm_ops = {
 	.open		= at91_pcm_open,
 	.close		= at91_pcm_close,
-	.ioctl		= snd_pcm_lib_ioctl,
 	.hw_params	= at91_pcm_hw_params,
 	.hw_free	= at91_pcm_hw_free,
 	.prepare	= at91_pcm_prepare,
diff -r 5829c288c7df soc/pxa/pxa2xx-pcm.c
--- a/soc/pxa/pxa2xx-pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/soc/pxa/pxa2xx-pcm.c	Mon Nov 26 16:52:40 2007 +0100
@@ -283,7 +283,6 @@ struct snd_pcm_ops pxa2xx_pcm_ops = {
 struct snd_pcm_ops pxa2xx_pcm_ops = {
 	.open		= pxa2xx_pcm_open,
 	.close		= pxa2xx_pcm_close,
-	.ioctl		= snd_pcm_lib_ioctl,
 	.hw_params	= pxa2xx_pcm_hw_params,
 	.hw_free	= pxa2xx_pcm_hw_free,
 	.prepare	= pxa2xx_pcm_prepare,
diff -r 5829c288c7df soc/s3c24xx/s3c24xx-pcm.c
--- a/soc/s3c24xx/s3c24xx-pcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/soc/s3c24xx/s3c24xx-pcm.c	Mon Nov 26 16:52:40 2007 +0100
@@ -378,7 +378,6 @@ static struct snd_pcm_ops s3c24xx_pcm_op
 static struct snd_pcm_ops s3c24xx_pcm_ops = {
 	.open		= s3c24xx_pcm_open,
 	.close		= s3c24xx_pcm_close,
-	.ioctl		= snd_pcm_lib_ioctl,
 	.hw_params	= s3c24xx_pcm_hw_params,
 	.hw_free	= s3c24xx_pcm_hw_free,
 	.prepare	= s3c24xx_pcm_prepare,
diff -r 5829c288c7df soc/sh/dma-sh7760.c
--- a/soc/sh/dma-sh7760.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/soc/sh/dma-sh7760.c	Mon Nov 26 16:52:40 2007 +0100
@@ -313,7 +313,6 @@ static struct snd_pcm_ops camelot_pcm_op
 static struct snd_pcm_ops camelot_pcm_ops = {
 	.open		= camelot_pcm_open,
 	.close		= camelot_pcm_close,
-	.ioctl		= snd_pcm_lib_ioctl,
 	.hw_params	= camelot_hw_params,
 	.hw_free	= camelot_hw_free,
 	.prepare	= camelot_prepare,
diff -r 5829c288c7df soc/soc-core.c
--- a/soc/soc-core.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/soc/soc-core.c	Mon Nov 26 16:52:40 2007 +0100
@@ -876,7 +876,6 @@ static int soc_new_pcm(struct snd_soc_de
 	pcm->private_data = rtd;
 	soc_pcm_ops.mmap = socdev->platform->pcm_ops->mmap;
 	soc_pcm_ops.pointer = socdev->platform->pcm_ops->pointer;
-	soc_pcm_ops.ioctl = socdev->platform->pcm_ops->ioctl;
 	soc_pcm_ops.copy = socdev->platform->pcm_ops->copy;
 	soc_pcm_ops.silence = socdev->platform->pcm_ops->silence;
 	soc_pcm_ops.ack = socdev->platform->pcm_ops->ack;
diff -r 5829c288c7df sparc/amd7930.c
--- a/sparc/amd7930.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/sparc/amd7930.c	Mon Nov 26 16:52:40 2007 +0100
@@ -736,7 +736,6 @@ static struct snd_pcm_ops snd_amd7930_pl
 static struct snd_pcm_ops snd_amd7930_playback_ops = {
 	.open		=	snd_amd7930_playback_open,
 	.close		=	snd_amd7930_playback_close,
-	.ioctl		=	snd_pcm_lib_ioctl,
 	.hw_params	=	snd_amd7930_hw_params,
 	.hw_free	=	snd_amd7930_hw_free,
 	.prepare	=	snd_amd7930_playback_prepare,
@@ -747,7 +746,6 @@ static struct snd_pcm_ops snd_amd7930_ca
 static struct snd_pcm_ops snd_amd7930_capture_ops = {
 	.open		=	snd_amd7930_capture_open,
 	.close		=	snd_amd7930_capture_close,
-	.ioctl		=	snd_pcm_lib_ioctl,
 	.hw_params	=	snd_amd7930_hw_params,
 	.hw_free	=	snd_amd7930_hw_free,
 	.prepare	=	snd_amd7930_capture_prepare,
diff -r 5829c288c7df sparc/cs4231.c
--- a/sparc/cs4231.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/sparc/cs4231.c	Mon Nov 26 16:52:40 2007 +0100
@@ -1220,7 +1220,6 @@ static struct snd_pcm_ops snd_cs4231_pla
 static struct snd_pcm_ops snd_cs4231_playback_ops = {
 	.open		=	snd_cs4231_playback_open,
 	.close		=	snd_cs4231_playback_close,
-	.ioctl		=	snd_pcm_lib_ioctl,
 	.hw_params	=	snd_cs4231_playback_hw_params,
 	.hw_free	=	snd_pcm_lib_free_pages,
 	.prepare	=	snd_cs4231_playback_prepare,
@@ -1231,7 +1230,6 @@ static struct snd_pcm_ops snd_cs4231_cap
 static struct snd_pcm_ops snd_cs4231_capture_ops = {
 	.open		=	snd_cs4231_capture_open,
 	.close		=	snd_cs4231_capture_close,
-	.ioctl		=	snd_pcm_lib_ioctl,
 	.hw_params	=	snd_cs4231_capture_hw_params,
 	.hw_free	=	snd_pcm_lib_free_pages,
 	.prepare	=	snd_cs4231_capture_prepare,
diff -r 5829c288c7df sparc/dbri.c
--- a/sparc/dbri.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/sparc/dbri.c	Mon Nov 26 16:52:40 2007 +0100
@@ -2205,7 +2205,6 @@ static struct snd_pcm_ops snd_dbri_ops =
 static struct snd_pcm_ops snd_dbri_ops = {
 	.open = snd_dbri_open,
 	.close = snd_dbri_close,
-	.ioctl = snd_pcm_lib_ioctl,
 	.hw_params = snd_dbri_hw_params,
 	.hw_free = snd_dbri_hw_free,
 	.prepare = snd_dbri_prepare,
diff -r 5829c288c7df spi/at73c213.c
--- a/spi/at73c213.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/spi/at73c213.c	Mon Nov 26 16:52:40 2007 +0100
@@ -304,7 +304,6 @@ static struct snd_pcm_ops at73c213_playb
 static struct snd_pcm_ops at73c213_playback_ops = {
 	.open		= snd_at73c213_pcm_open,
 	.close		= snd_at73c213_pcm_close,
-	.ioctl		= snd_pcm_lib_ioctl,
 	.hw_params	= snd_at73c213_pcm_hw_params,
 	.hw_free	= snd_at73c213_pcm_hw_free,
 	.prepare	= snd_at73c213_pcm_prepare,
diff -r 5829c288c7df usb/caiaq/caiaq-audio.c
--- a/usb/caiaq/caiaq-audio.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/usb/caiaq/caiaq-audio.c	Mon Nov 26 16:52:40 2007 +0100
@@ -286,7 +286,6 @@ static struct snd_pcm_ops snd_usb_caiaq_
 static struct snd_pcm_ops snd_usb_caiaq_ops = {
 	.open =		snd_usb_caiaq_substream_open,
 	.close =	snd_usb_caiaq_substream_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_usb_caiaq_pcm_hw_params,
 	.hw_free =	snd_usb_caiaq_pcm_hw_free,
 	.prepare =	snd_usb_caiaq_pcm_prepare,
diff -r 5829c288c7df usb/usbaudio.c
--- a/usb/usbaudio.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/usb/usbaudio.c	Mon Nov 26 16:52:40 2007 +0100
@@ -1964,7 +1964,6 @@ static struct snd_pcm_ops snd_usb_playba
 static struct snd_pcm_ops snd_usb_playback_ops = {
 	.open =		snd_usb_playback_open,
 	.close =	snd_usb_playback_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_usb_hw_params,
 	.hw_free =	snd_usb_hw_free,
 	.prepare =	snd_usb_pcm_prepare,
@@ -1976,7 +1975,6 @@ static struct snd_pcm_ops snd_usb_captur
 static struct snd_pcm_ops snd_usb_capture_ops = {
 	.open =		snd_usb_capture_open,
 	.close =	snd_usb_capture_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_usb_hw_params,
 	.hw_free =	snd_usb_hw_free,
 	.prepare =	snd_usb_pcm_prepare,
diff -r 5829c288c7df usb/usx2y/usbusx2yaudio.c
--- a/usb/usx2y/usbusx2yaudio.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/usb/usx2y/usbusx2yaudio.c	Mon Nov 26 16:52:40 2007 +0100
@@ -921,7 +921,6 @@ static struct snd_pcm_ops snd_usX2Y_pcm_
 {
 	.open =		snd_usX2Y_pcm_open,
 	.close =	snd_usX2Y_pcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_usX2Y_pcm_hw_params,
 	.hw_free =	snd_usX2Y_pcm_hw_free,
 	.prepare =	snd_usX2Y_pcm_prepare,
diff -r 5829c288c7df usb/usx2y/usx2yhwdeppcm.c
--- a/usb/usx2y/usx2yhwdeppcm.c	Mon Nov 26 15:00:40 2007 +0100
+++ b/usb/usx2y/usx2yhwdeppcm.c	Mon Nov 26 16:52:40 2007 +0100
@@ -596,7 +596,6 @@ static struct snd_pcm_ops snd_usX2Y_usbp
 {
 	.open =		snd_usX2Y_usbpcm_open,
 	.close =	snd_usX2Y_usbpcm_close,
-	.ioctl =	snd_pcm_lib_ioctl,
 	.hw_params =	snd_usX2Y_pcm_hw_params,
 	.hw_free =	snd_usX2Y_usbpcm_hw_free,
 	.prepare =	snd_usX2Y_usbpcm_prepare,

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-11-21 11:22 ` Softvol controls Takashi Iwai
@ 2007-11-29 23:28   ` Lennart Poettering
  2007-11-29 23:46     ` John Utz
  2007-11-30  8:59     ` Takashi Iwai
  0 siblings, 2 replies; 37+ messages in thread
From: Lennart Poettering @ 2007-11-29 23:28 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On Wed, 21.11.07 12:22, Takashi Iwai (tiwai@suse.de) wrote:

> >    Now, is there a way I can detect for a mixer element if it is
> >    "real" or if it is implemented only for the "plughw" PCM? As it
> >    seems the "hw:0" mixer device does contain "virtual" tracks, isn't that a
> >    bit strange? Shouldn't the virtual mixer tracks be available only
> >    in a mixer device "plughw:0"? That at least would be symmetric to
> >    the PCM case, wouldn't it?
> 
> Check snd_ctl_elem_info_is_user().  All softvol controls are
> implemented as user elements.

Hmm, how am I supposed to get the snd_ctl_elem_info_t from a
snd_mixer_elem_t or snd_mixer_selem_id_t?

I figure there is no useful documentation or even example how this is
supposed to work? Hmm, is there any real documentation available which
describes the relation of ctl, hctl, mixer and smixer at all? For the
uninitated the whols structure looks overly complex and redundant.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-11-29 23:28   ` Lennart Poettering
@ 2007-11-29 23:46     ` John Utz
  2007-11-30  0:08       ` Lennart Poettering
  2007-11-30  8:59     ` Takashi Iwai
  1 sibling, 1 reply; 37+ messages in thread
From: John Utz @ 2007-11-29 23:46 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: Takashi Iwai, alsa-devel

Hi Lennart!

On Fri, 30 Nov 2007 00:28:59 +0100
"Lennart Poettering" <mznyfn@0pointer.de> wrote:

> On Wed, 21.11.07 12:22, Takashi Iwai (tiwai@suse.de) wrote:
> 
> > >    Now, is there a way I can detect for a mixer element if it is
> > >    "real" or if it is implemented only for the "plughw" PCM? As it
> > >    seems the "hw:0" mixer device does contain "virtual" tracks,
> > > isn't that a bit strange? Shouldn't the virtual mixer tracks be
> > > available only in a mixer device "plughw:0"? That at least would
> > > be symmetric to the PCM case, wouldn't it?
> > 
> > Check snd_ctl_elem_info_is_user().  All softvol controls are
> > implemented as user elements.
> 
> Hmm, how am I supposed to get the snd_ctl_elem_info_t from a
> snd_mixer_elem_t or snd_mixer_selem_id_t?
> 
> I figure there is no useful documentation or even example how this is
> supposed to work? Hmm, is there any real documentation available which
> describes the relation of ctl, hctl, mixer and smixer at all? For the
> uninitated the whols structure looks overly complex and redundant.

Here's my take on it....HTH

dont hesitate to ask


// ALSA Mixer creation and manipulation routines
//
// The alsa api is pretty cool once you find a working example :-)
//  
// One first creates the mixer representation and then 1 element
// representation for each item that you need to manipulate.
// create the individual elements, ie PCM, Surround, etc

snd_mixer_elem_t *
alsa_mixer_elem_instantiate(char *pNameElem, snd_mixer_t *pSndMxr)
{
  char  acLog[256] = "";
  int    iErr      = 0;

  snd_mixer_elem_t      *pSndMxrElem;
  snd_mixer_selem_id_t  *pSndMxrSlem;

  snd_mixer_selem_id_alloca(&pSndMxrSlem);
  snd_mixer_selem_id_set_name(pSndMxrSlem, pNameElem);

  sprintf(acLog, "Initializing ALSA Mixer Element: %s", pNameElem);
  aeiu_logprint("PC18", AEIU_LOG_INFO, acLog);

  // find element based on name

  if(!(pSndMxrElem=snd_mixer_find_selem(pSndMxr, pSndMxrSlem))) goto
fin;

  // make sure they are turned on so we can hear them, not always the
case

  aeiu_logprint("PC19", AEIU_LOG_INFO, "ALSA Mixer Element Enable"  );
  if(snd_mixer_selem_has_playback_switch(pSndMxrElem))
    if((iErr=snd_mixer_selem_set_playback_switch_all(pSndMxrElem, 1)))
      goto fin;

  // configure them for the old style 0-100 oss volume range

  aeiu_logprint("PC20", AEIU_LOG_INFO, "ALSA Mixer Element Set
Range"  );

  if((iErr=snd_mixer_selem_set_playback_volume_range(pSndMxrElem, 0,
100))) goto fin;

  // set to a reasonable starting value

  aeiu_logprint("PC21", AEIU_LOG_INFO, "ALSA Mixer Element Set
Volume"  );

  if((iErr=snd_mixer_selem_set_playback_volume_all(pSndMxrElem, 65)))
goto fin;

 fin:

  if(!pSndMxrElem || iErr)
  {
    sprintf(acLog,"alsa_mixer_elem_instantiate: %s Failed: %s\n",
pNameElem, iErr ? snd_strerror(iErr) : "Mixer Device Not Found");
    aeiu_logprint("PC22", AEIU_LOG_ERROR, acLog);
  }

  return pSndMxrElem;
}


int
alsa_mixer_instantiate()
{
  int    iErr        = 0;
  char *pcNameDevMxr = "default";

  aeiu_logprint("PC23", AEIU_LOG_INFO, "Initializing ALSA Mixer");

  if(gpSndMxr)
  {
    aeiu_logprint("PC24", AEIU_LOG_ERROR,"alsa_mixer_instantiate:
pSndMxr!=NULL"); iErr=1;
    goto fin;
  }

  if((iErr = snd_mixer_open(&gpSndMxr, 0)))                   goto fin;

  if((iErr = snd_mixer_attach(gpSndMxr, pcNameDevMxr)))       goto fin;
   
  if((iErr = snd_mixer_selem_register(gpSndMxr, NULL, NULL))) goto fin;

  if((iErr = snd_mixer_load(gpSndMxr)))                       goto fin;

  // mixer device is now live, create the control elements, note that
  // we dont error check here because we do it in the function and we
  // dont want to break execution flow here if we fail for some reason
  // (rather have 2 channels than no channels!)

  gpSndMxrElemCrdV = alsa_mixer_elem_instantiate("PCM",      gpSndMxr);

  gpSndMxrElemCrd0 = alsa_mixer_elem_instantiate("Master",   gpSndMxr);
 
  gpSndMxrElemCrd1 = alsa_mixer_elem_instantiate("Surround", gpSndMxr);

  // this exists only for a function called pcm_lowervolumes()

  gpSndMxrElemCrdM = alsa_mixer_elem_instantiate("Mic",      gpSndMxr);

fin:

  if(iErr)
  {
    if(gpSndMxr)
    {
      snd_mixer_close(gpSndMxr);
      gpSndMxr = NULL;
    }

    char  acLog[256] = "";
    sprintf(acLog, "alsa_mixer_instantiate: Failed: %s",
snd_strerror(iErr)); aeiu_logprint("PC25", AEIU_LOG_ERROR, acLog);
  }
  return iErr;
}




> Lennart
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-11-29 23:46     ` John Utz
@ 2007-11-30  0:08       ` Lennart Poettering
  2007-11-30  0:34         ` John Utz
  0 siblings, 1 reply; 37+ messages in thread
From: Lennart Poettering @ 2007-11-30  0:08 UTC (permalink / raw)
  To: John Utz; +Cc: Takashi Iwai, alsa-devel

On Thu, 29.11.07 15:46, John Utz (john.utz@dmx.com) wrote:

John,

> > > Check snd_ctl_elem_info_is_user().  All softvol controls are
> > > implemented as user elements.
> > 
> > Hmm, how am I supposed to get the snd_ctl_elem_info_t from a
> > snd_mixer_elem_t or snd_mixer_selem_id_t?
> > 
> > I figure there is no useful documentation or even example how this is
> > supposed to work? Hmm, is there any real documentation available which
> > describes the relation of ctl, hctl, mixer and smixer at all? For the
> > uninitated the whols structure looks overly complex and redundant.
> 
> Here's my take on it....HTH
> 
> dont hesitate to ask

Hu? Neither "snd_ctl_elem_info_t" nor "snd_ctl_elem_info_is_user()"
is even mentioned in your source code excerpt?

I know how to change volumes and stuff via the ALSA mixer API. What I
am looking for is a way to detect whether a mixer element is
implemented in softwaer only and thus doesn't influence your ouput
when you open a PCM device with "hw:0", "front:0", "surround51:0" and
suchlike.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-11-30  0:08       ` Lennart Poettering
@ 2007-11-30  0:34         ` John Utz
  0 siblings, 0 replies; 37+ messages in thread
From: John Utz @ 2007-11-30  0:34 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: Takashi Iwai, alsa-devel

Oh heck.....

On Fri, 30 Nov 2007 01:08:11 +0100
"Lennart Poettering" <mznyfn@0pointer.de> wrote:

> On Thu, 29.11.07 15:46, John Utz (john.utz@dmx.com) wrote:
> 
> John,
> 
> > > > Check snd_ctl_elem_info_is_user().  All softvol controls are
> > > > implemented as user elements.
> > > 
> > > Hmm, how am I supposed to get the snd_ctl_elem_info_t from a
> > > snd_mixer_elem_t or snd_mixer_selem_id_t?
> > > 
> > > I figure there is no useful documentation or even example how
> > > this is supposed to work? Hmm, is there any real documentation
> > > available which describes the relation of ctl, hctl, mixer and
> > > smixer at all? For the uninitated the whols structure looks
> > > overly complex and redundant.
> > 
> > Here's my take on it....HTH
> > 
> > dont hesitate to ask
> 
> Hu? Neither "snd_ctl_elem_info_t" nor "snd_ctl_elem_info_is_user()"
> is even mentioned in your source code excerpt?

I failed to pay close enuf attention to your post. sorry 'bout that.

> I know how to change volumes and stuff via the ALSA mixer API. What I
> am looking for is a way to detect whether a mixer element is
> implemented in softwaer only and thus doesn't influence your ouput
> when you open a PCM device with "hw:0", "front:0", "surround51:0" and
> suchlike.

That actually is a good question that i thought i might have to answer,
but i managed to avoid it.

Sorry for the confusion.....

johnu

> Lennart
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-11-29 23:28   ` Lennart Poettering
  2007-11-29 23:46     ` John Utz
@ 2007-11-30  8:59     ` Takashi Iwai
  2007-12-04 15:42       ` Jaroslav Kysela
  2007-12-22 22:48       ` Lennart Poettering
  1 sibling, 2 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-11-30  8:59 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: alsa-devel

At Fri, 30 Nov 2007 00:28:59 +0100,
Lennart Poettering wrote:
> 
> On Wed, 21.11.07 12:22, Takashi Iwai (tiwai@suse.de) wrote:
> 
> > >    Now, is there a way I can detect for a mixer element if it is
> > >    "real" or if it is implemented only for the "plughw" PCM? As it
> > >    seems the "hw:0" mixer device does contain "virtual" tracks, isn't that a
> > >    bit strange? Shouldn't the virtual mixer tracks be available only
> > >    in a mixer device "plughw:0"? That at least would be symmetric to
> > >    the PCM case, wouldn't it?
> > 
> > Check snd_ctl_elem_info_is_user().  All softvol controls are
> > implemented as user elements.
> 
> Hmm, how am I supposed to get the snd_ctl_elem_info_t from a
> snd_mixer_elem_t or snd_mixer_selem_id_t?

No, there is no API to get the id mapping.
And I guess we can't do it because there is no 1:1 mapping between
ctl_elem and mixer_selem.  It's N:1.

> I figure there is no useful documentation or even example how this is
> supposed to work? Hmm, is there any real documentation available which
> describes the relation of ctl, hctl, mixer and smixer at all? For the
> uninitated the whols structure looks overly complex and redundant.

Yes, it's overly complex.  The mixer abstracion is what I'd really
love to clean up, maybe better to write from scratch.

I guess PA could use ctl API better than mixer API because it requires
only certain elements like Master or PCM.  You can simply take
"Master Playback Control" with MIXER iface for master volume and
"Master Playback Switch" for master mute switch.  Of course, you'll
take care of number of channels or value range, but it's also same for
mixer API, too.


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-11-30  8:59     ` Takashi Iwai
@ 2007-12-04 15:42       ` Jaroslav Kysela
  2007-12-13 10:39         ` Takashi Iwai
  2007-12-22 22:54         ` Lennart Poettering
  2007-12-22 22:48       ` Lennart Poettering
  1 sibling, 2 replies; 37+ messages in thread
From: Jaroslav Kysela @ 2007-12-04 15:42 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: ALSA development, Lennart Poettering

On Fri, 30 Nov 2007, Takashi Iwai wrote:

> At Fri, 30 Nov 2007 00:28:59 +0100,
> Lennart Poettering wrote:
> > 
> > On Wed, 21.11.07 12:22, Takashi Iwai (tiwai@suse.de) wrote:
> > 
> > > >    Now, is there a way I can detect for a mixer element if it is
> > > >    "real" or if it is implemented only for the "plughw" PCM? As it
> > > >    seems the "hw:0" mixer device does contain "virtual" tracks, isn't that a
> > > >    bit strange? Shouldn't the virtual mixer tracks be available only
> > > >    in a mixer device "plughw:0"? That at least would be symmetric to
> > > >    the PCM case, wouldn't it?
> > > 
> > > Check snd_ctl_elem_info_is_user().  All softvol controls are
> > > implemented as user elements.
> > 
> > Hmm, how am I supposed to get the snd_ctl_elem_info_t from a
> > snd_mixer_elem_t or snd_mixer_selem_id_t?
> 
> No, there is no API to get the id mapping.
> And I guess we can't do it because there is no 1:1 mapping between
> ctl_elem and mixer_selem.  It's N:1.

I don't think that application should know about this mapping.

I think that we have to provide API giving a mixer control element for 
opened PCM handle, otherwise applications might use hacks like 
suggested snd_ctl_elem_info_is_user() checks.

> > I figure there is no useful documentation or even example how this is
> > supposed to work? Hmm, is there any real documentation available which
> > describes the relation of ctl, hctl, mixer and smixer at all? For the
> > uninitated the whols structure looks overly complex and redundant.
> 
> Yes, it's overly complex.  The mixer abstracion is what I'd really
> love to clean up, maybe better to write from scratch.

I think that we might remove only 'mixer' and simplify initalization from 
the user side, but each time I tried to think about an optimal mixer 
interface, I ended with the current 'simple mixer API'.

> I guess PA could use ctl API better than mixer API because it requires
> only certain elements like Master or PCM.  You can simply take
> "Master Playback Control" with MIXER iface for master volume and
> "Master Playback Switch" for master mute switch.  Of course, you'll
> take care of number of channels or value range, but it's also same for
> mixer API, too.

I don't agree here. The simple mixer layer should be used, because it 
covers at least some abstraction. In my recent changes, we have 
possibility to use python for fast prototyping of simple mixer backends 
(see alsa-lib/modules/mixer/simple/python directory how fast with minimal 
code can be backend implemented). Unfortunately, main problem will be
probably the work to cover all cards.

					Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-12-04 15:42       ` Jaroslav Kysela
@ 2007-12-13 10:39         ` Takashi Iwai
  2007-12-22 22:54         ` Lennart Poettering
  1 sibling, 0 replies; 37+ messages in thread
From: Takashi Iwai @ 2007-12-13 10:39 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: ALSA development, Lennart Poettering

At Tue, 4 Dec 2007 16:42:55 +0100 (CET),
Jaroslav Kysela wrote:
> 
> On Fri, 30 Nov 2007, Takashi Iwai wrote:
> 
> > At Fri, 30 Nov 2007 00:28:59 +0100,
> > Lennart Poettering wrote:
> > > 
> > > On Wed, 21.11.07 12:22, Takashi Iwai (tiwai@suse.de) wrote:
> > > 
> > > > >    Now, is there a way I can detect for a mixer element if it is
> > > > >    "real" or if it is implemented only for the "plughw" PCM? As it
> > > > >    seems the "hw:0" mixer device does contain "virtual" tracks, isn't that a
> > > > >    bit strange? Shouldn't the virtual mixer tracks be available only
> > > > >    in a mixer device "plughw:0"? That at least would be symmetric to
> > > > >    the PCM case, wouldn't it?
> > > > 
> > > > Check snd_ctl_elem_info_is_user().  All softvol controls are
> > > > implemented as user elements.
> > > 
> > > Hmm, how am I supposed to get the snd_ctl_elem_info_t from a
> > > snd_mixer_elem_t or snd_mixer_selem_id_t?
> > 
> > No, there is no API to get the id mapping.
> > And I guess we can't do it because there is no 1:1 mapping between
> > ctl_elem and mixer_selem.  It's N:1.
> 
> I don't think that application should know about this mapping.
> 
> I think that we have to provide API giving a mixer control element for 
> opened PCM handle, otherwise applications might use hacks like 
> suggested snd_ctl_elem_info_is_user() checks.

I basically agree that this isn't about the mixer API, but in general,
it depends on what apps require.  The sound system like pulseaudio is,
of course, a program that wants the detailed controls over the lower
system.

> > > I figure there is no useful documentation or even example how this is
> > > supposed to work? Hmm, is there any real documentation available which
> > > describes the relation of ctl, hctl, mixer and smixer at all? For the
> > > uninitated the whols structure looks overly complex and redundant.
> > 
> > Yes, it's overly complex.  The mixer abstracion is what I'd really
> > love to clean up, maybe better to write from scratch.
> 
> I think that we might remove only 'mixer' and simplify initalization from 
> the user side, but each time I tried to think about an optimal mixer 
> interface, I ended with the current 'simple mixer API'.

Well, it's partly about API but rather its implementation.  I see
little reason to have layering like below as now:

	ctl -> hctl -> mixer -> module -> app

Another part of problem is the API design.  The current API is good
for old hardwares like SB16.  But, this abstraction breaks too often
the simplicity of control API itself for other hardwares.


> > I guess PA could use ctl API better than mixer API because it requires
> > only certain elements like Master or PCM.  You can simply take
> > "Master Playback Control" with MIXER iface for master volume and
> > "Master Playback Switch" for master mute switch.  Of course, you'll
> > take care of number of channels or value range, but it's also same for
> > mixer API, too.
> 
> I don't agree here. The simple mixer layer should be used, because it 
> covers at least some abstraction. In my recent changes, we have 
> possibility to use python for fast prototyping of simple mixer backends 
> (see alsa-lib/modules/mixer/simple/python directory how fast with minimal 
> code can be backend implemented). Unfortunately, main problem will be
> probably the work to cover all cards.

Again, it's the question of "what kind of app".  The python is great,
but it's not for "sound systems" like pulseaudio at all...


Takashi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Disable conversions
  2007-11-26 15:55     ` Jaroslav Kysela
@ 2007-12-22 22:37       ` Lennart Poettering
  0 siblings, 0 replies; 37+ messages in thread
From: Lennart Poettering @ 2007-12-22 22:37 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: ALSA Development Mailing List

On Mon, 26.11.07 16:55, Jaroslav Kysela (perex@perex.cz) wrote:

> 1) Proposal - one argument specifying multiple disabled conversions:
> 
>    plughw:CARD=0,DEV=0,DISABLECONV=cfr
> 
>    c = channels
>    f = format
>    r = rate
> 
>    And add 'disableconv' to pcm/pcm_plug.c configuration parser.

Works for me. However, abbreviating things too brutally doesn't seem
like a good idea, I'd thus vote for your proposal #2:

> 2) Proposal - multiple arguments
> 
>    plughw:CARD=0,DEV=0,DISABLECHANNELS=1,DISABLERATE=1,DISABLEFORMAT=1
> 
> I prefer first proposal (I don't think that it will be widely used), but I 
> have no objections for second, too.
> 
> This can be applied to plug: device as well.

It would be great if something like this would be available. I am
happy with either, as long as I can make use of it!

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-11-30  8:59     ` Takashi Iwai
  2007-12-04 15:42       ` Jaroslav Kysela
@ 2007-12-22 22:48       ` Lennart Poettering
  1 sibling, 0 replies; 37+ messages in thread
From: Lennart Poettering @ 2007-12-22 22:48 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On Fri, 30.11.07 09:59, Takashi Iwai (tiwai@suse.de) wrote:

> > > Check snd_ctl_elem_info_is_user().  All softvol controls are
> > > implemented as user elements.
> > 
> > Hmm, how am I supposed to get the snd_ctl_elem_info_t from a
> > snd_mixer_elem_t or snd_mixer_selem_id_t?
> 
> No, there is no API to get the id mapping.
> And I guess we can't do it because there is no 1:1 mapping between
> ctl_elem and mixer_selem.  It's N:1.

May I simply suggest some kind of enumeration API? If it's 1:1 or N:1
doesn't really matter. Either you have a simple _get() function or a
set of enumeration functions. Only a tiny bit more complicated...

> > I figure there is no useful documentation or even example how this is
> > supposed to work? Hmm, is there any real documentation available which
> > describes the relation of ctl, hctl, mixer and smixer at all? For the
> > uninitated the whols structure looks overly complex and redundant.
> 
> Yes, it's overly complex.  The mixer abstracion is what I'd really
> love to clean up, maybe better to write from scratch.
> 
> I guess PA could use ctl API better than mixer API because it requires
> only certain elements like Master or PCM.  You can simply take
> "Master Playback Control" with MIXER iface for master volume and
> "Master Playback Switch" for master mute switch.  Of course, you'll
> take care of number of channels or value range, but it's also same for
> mixer API, too.

Oh my! the lack of useful documentation or examples for using the ctl
interface is a real issue. It takes up so much time for me to make
sense of your APIs by guessing and trying to understand what you were
thinking when you designed it, guys! :-(

/me gumbly studies the ALSA sources a bit more.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-12-04 15:42       ` Jaroslav Kysela
  2007-12-13 10:39         ` Takashi Iwai
@ 2007-12-22 22:54         ` Lennart Poettering
  2007-12-23 10:21           ` Jaroslav Kysela
  1 sibling, 1 reply; 37+ messages in thread
From: Lennart Poettering @ 2007-12-22 22:54 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Takashi Iwai, ALSA development

On Tue, 04.12.07 16:42, Jaroslav Kysela (perex@perex.cz) wrote:

> > No, there is no API to get the id mapping.
> > And I guess we can't do it because there is no 1:1 mapping between
> > ctl_elem and mixer_selem.  It's N:1.
> 
> I don't think that application should know about this mapping.
> 
> I think that we have to provide API giving a mixer control element for 
> opened PCM handle, otherwise applications might use hacks like 
> suggested snd_ctl_elem_info_is_user() checks.

Wouldn't it be possible to just provide a snd_mixer_elem_is_user()
function? Would be fine to solve my task, too...

> > > I figure there is no useful documentation or even example how this is
> > > supposed to work? Hmm, is there any real documentation available which
> > > describes the relation of ctl, hctl, mixer and smixer at all? For the
> > > uninitated the whols structure looks overly complex and redundant.
> > 
> > Yes, it's overly complex.  The mixer abstracion is what I'd really
> > love to clean up, maybe better to write from scratch.
> 
> I think that we might remove only 'mixer' and simplify initalization from 
> the user side, but each time I tried to think about an optimal mixer 
> interface, I ended with the current 'simple mixer API'.

Quite frankly, the whole structure of ctl, hctl, mixer and smixer is
one of the weakest points in the ALSA API. While it might make sense
to have these internally, I belive that exposing them all in the API was a
bad idea. (But actually, I only understand ALSA in parts, so maybe I
just am blind)
 
> > I guess PA could use ctl API better than mixer API because it requires
> > only certain elements like Master or PCM.  You can simply take
> > "Master Playback Control" with MIXER iface for master volume and
> > "Master Playback Switch" for master mute switch.  Of course, you'll
> > take care of number of channels or value range, but it's also same for
> > mixer API, too.
> 
> I don't agree here. The simple mixer layer should be used, because it 
> covers at least some abstraction. In my recent changes, we have 
> possibility to use python for fast prototyping of simple mixer backends 
> (see alsa-lib/modules/mixer/simple/python directory how fast with minimal 
> code can be backend implemented). Unfortunately, main problem will be
> probably the work to cover all cards.

So, what does this mean for me? As long as I have some way to detect
whether a mixer element is software-only I am happy. 

Should I now be following yours, or Takashi's advice? Should I wait
for a new interface to be added to the ALSA API?

Thanks,

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Softvol controls
  2007-12-22 22:54         ` Lennart Poettering
@ 2007-12-23 10:21           ` Jaroslav Kysela
  0 siblings, 0 replies; 37+ messages in thread
From: Jaroslav Kysela @ 2007-12-23 10:21 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: Takashi Iwai, ALSA development

On Sat, 22 Dec 2007, Lennart Poettering wrote:

> On Tue, 04.12.07 16:42, Jaroslav Kysela (perex@perex.cz) wrote:
> 
> > > No, there is no API to get the id mapping.
> > > And I guess we can't do it because there is no 1:1 mapping between
> > > ctl_elem and mixer_selem.  It's N:1.
> > 
> > I don't think that application should know about this mapping.
> > 
> > I think that we have to provide API giving a mixer control element for 
> > opened PCM handle, otherwise applications might use hacks like 
> > suggested snd_ctl_elem_info_is_user() checks.
> 
> Wouldn't it be possible to just provide a snd_mixer_elem_is_user()
> function? Would be fine to solve my task, too...

User elements can be used for other purposes, too. So 
snd_mixer_elem_is_user() is not sufficient to give you enough information.

> > > > I figure there is no useful documentation or even example how this is
> > > > supposed to work? Hmm, is there any real documentation available which
> > > > describes the relation of ctl, hctl, mixer and smixer at all? For the
> > > > uninitated the whols structure looks overly complex and redundant.
> > > 
> > > Yes, it's overly complex.  The mixer abstracion is what I'd really
> > > love to clean up, maybe better to write from scratch.
> > 
> > I think that we might remove only 'mixer' and simplify initalization from 
> > the user side, but each time I tried to think about an optimal mixer 
> > interface, I ended with the current 'simple mixer API'.
> 
> Quite frankly, the whole structure of ctl, hctl, mixer and smixer is
> one of the weakest points in the ALSA API. While it might make sense
> to have these internally, I belive that exposing them all in the API was a
> bad idea. (But actually, I only understand ALSA in parts, so maybe I
> just am blind)

I'm not sure. I always recommended to use smixer API for standard 
applications, because it contains abstraction (at least some, but it will 
improve). hctl is just a cache for ctl (probably might be integrated to 
ctl layer) and I'm thinking to remove mixer layer (but I need some time to 
create a good proposal).

> > > I guess PA could use ctl API better than mixer API because it requires
> > > only certain elements like Master or PCM.  You can simply take
> > > "Master Playback Control" with MIXER iface for master volume and
> > > "Master Playback Switch" for master mute switch.  Of course, you'll
> > > take care of number of channels or value range, but it's also same for
> > > mixer API, too.
> > 
> > I don't agree here. The simple mixer layer should be used, because it 
> > covers at least some abstraction. In my recent changes, we have 
> > possibility to use python for fast prototyping of simple mixer backends 
> > (see alsa-lib/modules/mixer/simple/python directory how fast with minimal 
> > code can be backend implemented). Unfortunately, main problem will be
> > probably the work to cover all cards.
> 
> So, what does this mean for me? As long as I have some way to detect
> whether a mixer element is software-only I am happy. 
> 
> Should I now be following yours, or Takashi's advice? Should I wait
> for a new interface to be added to the ALSA API?

Please, wait. I suggested to add new function to PCM API to detect
which mixer element is related to a PCM stream.

						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2007-12-23 10:21 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-20  0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
2007-11-21 11:09 ` Takashi Iwai
2007-11-21 11:11 ` Takashi Iwai
2007-11-21 15:23   ` Clemens Ladisch
2007-11-25 19:56     ` The sense or non-sense of the device listing API (was: Status of ALSA "simple" mixer interface]) Lennart Poettering
2007-11-25 20:38       ` Jaroslav Kysela
2007-11-21 11:14 ` Mono device definition Takashi Iwai
2007-11-21 11:20 ` Analog-SPDIF dup Takashi Iwai
2007-11-21 11:22 ` Softvol controls Takashi Iwai
2007-11-29 23:28   ` Lennart Poettering
2007-11-29 23:46     ` John Utz
2007-11-30  0:08       ` Lennart Poettering
2007-11-30  0:34         ` John Utz
2007-11-30  8:59     ` Takashi Iwai
2007-12-04 15:42       ` Jaroslav Kysela
2007-12-13 10:39         ` Takashi Iwai
2007-12-22 22:54         ` Lennart Poettering
2007-12-23 10:21           ` Jaroslav Kysela
2007-12-22 22:48       ` Lennart Poettering
2007-11-21 11:40 ` Disable conversions Takashi Iwai
2007-11-21 14:29   ` Takashi Iwai
2007-11-21 15:16     ` Jaroslav Kysela
2007-11-21 14:51       ` Takashi Iwai
2007-11-25 20:41   ` Lennart Poettering
2007-11-26 15:55     ` Jaroslav Kysela
2007-12-22 22:37       ` Lennart Poettering
2007-11-21 11:42 ` Channel mapping Takashi Iwai
2007-11-21 15:17   ` Clemens Ladisch
2007-11-21 14:57     ` Takashi Iwai
2007-11-21 15:27     ` Jaroslav Kysela
2007-11-21 15:04       ` Takashi Iwai
2007-11-27 16:54         ` Takashi Iwai
2007-11-21 15:52       ` Clemens Ladisch
2007-11-21 15:36         ` Takashi Iwai
2007-11-21 18:37           ` Jaroslav Kysela
2007-11-22  9:17             ` Clemens Ladisch
2007-11-22  8:55           ` Clemens Ladisch

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.