]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal command
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 14 Jun 2017 10:30:03 +0000 (19:30 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:08:49 +0000 (14:08 +0100)
commit e11f0f90a626f93899687b1cc909ee37dd6c5809 upstream.

Drivers can implement 'struct snd_pcm_ops.ioctl' to handle some requests
from ALSA PCM core. These requests are internal purpose in kernel land.
Usually common set of operations are used for it.

SNDRV_PCM_IOCTL1_INFO is one of the requests. According to code comment,
it has been obsoleted in the old days.

We can see old releases in ftp.alsa-project.org. The command was firstly
introduced in v0.5.0 release as SND_PCM_IOCTL1_INFO, to allow drivers to
fill data of 'struct snd_pcm_channel_info' type. In v0.9.0 release,
this was obsoleted by the other commands for ioctl(2) such as
SNDRV_PCM_IOCTL_CHANNEL_INFO.

This commit removes the long-abandoned command, bye.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/sound/pcm.h
sound/core/pcm_lib.c
sound/core/pcm_native.c

index e02b1b8d8ee4b7a0f2342339b4c52437a33a7f46..21b0129c18506cdfa8af51ca4233dd6dcd2e75aa 100644 (file)
@@ -98,7 +98,7 @@ struct snd_pcm_ops {
 #define SNDRV_PCM_IOCTL1_TRUE          ((void *)1)
 
 #define SNDRV_PCM_IOCTL1_RESET         0
-#define SNDRV_PCM_IOCTL1_INFO          1
+/* 1 is absent slot. */
 #define SNDRV_PCM_IOCTL1_CHANNEL_INFO  2
 #define SNDRV_PCM_IOCTL1_GSTATE                3
 #define SNDRV_PCM_IOCTL1_FIFO_SIZE     4
index 25d4d20138fe18099eced6bac0ceb585c425f24c..e3382fbaf58d63771b4e0a7c9915e0ac690675d2 100644 (file)
@@ -1818,8 +1818,6 @@ int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
                      unsigned int cmd, void *arg)
 {
        switch (cmd) {
-       case SNDRV_PCM_IOCTL1_INFO:
-               return 0;
        case SNDRV_PCM_IOCTL1_RESET:
                return snd_pcm_lib_ioctl_reset(substream, arg);
        case SNDRV_PCM_IOCTL1_CHANNEL_INFO:
index 7b613991765512134710073f8e758f1cca14cb75..afdb678cc7570b67895386e255ac3dad3c559a6e 100644 (file)
@@ -216,11 +216,7 @@ int snd_pcm_info(struct snd_pcm_substream *substream, struct snd_pcm_info *info)
        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) {
-               info->sync = runtime->sync;
-               substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_INFO, info);
-       }
+
        return 0;
 }