[[email protected]: Status of ALSA "simple" mixer interface]
Subsystems (3)
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
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
On Tue, 13.11.07 12:28, Takashi Iwai ([email protected]) wrote:
Hi!
Quoted 7 lines
Quoted 3 lines
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 7 lines · Lennart Poettering
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.
Quoted 7 lines
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:
Quoted 9 lines
/usr/include/alsa/mixer.hcontains 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
At Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 6 lines · Lennart Poettering
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...
Quoted 140 lines
To: Takashi Iwai <[email protected]>
Subject: Re: Status of ALSA "simple" mixer interface
From: Lennart Poettering <[email protected]>
Date: Tue, 13 Nov 2007 17:56:46 +0100
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <s5habpiv0z2.wl%[email protected]>
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 ([email protected]) wrote:
Hi!
Quoted 7 lines
Quoted 3 lines
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/pcmcontains:<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.
Quoted 8 lines
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
Quoted 6 lines · Takashi Iwai
Quoted 3 lines · Lennart Poettering
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
The sense or non-sense of the device listing API (was: Status of ALSA "simple" mixer interface])
Quoted 6 lines · Clemens Ladisch
Quoted 5 lines · Takashi Iwai
Quoted 3 lines · Lennart Poettering
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?
Quoted 8 lines
Quoted 1 line
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
Re: The sense or non-sense of the device listing API (was: Status of ALSA "simple" mixer interface])
Quoted 10 lines · Lennart Poettering
Quoted 8 lines · Clemens Ladisch
Quoted 6 lines · Takashi Iwai
Quoted 3 lines · Lennart Poettering
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...
Quoted 8 lines
Quoted 6 lines
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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project
Mono device definition
In reply to Lennart PoetteringAt Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 6 lines · Lennart Poettering
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
Analog-SPDIF dup
In reply to Lennart PoetteringAt Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 9 lines · Lennart Poettering
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
Softvol controls
In reply to Lennart PoetteringAt Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 12 lines · Lennart Poettering
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.
Quoted 6 lines
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
Re: Softvol controls
Quoted 9 lines · Takashi Iwai
Quoted 6 lines
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
Re: Softvol controls
Hi Lennart!
Quoted 12 lines · On Fri, 30 Nov 2007 00:28:59 +0100 "Lennart Poettering" <[email protected]>…
Quoted 9 lines · Takashi Iwai
Quoted 6 lines
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.
Quoted 7 lines
Hmm, how am I supposed to get the
snd_ctl_elem_info_tfrom asnd_mixer_elem_torsnd_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;
}
intalsa_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;
}
Quoted 2 lines
Lennart
Re: Softvol controls
On Thu, 29.11.07 15:46, John Utz ([email protected]) wrote:
John,
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
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_tfrom asnd_mixer_elem_torsnd_mixer_selem_id_t?
Quoted 8 lines
Quoted 4 lines
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
Re: Softvol controls
Oh heck.....
Quoted 16 lines · On Fri, 30 Nov 2007 01:08:11 +0100 "Lennart Poettering" <[email protected]>…
On Thu, 29.11.07 15:46, John Utz ([email protected]) wrote:
John,
Quoted 12 lines
Quoted 11 lines
Quoted 2 lines
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_tfrom asnd_mixer_elem_torsnd_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.
Quoted 6 lines
Quoted 3 lines
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.
Quoted 5 lines
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
Quoted 2 lines
Lennart
Re: Softvol controls
In reply to Lennart PoetteringAt Fri, 30 Nov 2007 00:28:59 +0100,
Quoted 10 lines · Lennart Poettering
Quoted 7 lines · Takashi Iwai
Quoted 6 lines
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?
Quoted 5 lines
Quoted 2 lines
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_tfrom asnd_mixer_elem_torsnd_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.
Quoted 4 lines
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
Re: Softvol controls
Quoted 15 lines · Takashi Iwai
At Fri, 30 Nov 2007 00:28:59 +0100,
Quoted 13 lines · Lennart Poettering
Quoted 9 lines · Takashi Iwai
Quoted 6 lines
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.
Quoted 6 lines
Quoted 2 lines
Hmm, how am I supposed to get the
snd_ctl_elem_info_tfrom asnd_mixer_elem_torsnd_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 betweenctl_elemandmixer_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.
Quoted 7 lines
Quoted 4 lines
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'.
Quoted 6 lines
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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project
Re: Softvol controls
At Tue, 4 Dec 2007 16:42:55 +0100 (CET),
Quoted 25 lines · Jaroslav Kysela
Quoted 15 lines · Takashi Iwai
At Fri, 30 Nov 2007 00:28:59 +0100,
Quoted 13 lines · Lennart Poettering
Quoted 9 lines · Takashi Iwai
Quoted 6 lines
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.Quoted 6 lines
Quoted 2 lines
Hmm, how am I supposed to get the
snd_ctl_elem_info_tfrom asnd_mixer_elem_torsnd_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 betweenctl_elemandmixer_selem. It's N:1.
Quoted 5 lines
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.
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
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.
Quoted 7 lines
Quoted 6 lines
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.
Quoted 6 lines
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
Re: Softvol controls
In reply to Jaroslav KyselaQuoted 9 lines · Jaroslav Kysela
Quoted 3 lines
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 betweenctl_elemandmixer_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...
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
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)
Quoted 7 lines
Quoted 6 lines
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.
Quoted 6 lines
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
Re: Softvol controls
Quoted 6 lines · Lennart Poettering
Quoted 4 lines · Jaroslav Kysela
Quoted 3 lines
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 betweenctl_elemandmixer_selem. It's N:1.
Quoted 8 lines
Quoted 5 lines
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.
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
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'.
Quoted 5 lines
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).
Quoted 14 lines
Quoted 7 lines
Quoted 6 lines
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.
Quoted 6 lines
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.
Quoted 5 lines
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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project
Re: Softvol controls
In reply to Takashi IwaiQuoted 9 lines · Takashi Iwai
Quoted 5 lines
Quoted 2 lines
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_tfrom asnd_mixer_elem_torsnd_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 betweenctl_elemandmixer_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...
Quoted 8 lines
Quoted 4 lines
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.
Quoted 6 lines
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
Disable conversions
In reply to Lennart PoetteringAt Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 9 lines · Lennart Poettering
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
Re: Disable conversions
At Wed, 21 Nov 2007 12:40:54 +0100,
Quoted 22 lines · I wrote:
At Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 9 lines · Lennart Poettering
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);
Quoted 7 lines
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
include/pcm.h +1 -0
@@ -935,6 +935,7 @@ int snd_pcm_areas_copy(const snd_pcm_chaint 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);/** \} */
src/pcm/pcm.c +93 -0
117 lines not on this page · raw message
src/pcm/pcm_empty.c +1 -2
@@ -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" );
Re: Disable conversions
Quoted 27 lines · Takashi Iwai
At Wed, 21 Nov 2007 12:40:54 +0100,
Quoted 25 lines · I wrote:
At Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 9 lines · Lennart Poettering
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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project
Re: Disable conversions
At Wed, 21 Nov 2007 16:16:21 +0100 (CET),
Quoted 27 lines · Jaroslav Kysela
Quoted 24 lines · Takashi Iwai
At Wed, 21 Nov 2007 12:40:54 +0100,
Quoted 22 lines · I wrote:
At Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 9 lines · Lennart Poettering
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);
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
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
Re: Disable conversions
In reply to Takashi IwaiQuoted 12 lines · Takashi Iwai
At Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 9 lines · Lennart Poettering
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).
Quoted 2 lines
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?
Quoted 7 lines
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);
Quoted 7 lines
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
Re: Disable conversions
Quoted 14 lines · Lennart Poettering
Quoted 12 lines · Takashi Iwai
At Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 9 lines · Lennart Poettering
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).
Quoted 8 lines
Quoted 2 lines
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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project
Re: Disable conversions
Quoted 9 lines · Jaroslav Kysela
1) Proposal - one argument specifying multiple disabled conversions:
plughw:CARD=0,DEV=0,DISABLECONV=cfr
c = channels
f = format
r = rateAnd add 'disableconv' to
pcm/pcm_plug.cconfiguration parser.
Works for me. However, abbreviating things too brutally doesn't seem like a good idea, I'd thus vote for your proposal #2:
Quoted 8 lines
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4
Channel mapping
In reply to Lennart PoetteringAt Tue, 20 Nov 2007 01:51:51 +0100,
Quoted 7 lines · Lennart Poettering
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
Re: Channel mapping
Quoted 6 lines · Takashi Iwai
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
Re: Channel mapping
Quoted 8 lines · Clemens Ladisch
Quoted 6 lines · Takashi Iwai
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)...
Quoted 8 lines
It's just metadata that describes a PCM device, so I think we should use TLV for this.
The existing struct
snd_ctl_tlvuses 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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project
Re: Channel mapping
At Wed, 21 Nov 2007 16:27:47 +0100 (CET),
Quoted 20 lines · Jaroslav Kysela
Quoted 8 lines · Clemens Ladisch
Quoted 6 lines · Takashi Iwai
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)...
Quoted 8 lines
It's just metadata that describes a PCM device, so I think we should use TLV for this.
The existing struct
snd_ctl_tlvuses 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.
Quoted 3 lines
We can also encode PCM device / subdevice numbers to data structure. But I think that best way is to extend
channel_infoPCM 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
Re: Channel mapping
At Wed, 21 Nov 2007 16:04:04 +0100,
Quoted 23 lines · I wrote:
At Wed, 21 Nov 2007 16:27:47 +0100 (CET),
Quoted 20 lines · Jaroslav Kysela
Quoted 16 lines · Clemens Ladisch
Quoted 6 lines · Takashi Iwai
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_tlvuses 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.
Quoted 7 lines
Quoted 3 lines
We can also encode PCM device / subdevice numbers to data structure. But I think that best way is to extend
channel_infoPCM 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
Documentation/DocBook/writing-an-alsa-driver.tmpl +18 -9
@@ -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>
aoa/soundbus/i2sbus/i2sbus-pcm.c +0 -2
@@ -782,7 +782,6 @@ static struct snd_pcm_ops i2sbus_playbacstatic 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,
arm/aaci.c +0 -2
@@ -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_ostatic 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,
arm/pxa2xx-pcm.c +0 -1
@@ -272,7 +272,6 @@ static struct snd_pcm_ops pxa2xx_pcm_opsstatic 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,
arm/sa11xx-uda1341.c +0 -2
@@ -777,7 +777,6 @@ static struct snd_pcm_ops snd_card_sa11xstatic 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_sa11xstatic 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,
core/pcm_lib.c +13 -45
71 lines not on this page · raw message
core/pcm_native.c +18 -9
@@ -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 sreturn -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_pstatic 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;
drivers/dummy.c +0 -2
@@ -404,7 +404,6 @@ static struct snd_pcm_ops snd_card_dummystatic 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_dummystatic 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,
drivers/ml403-ac97cr.c +0 -2
@@ -762,7 +762,6 @@ static struct snd_pcm_ops snd_ml403_ac97static 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_ac97static 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,
drivers/vx/vx_pcm.c +0 -2
@@ -947,7 +947,6 @@ static struct snd_pcm_ops vx_pcm_playbacstatic 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_capturestatic 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,
include/pcm.h +5 -12
@@ -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 * pcvoid 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);
isa/ad1816a/ad1816a_lib.c +0 -2
@@ -641,7 +641,6 @@ static struct snd_pcm_ops snd_ad1816a_plstatic 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_castatic 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,
isa/ad1848/ad1848_lib.c +0 -8
@@ -312,12 +312,6 @@ static unsigned char snd_ad1848_get_ratereturn 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_plastatic 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_capstatic 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,
isa/cs423x/cs4231_lib.c +0 -2
@@ -1499,7 +1499,6 @@ static struct snd_pcm_ops snd_cs4231_plastatic 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_capstatic 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,
isa/es1688/es1688_lib.c +0 -8
@@ -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_plastatic 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_capstatic 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,
isa/es18xx.c +0 -2
@@ -1671,7 +1671,6 @@ static struct snd_pcm_ops snd_es18xx_plastatic 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_capstatic 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,
isa/gus/gus_pcm.c +0 -2
@@ -811,7 +811,6 @@ static struct snd_pcm_ops snd_gf1_pcm_plstatic 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_castatic 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,
isa/opti9xx/opti92x-ad1848.c +0 -2
@@ -1333,7 +1333,6 @@ static struct snd_pcm_ops snd_opti93x_plstatic 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_castatic 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,
isa/sb/emu8000_pcm.c +0 -1
@@ -666,7 +666,6 @@ static struct snd_pcm_ops emu8k_pcm_opsstatic 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,
isa/sb/sb16_main.c +0 -2
@@ -846,7 +846,6 @@ static struct snd_pcm_ops snd_sb16_playbstatic 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_captustatic 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,
isa/sb/sb8_main.c +0 -2
@@ -488,7 +488,6 @@ static struct snd_pcm_ops snd_sb8_playbastatic 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_capturstatic 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,
kernel/drivers/media/video/cx88/cx88-alsa.c +0 -1
@@ -515,7 +515,6 @@ static struct snd_pcm_ops snd_cx88_pcm_ostatic 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,
kernel/drivers/media/video/saa7134/saa7134-alsa.c +0 -1
@@ -658,7 +658,6 @@ static struct snd_pcm_ops snd_card_saa71static 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,
mips/au1x00.c +0 -2
@@ -419,7 +419,6 @@ static struct snd_pcm_ops snd_card_au100static 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_au100static 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,
parisc/harmony.c +0 -2
@@ -600,7 +600,6 @@ static struct snd_pcm_ops snd_harmony_plstatic 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_castatic 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,
pci/ad1889.c +0 -2
@@ -576,7 +576,6 @@ static struct snd_pcm_ops snd_ad1889_plastatic 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_capstatic 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,
pci/ali5451/ali5451.c +0 -4
@@ -1615,7 +1615,6 @@ static struct snd_pcm_ops snd_ali_playbastatic 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_capturstatic 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,
pci/als300.c +0 -2
@@ -593,7 +593,6 @@ static struct snd_pcm_ops snd_als300_plastatic 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_capstatic 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,
pci/als4000.c +0 -2
@@ -503,7 +503,6 @@ static struct snd_pcm_ops snd_als4000_plstatic 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_castatic 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,
pci/atiixp.c +0 -3
@@ -1149,7 +1149,6 @@ static struct snd_pcm_ops snd_atiixp_plastatic 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_capstatic 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_spdstatic 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,
pci/atiixp_modem.c +0 -2
@@ -947,7 +947,6 @@ static struct snd_pcm_ops snd_atiixp_plastatic 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_capstatic 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,
pci/au88x0/au88x0_pcm.c +0 -1
@@ -404,7 +404,6 @@ static struct snd_pcm_ops snd_vortex_plastatic 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,
pci/azt3328.c +0 -2
@@ -1397,7 +1397,6 @@ static struct snd_pcm_ops snd_azf3328_plstatic 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_castatic 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,
pci/bt87x.c +0 -1
@@ -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,
pci/ca0106/ca0106_main.c +0 -8
@@ -967,7 +967,6 @@ static struct snd_pcm_ops snd_ca0106_plastatic 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_capstatic 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_capstatic 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_capstatic 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_capstatic 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_plastatic 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_plastatic 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_plastatic 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,
pci/cmipci.c +0 -5
@@ -1834,7 +1834,6 @@ static struct snd_pcm_ops snd_cmipci_plastatic 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_capstatic 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_plastatic 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_plastatic 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_capstatic 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,
pci/cs4281.c +0 -2
@@ -947,7 +947,6 @@ static struct snd_pcm_ops snd_cs4281_plastatic 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_capstatic 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,
pci/cs46xx/cs46xx_lib.c +0 -10
@@ -1462,7 +1462,6 @@ static struct snd_pcm_ops snd_cs46xx_plastatic 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_plastatic 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_plastatic 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_plastatic 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_plastatic 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_plastatic 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_plastatic 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_plastatic 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_capstatic 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_capstatic 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,
pci/cs5535audio/cs5535audio_pcm.c +0 -2
@@ -366,7 +366,6 @@ static struct snd_pcm_ops snd_cs5535audistatic 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_cs5535audistatic 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,
pci/echoaudio/echoaudio.c +0 -4
@@ -795,7 +795,6 @@ static struct snd_pcm_ops analog_playbacstatic 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_capturestatic 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_playbastatic 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_capturstatic 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,
pci/emu10k1/emu10k1x.c +0 -2
@@ -547,7 +547,6 @@ static struct snd_pcm_ops snd_emu10k1x_pstatic 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_cstatic 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,
pci/emu10k1/emupcm.c +0 -6
@@ -1318,7 +1318,6 @@ static struct snd_pcm_ops snd_emu10k1_plstatic 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_castatic 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_efstatic 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_castatic 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_castatic 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_fxstatic 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,
pci/emu10k1/p16v.c +0 -2
@@ -568,7 +568,6 @@ static struct snd_pcm_ops snd_p16v_playbstatic 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_captustatic 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,
pci/ens1370.c +0 -3
@@ -1213,7 +1213,6 @@ static struct snd_pcm_ops snd_ensoniq_plstatic 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_plstatic 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_castatic 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,
pci/es1938.c +0 -2
@@ -984,7 +984,6 @@ static struct snd_pcm_ops snd_es1938_plastatic 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_capstatic 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,
pci/es1968.c +0 -2
@@ -1654,7 +1654,6 @@ static struct snd_pcm_ops snd_es1968_plastatic 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_capstatic 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,
pci/fm801.c +0 -2
@@ -663,7 +663,6 @@ static struct snd_pcm_ops snd_fm801_playstatic 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_captstatic 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,
pci/hda/hda_intel.c +0 -1
@@ -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,
pci/ice1712/ice1712.c +0 -5
@@ -841,7 +841,6 @@ static struct snd_pcm_ops snd_ice1712_plstatic 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_plstatic 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_castatic 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_plstatic 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_castatic 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,
pci/ice1712/ice1724.c +0 -5
@@ -842,7 +842,6 @@ static struct snd_pcm_ops snd_vt1724_plastatic 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_capstatic 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_plastatic 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_capstatic 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_plastatic 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,
pci/intel8x0.c +0 -12
@@ -1307,7 +1307,6 @@ static struct snd_pcm_ops snd_intel8x0_pstatic 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_cstatic 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_cstatic 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_cstatic 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_cstatic 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_sstatic 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_astatic 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_astatic 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_astatic 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_astatic 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_astatic 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_astatic 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,
pci/intel8x0m.c +0 -2
@@ -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,
pci/korg1212/korg1212.c +12 -16
@@ -1478,21 +1478,17 @@ static int snd_korg1212_capture_close(streturn 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_pstatic 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_cstatic 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,
pci/maestro3.c +0 -2
@@ -1864,7 +1864,6 @@ static struct snd_pcm_ops snd_m3_playbacstatic 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_capturestatic 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,
pci/mixart/mixart.c +0 -2
@@ -889,7 +889,6 @@ static struct snd_pcm_ops snd_mixart_plastatic 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_capstatic 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,
pci/nm256/nm256.c +0 -2
@@ -898,7 +898,6 @@ static struct snd_pcm_ops snd_nm256_playstatic 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_captstatic 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,
pci/pcxhr/pcxhr.c +0 -1
@@ -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,
pci/riptide/riptide.c +0 -2
@@ -1693,7 +1693,6 @@ static struct snd_pcm_ops snd_riptide_plstatic 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_castatic 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,
pci/rme32.c +0 -8
@@ -1204,7 +1204,6 @@ static struct snd_pcm_ops snd_rme32_playstatic 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_captstatic 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_playstatic 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_captstatic 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_playstatic 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_captstatic 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_playstatic 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_captstatic 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,
pci/rme96.c +0 -4
@@ -1456,7 +1456,6 @@ static struct snd_pcm_ops snd_rme96_playstatic 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_captstatic 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_playstatic 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_captstatic 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,
pci/rme9652/hdsp.c +4 -17
@@ -3915,21 +3915,6 @@ static int snd_hdsp_channel_info(structreturn 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_playbstatic 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_captustatic 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,
pci/rme9652/hdspm.c +4 -21
@@ -3756,25 +3756,6 @@ static int snd_hdspm_channel_info(structreturn 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_playstatic 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_captstatic 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,
pci/rme9652/rme9652.c +4 -22
@@ -2066,26 +2066,6 @@ static int snd_rme9652_channel_info(strureturn 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_plstatic 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_castatic 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,
pci/sonicvibes.c +0 -2
@@ -824,7 +824,6 @@ static struct snd_pcm_ops snd_sonicvibesstatic 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_sonicvibesstatic 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,
pci/trident/trident_main.c +0 -31
@@ -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_plstatic 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_nxstatic 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_castatic 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_sistatic 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_fostatic 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_nxstatic 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_spstatic 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_spstatic 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,
pci/via82xx.c +0 -5
@@ -1302,7 +1302,6 @@ static struct snd_pcm_ops snd_via686_plastatic 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_capstatic 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_plstatic 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_mustatic 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_castatic 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,
pci/via82xx_modem.c +0 -2
@@ -798,7 +798,6 @@ static struct snd_pcm_ops snd_via686_plastatic 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_capstatic 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,
pci/ymfpci/ymfpci_main.c +0 -5
@@ -1092,7 +1092,6 @@ static struct snd_pcm_ops snd_ymfpci_plastatic 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_capstatic 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_capstatic 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_plastatic 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_plastatic 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,
pcmcia/pdaudiocf/pdaudiocf_pcm.c +0 -1
@@ -313,7 +313,6 @@ static struct snd_pcm_ops pdacf_pcm_captstatic 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,
ppc/pmac.c +0 -2
@@ -589,7 +589,6 @@ static struct snd_pcm_ops snd_pmac_playbstatic 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_captustatic 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,
ppc/snd_ps3.c +0 -1
@@ -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,
sh/aica.c +0 -1
@@ -443,7 +443,6 @@ static struct snd_pcm_ops snd_aicapcm_plstatic 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,
soc/at91/at91-pcm.c +0 -1
@@ -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,
soc/pxa/pxa2xx-pcm.c +0 -1
@@ -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,
soc/s3c24xx/s3c24xx-pcm.c +0 -1
@@ -378,7 +378,6 @@ static struct snd_pcm_ops s3c24xx_pcm_opstatic 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,
soc/sh/dma-sh7760.c +0 -1
@@ -313,7 +313,6 @@ static struct snd_pcm_ops camelot_pcm_opstatic 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,
soc/soc-core.c +0 -1
@@ -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;
sparc/amd7930.c +0 -2
@@ -736,7 +736,6 @@ static struct snd_pcm_ops snd_amd7930_plstatic 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_castatic 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,
sparc/cs4231.c +0 -2
@@ -1220,7 +1220,6 @@ static struct snd_pcm_ops snd_cs4231_plastatic 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_capstatic 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,
sparc/dbri.c +0 -1
@@ -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,
spi/at73c213.c +0 -1
@@ -304,7 +304,6 @@ static struct snd_pcm_ops at73c213_playbstatic 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,
usb/caiaq/caiaq-audio.c +0 -1
@@ -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,
usb/usbaudio.c +0 -2
@@ -1964,7 +1964,6 @@ static struct snd_pcm_ops snd_usb_playbastatic 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_capturstatic 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,
usb/usx2y/usbusx2yaudio.c +0 -1
@@ -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,
usb/usx2y/usx2yhwdeppcm.c +0 -1
@@ -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,
Re: Channel mapping
In reply to Jaroslav KyselaQuoted 9 lines · Jaroslav Kysela
Quoted 8 lines · Clemens Ladisch
Quoted 6 lines · Takashi Iwai
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)...
Quoted 8 lines
Quoted 8 lines
It's just metadata that describes a PCM device, so I think we should use TLV for this.
The existing struct
snd_ctl_tlvuses 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.
Quoted 3 lines
We can also encode PCM device / subdevice numbers to data structure. But I think that best way is to extend
channel_infoPCM 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
Re: Channel mapping
At Wed, 21 Nov 2007 16:52:20 +0100,
Quoted 14 lines · Clemens Ladisch
Quoted 12 lines · Jaroslav Kysela
Quoted 11 lines · Clemens Ladisch
Quoted 6 lines · Takashi Iwai
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.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
The existing struct
snd_ctl_tlvuses 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.
Quoted 5 lines
Quoted 3 lines
We can also encode PCM device / subdevice numbers to data structure. But I think that best way is to extend
channel_infoPCM ioctl (create new version and emulate old one - it should be quite easy to implement).The
channel_infoioctl returns only information about one channel.
OTOH, it's simple and easy to parse. But, certainly TLV is more flexible for additional metadata.
Quoted 3 lines
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
Re: Channel mapping
Quoted 9 lines · Takashi Iwai
Quoted 6 lines
Quoted 4 lines
We can also encode PCM device / subdevice numbers to data structure. But I think that best way is to extend
channel_infoPCM ioctl (create new version and emulate old one - it should be quite easy to implement).The
channel_infoioctl 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.
Quoted 7 lines
Quoted 3 lines
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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project
Re: Channel mapping
Quoted 9 lines · Jaroslav Kysela
Quoted 3 lines · Takashi Iwai
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_PCMfor PCM mixer related controls and device & subdevice fromcontrol_idstructure. 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.
Quoted 3 lines
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
Re: Channel mapping
In reply to Takashi IwaiQuoted 11 lines · Takashi Iwai
Quoted 6 lines · Clemens Ladisch
Quoted 3 lines · Jaroslav Kysela
We can also encode PCM device / subdevice numbers to data structure. But I think that best way is to extend
channel_infoPCM ioctl (create new version and emulate old one - it should be quite easy to implement).The
channel_infoioctl returns only information about one channel.OTOH, it's simple and easy to parse. But, certainly TLV is more flexible for additional metadata.
Quoted 7 lines
Quoted 3 lines
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 ...
Quoted 1 line
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
Re: Channel mapping
In reply to Clemens LadischAt Wed, 21 Nov 2007 16:17:41 +0100,
Quoted 11 lines · Clemens Ladisch
Quoted 6 lines · Takashi Iwai
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.
Quoted 5 lines
The existing struct
snd_ctl_tlvuses 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