ALSA: line6: Drop invalid SNDRV_PCM_INFO_RESUME flag
authorTakashi Iwai <tiwai@suse.de>
Mon, 19 Jan 2015 13:58:29 +0000 (14:58 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Jan 2015 07:15:38 +0000 (08:15 +0100)
The line6 drivers don't support the full resume although they set
SNDRV_PCM_INFO_RESUME.  These flags have to be dropped to inform
properly to the user-space.

Also, drop the CONFIG_PM in trigger callbacks, too, which are rather
superfluous.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/capture.c
sound/usb/line6/playback.c
sound/usb/line6/pod.c
sound/usb/line6/podhd.c
sound/usb/line6/toneport.c

index 4cf6fa0541f1a6ab09166bcf5f4fdc09bab5b059..1970ab57cb6f31f952b0b5c65350391e48133c39 100644 (file)
@@ -342,9 +342,7 @@ int snd_line6_capture_trigger(struct snd_line6_pcm *line6pcm, int cmd)
 
        switch (cmd) {
        case SNDRV_PCM_TRIGGER_START:
-#ifdef CONFIG_PM
        case SNDRV_PCM_TRIGGER_RESUME:
-#endif
                err = line6_pcm_acquire(line6pcm,
                                        LINE6_BIT_PCM_ALSA_CAPTURE_STREAM);
 
@@ -354,9 +352,7 @@ int snd_line6_capture_trigger(struct snd_line6_pcm *line6pcm, int cmd)
                break;
 
        case SNDRV_PCM_TRIGGER_STOP:
-#ifdef CONFIG_PM
        case SNDRV_PCM_TRIGGER_SUSPEND:
-#endif
                err = line6_pcm_release(line6pcm,
                                        LINE6_BIT_PCM_ALSA_CAPTURE_STREAM);
 
index 258147eadf3779e09bf1ab58a01b20e547402e32..8fc2dedbeb52e7e8a44a42207d43274fa0e3a36a 100644 (file)
@@ -490,9 +490,7 @@ int snd_line6_playback_trigger(struct snd_line6_pcm *line6pcm, int cmd)
 
        switch (cmd) {
        case SNDRV_PCM_TRIGGER_START:
-#ifdef CONFIG_PM
        case SNDRV_PCM_TRIGGER_RESUME:
-#endif
                err = line6_pcm_acquire(line6pcm,
                                        LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM);
 
@@ -502,9 +500,7 @@ int snd_line6_playback_trigger(struct snd_line6_pcm *line6pcm, int cmd)
                break;
 
        case SNDRV_PCM_TRIGGER_STOP:
-#ifdef CONFIG_PM
        case SNDRV_PCM_TRIGGER_SUSPEND:
-#endif
                err = line6_pcm_release(line6pcm,
                                        LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM);
 
index dde9c2b8ad0fed3694e497c9f02c69c9f20a458d..d6bc5a1ab7f451c891bd24ddec742fa17b91d055 100644 (file)
@@ -153,9 +153,6 @@ static struct line6_pcm_properties pod_pcm_properties = {
                                           SNDRV_PCM_INFO_BLOCK_TRANSFER |
                                           SNDRV_PCM_INFO_MMAP_VALID |
                                           SNDRV_PCM_INFO_PAUSE |
-#ifdef CONFIG_PM
-                                          SNDRV_PCM_INFO_RESUME |
-#endif
                                           SNDRV_PCM_INFO_SYNC_START),
                                  .formats = SNDRV_PCM_FMTBIT_S24_3LE,
                                  .rates = SNDRV_PCM_RATE_KNOT,
@@ -173,9 +170,6 @@ static struct line6_pcm_properties pod_pcm_properties = {
                                          SNDRV_PCM_INFO_INTERLEAVED |
                                          SNDRV_PCM_INFO_BLOCK_TRANSFER |
                                          SNDRV_PCM_INFO_MMAP_VALID |
-#ifdef CONFIG_PM
-                                         SNDRV_PCM_INFO_RESUME |
-#endif
                                          SNDRV_PCM_INFO_SYNC_START),
                                 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
                                 .rates = SNDRV_PCM_RATE_KNOT,
index 84096326694cd8dc597e21cf6e563e70d9e22582..8f4ca1d20b6271b71057bd55f5d14691236c03f2 100644 (file)
@@ -50,9 +50,6 @@ static struct line6_pcm_properties podhd_pcm_properties = {
                                           SNDRV_PCM_INFO_BLOCK_TRANSFER |
                                           SNDRV_PCM_INFO_MMAP_VALID |
                                           SNDRV_PCM_INFO_PAUSE |
-#ifdef CONFIG_PM
-                                          SNDRV_PCM_INFO_RESUME |
-#endif
                                           SNDRV_PCM_INFO_SYNC_START),
                                  .formats = SNDRV_PCM_FMTBIT_S24_3LE,
                                  .rates = SNDRV_PCM_RATE_48000,
@@ -70,9 +67,6 @@ static struct line6_pcm_properties podhd_pcm_properties = {
                                          SNDRV_PCM_INFO_INTERLEAVED |
                                          SNDRV_PCM_INFO_BLOCK_TRANSFER |
                                          SNDRV_PCM_INFO_MMAP_VALID |
-#ifdef CONFIG_PM
-                                         SNDRV_PCM_INFO_RESUME |
-#endif
                                          SNDRV_PCM_INFO_SYNC_START),
                                 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
                                 .rates = SNDRV_PCM_RATE_48000,
index 4f07643e47f251a7dd0c473a538e7b54d4e79c3b..6ec3268a61539b67313fc34cab4d742022bbff27 100644 (file)
@@ -83,9 +83,6 @@ static struct line6_pcm_properties toneport_pcm_properties = {
                                           SNDRV_PCM_INFO_BLOCK_TRANSFER |
                                           SNDRV_PCM_INFO_MMAP_VALID |
                                           SNDRV_PCM_INFO_PAUSE |
-#ifdef CONFIG_PM
-                                          SNDRV_PCM_INFO_RESUME |
-#endif
                                           SNDRV_PCM_INFO_SYNC_START),
                                  .formats = SNDRV_PCM_FMTBIT_S16_LE,
                                  .rates = SNDRV_PCM_RATE_KNOT,
@@ -103,9 +100,6 @@ static struct line6_pcm_properties toneport_pcm_properties = {
                                          SNDRV_PCM_INFO_INTERLEAVED |
                                          SNDRV_PCM_INFO_BLOCK_TRANSFER |
                                          SNDRV_PCM_INFO_MMAP_VALID |
-#ifdef CONFIG_PM
-                                         SNDRV_PCM_INFO_RESUME |
-#endif
                                          SNDRV_PCM_INFO_SYNC_START),
                                 .formats = SNDRV_PCM_FMTBIT_S16_LE,
                                 .rates = SNDRV_PCM_RATE_KNOT,