aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sound/kernel-api/writing-an-alsa-driver.rst25
-rw-r--r--drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c1
-rw-r--r--include/sound/pcm.h6
-rw-r--r--sound/aoa/soundbus/i2sbus/core.c4
-rw-r--r--sound/arm/aaci.c1
-rw-r--r--sound/arm/pxa2xx-ac97.c1
-rw-r--r--sound/core/pcm.c26
-rw-r--r--sound/core/pcm_native.c11
-rw-r--r--sound/drivers/aloop.c4
-rw-r--r--sound/drivers/dummy.c2
-rw-r--r--sound/drivers/pcsp/pcsp.c1
-rw-r--r--sound/drivers/vx/vx_core.c4
-rw-r--r--sound/isa/ad1816a/ad1816a_lib.c1
-rw-r--r--sound/isa/als100.c1
-rw-r--r--sound/isa/cmi8328.c1
-rw-r--r--sound/isa/cmi8330.c1
-rw-r--r--sound/isa/es1688/es1688.c2
-rw-r--r--sound/isa/es18xx.c2
-rw-r--r--sound/isa/sb/jazz16.c1
-rw-r--r--sound/isa/sb/sb16.c1
-rw-r--r--sound/isa/sb/sb8.c1
-rw-r--r--sound/isa/wss/wss_lib.c1
-rw-r--r--sound/pci/ali5451/ali5451.c4
-rw-r--r--sound/pci/als300.c1
-rw-r--r--sound/pci/als4000.c1
-rw-r--r--sound/pci/atiixp.c19
-rw-r--r--sound/pci/atiixp_modem.c2
-rw-r--r--sound/pci/azt3328.c4
-rw-r--r--sound/pci/ca0106/ca0106_main.c3
-rw-r--r--sound/pci/cmipci.c4
-rw-r--r--sound/pci/cs4281.c2
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c6
-rw-r--r--sound/pci/cs5535audio/cs5535audio_pm.c1
-rw-r--r--sound/pci/ctxfi/ctatc.c8
-rw-r--r--sound/pci/echoaudio/echoaudio.c3
-rw-r--r--sound/pci/emu10k1/emu10k1.c6
-rw-r--r--sound/pci/ens1370.c3
-rw-r--r--sound/pci/es1938.c1
-rw-r--r--sound/pci/es1968.c1
-rw-r--r--sound/pci/fm801.c1
-rw-r--r--sound/pci/hda/hda_codec.c2
-rw-r--r--sound/pci/ice1712/ice1712.c3
-rw-r--r--sound/pci/ice1712/ice1724.c3
-rw-r--r--sound/pci/intel8x0.c2
-rw-r--r--sound/pci/intel8x0m.c3
-rw-r--r--sound/pci/maestro3.c1
-rw-r--r--sound/pci/nm256/nm256.c1
-rw-r--r--sound/pci/oxygen/oxygen_lib.c5
-rw-r--r--sound/pci/riptide/riptide.c1
-rw-r--r--sound/pci/rme96.c2
-rw-r--r--sound/pci/sis7019.c1
-rw-r--r--sound/pci/trident/trident_main.c4
-rw-r--r--sound/pci/via82xx.c2
-rw-r--r--sound/pci/via82xx_modem.c2
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c4
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf_core.c1
-rw-r--r--sound/ppc/pmac.c1
-rw-r--r--sound/soc/soc-pcm.c1
-rw-r--r--sound/usb/card.c1
-rw-r--r--sound/usb/line6/driver.c4
-rw-r--r--sound/x86/intel_hdmi_audio.c12
61 files changed, 50 insertions, 174 deletions
diff --git a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
index b37234afdfa1..7c2f2032d30a 100644
--- a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
+++ b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
@@ -3924,15 +3924,12 @@ The scheme of the real suspend job is as follows.
39242. Call :c:func:`snd_power_change_state()` with 39242. Call :c:func:`snd_power_change_state()` with
3925 ``SNDRV_CTL_POWER_D3hot`` to change the power status. 3925 ``SNDRV_CTL_POWER_D3hot`` to change the power status.
3926 3926
39273. Call :c:func:`snd_pcm_suspend_all()` to suspend the running 39273. If AC97 codecs are used, call :c:func:`snd_ac97_suspend()` for
3928 PCM streams.
3929
39304. If AC97 codecs are used, call :c:func:`snd_ac97_suspend()` for
3931 each codec. 3928 each codec.
3932 3929
39335. Save the register values if necessary. 39304. Save the register values if necessary.
3934 3931
39356. Stop the hardware if necessary. 39325. Stop the hardware if necessary.
3936 3933
3937A typical code would be like: 3934A typical code would be like:
3938 3935
@@ -3946,12 +3943,10 @@ A typical code would be like:
3946 /* (2) */ 3943 /* (2) */
3947 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 3944 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
3948 /* (3) */ 3945 /* (3) */
3949 snd_pcm_suspend_all(chip->pcm);
3950 /* (4) */
3951 snd_ac97_suspend(chip->ac97); 3946 snd_ac97_suspend(chip->ac97);
3952 /* (5) */ 3947 /* (4) */
3953 snd_mychip_save_registers(chip); 3948 snd_mychip_save_registers(chip);
3954 /* (6) */ 3949 /* (5) */
3955 snd_mychip_stop_hardware(chip); 3950 snd_mychip_stop_hardware(chip);
3956 return 0; 3951 return 0;
3957 } 3952 }
@@ -3994,13 +3989,9 @@ A typical code would be like:
3994 return 0; 3989 return 0;
3995 } 3990 }
3996 3991
3997As shown in the above, it's better to save registers after suspending 3992Note that, at the time this callback gets called, the PCM stream has
3998the PCM operations via :c:func:`snd_pcm_suspend_all()` or 3993been already suspended via its own PM ops calling
3999:c:func:`snd_pcm_suspend()`. It means that the PCM streams are 3994:c:func:`snd_pcm_suspend_all()` internally.
4000already stopped when the register snapshot is taken. But, remember that
4001you don't have to restart the PCM stream in the resume callback. It'll
4002be restarted via trigger call with ``SNDRV_PCM_TRIGGER_RESUME`` when
4003necessary.
4004 3995
4005OK, we have all callbacks now. Let's set them up. In the initialization 3996OK, we have all callbacks now. Let's set them up. In the initialization
4006of the card, make sure that you can get the chip data from the card 3997of the card, make sure that you can get the chip data from the card
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
index cf3f0caf9c63..ed7af7518b52 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
@@ -614,7 +614,6 @@ static int snd_dw_hdmi_suspend(struct device *dev)
614 struct snd_dw_hdmi *dw = dev_get_drvdata(dev); 614 struct snd_dw_hdmi *dw = dev_get_drvdata(dev);
615 615
616 snd_power_change_state(dw->card, SNDRV_CTL_POWER_D3cold); 616 snd_power_change_state(dw->card, SNDRV_CTL_POWER_D3cold);
617 snd_pcm_suspend_all(dw->pcm);
618 617
619 return 0; 618 return 0;
620} 619}
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index d6bd3caf6878..2c30c1ad1b0d 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -538,6 +538,7 @@ struct snd_pcm {
538 void (*private_free) (struct snd_pcm *pcm); 538 void (*private_free) (struct snd_pcm *pcm);
539 bool internal; /* pcm is for internal use only */ 539 bool internal; /* pcm is for internal use only */
540 bool nonatomic; /* whole PCM operations are in non-atomic context */ 540 bool nonatomic; /* whole PCM operations are in non-atomic context */
541 bool no_device_suspend; /* don't invoke device PM suspend */
541#if IS_ENABLED(CONFIG_SND_PCM_OSS) 542#if IS_ENABLED(CONFIG_SND_PCM_OSS)
542 struct snd_pcm_oss oss; 543 struct snd_pcm_oss oss;
543#endif 544#endif
@@ -581,13 +582,8 @@ int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t status);
581int snd_pcm_drain_done(struct snd_pcm_substream *substream); 582int snd_pcm_drain_done(struct snd_pcm_substream *substream);
582int snd_pcm_stop_xrun(struct snd_pcm_substream *substream); 583int snd_pcm_stop_xrun(struct snd_pcm_substream *substream);
583#ifdef CONFIG_PM 584#ifdef CONFIG_PM
584int snd_pcm_suspend(struct snd_pcm_substream *substream);
585int snd_pcm_suspend_all(struct snd_pcm *pcm); 585int snd_pcm_suspend_all(struct snd_pcm *pcm);
586#else 586#else
587static inline int snd_pcm_suspend(struct snd_pcm_substream *substream)
588{
589 return 0;
590}
591static inline int snd_pcm_suspend_all(struct snd_pcm *pcm) 587static inline int snd_pcm_suspend_all(struct snd_pcm *pcm)
592{ 588{
593 return 0; 589 return 0;
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index c3f57a3fb1a5..33e82341c048 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -380,10 +380,6 @@ static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state)
380 int err, ret = 0; 380 int err, ret = 0;
381 381
382 list_for_each_entry(i2sdev, &control->list, item) { 382 list_for_each_entry(i2sdev, &control->list, item) {
383 /* Notify Alsa */
384 /* Suspend PCM streams */
385 snd_pcm_suspend_all(i2sdev->sound.pcm);
386
387 /* Notify codecs */ 383 /* Notify codecs */
388 list_for_each_entry(cii, &i2sdev->sound.codec_list, list) { 384 list_for_each_entry(cii, &i2sdev->sound.codec_list, list) {
389 err = 0; 385 err = 0;
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 0114ffed56dd..0c3f073e2600 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -757,7 +757,6 @@ static int aaci_do_suspend(struct snd_card *card)
757{ 757{
758 struct aaci *aaci = card->private_data; 758 struct aaci *aaci = card->private_data;
759 snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); 759 snd_power_change_state(card, SNDRV_CTL_POWER_D3cold);
760 snd_pcm_suspend_all(aaci->pcm);
761 return 0; 760 return 0;
762} 761}
763 762
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 1f72672262d0..68fe5bb11eea 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -124,7 +124,6 @@ static int pxa2xx_ac97_do_suspend(struct snd_card *card)
124 pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data; 124 pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
125 125
126 snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); 126 snd_power_change_state(card, SNDRV_CTL_POWER_D3cold);
127 snd_pcm_suspend_all(pxa2xx_ac97_pcm);
128 snd_ac97_suspend(pxa2xx_ac97_ac97); 127 snd_ac97_suspend(pxa2xx_ac97_ac97);
129 if (platform_ops && platform_ops->suspend) 128 if (platform_ops && platform_ops->suspend)
130 platform_ops->suspend(platform_ops->priv); 129 platform_ops->suspend(platform_ops->priv);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 01b9d62eef14..ca1ea3cf9350 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -683,6 +683,31 @@ static inline int snd_pcm_substream_proc_done(struct snd_pcm_substream *substrea
683 683
684static const struct attribute_group *pcm_dev_attr_groups[]; 684static const struct attribute_group *pcm_dev_attr_groups[];
685 685
686/*
687 * PM callbacks: we need to deal only with suspend here, as the resume is
688 * triggered either from user-space or the driver's resume callback
689 */
690#ifdef CONFIG_PM_SLEEP
691static int do_pcm_suspend(struct device *dev)
692{
693 struct snd_pcm_str *pstr = container_of(dev, struct snd_pcm_str, dev);
694
695 if (!pstr->pcm->no_device_suspend)
696 snd_pcm_suspend_all(pstr->pcm);
697 return 0;
698}
699#endif
700
701static const struct dev_pm_ops pcm_dev_pm_ops = {
702 SET_SYSTEM_SLEEP_PM_OPS(do_pcm_suspend, NULL)
703};
704
705/* device type for PCM -- basically only for passing PM callbacks */
706static const struct device_type pcm_dev_type = {
707 .name = "pcm",
708 .pm = &pcm_dev_pm_ops,
709};
710
686/** 711/**
687 * snd_pcm_new_stream - create a new PCM stream 712 * snd_pcm_new_stream - create a new PCM stream
688 * @pcm: the pcm instance 713 * @pcm: the pcm instance
@@ -713,6 +738,7 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count)
713 738
714 snd_device_initialize(&pstr->dev, pcm->card); 739 snd_device_initialize(&pstr->dev, pcm->card);
715 pstr->dev.groups = pcm_dev_attr_groups; 740 pstr->dev.groups = pcm_dev_attr_groups;
741 pstr->dev.type = &pcm_dev_type;
716 dev_set_name(&pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device, 742 dev_set_name(&pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device,
717 stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c'); 743 stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c');
718 744
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 818dff1de545..26afb6b0889a 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1460,29 +1460,24 @@ static const struct action_ops snd_pcm_action_suspend = {
1460 .post_action = snd_pcm_post_suspend 1460 .post_action = snd_pcm_post_suspend
1461}; 1461};
1462 1462
1463/** 1463/*
1464 * snd_pcm_suspend - trigger SUSPEND to all linked streams 1464 * snd_pcm_suspend - trigger SUSPEND to all linked streams
1465 * @substream: the PCM substream 1465 * @substream: the PCM substream
1466 * 1466 *
1467 * After this call, all streams are changed to SUSPENDED state. 1467 * After this call, all streams are changed to SUSPENDED state.
1468 * 1468 *
1469 * Return: Zero if successful (or @substream is %NULL), or a negative error 1469 * Return: Zero if successful, or a negative error code.
1470 * code.
1471 */ 1470 */
1472int snd_pcm_suspend(struct snd_pcm_substream *substream) 1471static int snd_pcm_suspend(struct snd_pcm_substream *substream)
1473{ 1472{
1474 int err; 1473 int err;
1475 unsigned long flags; 1474 unsigned long flags;
1476 1475
1477 if (! substream)
1478 return 0;
1479
1480 snd_pcm_stream_lock_irqsave(substream, flags); 1476 snd_pcm_stream_lock_irqsave(substream, flags);
1481 err = snd_pcm_action(&snd_pcm_action_suspend, substream, 0); 1477 err = snd_pcm_action(&snd_pcm_action_suspend, substream, 0);
1482 snd_pcm_stream_unlock_irqrestore(substream, flags); 1478 snd_pcm_stream_unlock_irqrestore(substream, flags);
1483 return err; 1479 return err;
1484} 1480}
1485EXPORT_SYMBOL(snd_pcm_suspend);
1486 1481
1487/** 1482/**
1488 * snd_pcm_suspend_all - trigger SUSPEND to all substreams in the given pcm 1483 * snd_pcm_suspend_all - trigger SUSPEND to all substreams in the given pcm
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 1e34e6381baa..65c903b639c2 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -1200,12 +1200,8 @@ static int loopback_remove(struct platform_device *devptr)
1200static int loopback_suspend(struct device *pdev) 1200static int loopback_suspend(struct device *pdev)
1201{ 1201{
1202 struct snd_card *card = dev_get_drvdata(pdev); 1202 struct snd_card *card = dev_get_drvdata(pdev);
1203 struct loopback *loopback = card->private_data;
1204 1203
1205 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1204 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1206
1207 snd_pcm_suspend_all(loopback->pcm[0]);
1208 snd_pcm_suspend_all(loopback->pcm[1]);
1209 return 0; 1205 return 0;
1210} 1206}
1211 1207
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 9af154db530a..c8d31550e9a1 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -1138,10 +1138,8 @@ static int snd_dummy_remove(struct platform_device *devptr)
1138static int snd_dummy_suspend(struct device *pdev) 1138static int snd_dummy_suspend(struct device *pdev)
1139{ 1139{
1140 struct snd_card *card = dev_get_drvdata(pdev); 1140 struct snd_card *card = dev_get_drvdata(pdev);
1141 struct snd_dummy *dummy = card->private_data;
1142 1141
1143 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1142 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1144 snd_pcm_suspend_all(dummy->pcm);
1145 return 0; 1143 return 0;
1146} 1144}
1147 1145
diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c
index 0dd3f46eb03e..d83ad3820f02 100644
--- a/sound/drivers/pcsp/pcsp.c
+++ b/sound/drivers/pcsp/pcsp.c
@@ -197,7 +197,6 @@ static int pcsp_suspend(struct device *dev)
197{ 197{
198 struct snd_pcsp *chip = dev_get_drvdata(dev); 198 struct snd_pcsp *chip = dev_get_drvdata(dev);
199 pcsp_stop_beep(chip); 199 pcsp_stop_beep(chip);
200 snd_pcm_suspend_all(chip->pcm);
201 return 0; 200 return 0;
202} 201}
203 202
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
index 04368dd59a4c..19496fa486aa 100644
--- a/sound/drivers/vx/vx_core.c
+++ b/sound/drivers/vx/vx_core.c
@@ -732,12 +732,8 @@ EXPORT_SYMBOL(snd_vx_dsp_load);
732 */ 732 */
733int snd_vx_suspend(struct vx_core *chip) 733int snd_vx_suspend(struct vx_core *chip)
734{ 734{
735 unsigned int i;
736
737 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot); 735 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
738 chip->chip_status |= VX_STAT_IN_SUSPEND; 736 chip->chip_status |= VX_STAT_IN_SUSPEND;
739 for (i = 0; i < chip->hw->num_codecs; i++)
740 snd_pcm_suspend_all(chip->pcm[i]);
741 737
742 return 0; 738 return 0;
743} 739}
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index fba6d22f7f4b..61e8c7e524db 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -518,7 +518,6 @@ void snd_ad1816a_suspend(struct snd_ad1816a *chip)
518 int reg; 518 int reg;
519 unsigned long flags; 519 unsigned long flags;
520 520
521 snd_pcm_suspend_all(chip->pcm);
522 spin_lock_irqsave(&chip->lock, flags); 521 spin_lock_irqsave(&chip->lock, flags);
523 for (reg = 0; reg < 48; reg++) 522 for (reg = 0; reg < 48; reg++)
524 chip->image[reg] = snd_ad1816a_read(chip, reg); 523 chip->image[reg] = snd_ad1816a_read(chip, reg);
diff --git a/sound/isa/als100.c b/sound/isa/als100.c
index f63142ec287e..571108021e9d 100644
--- a/sound/isa/als100.c
+++ b/sound/isa/als100.c
@@ -322,7 +322,6 @@ static int snd_als100_pnp_suspend(struct pnp_card_link *pcard, pm_message_t stat
322 struct snd_sb *chip = acard->chip; 322 struct snd_sb *chip = acard->chip;
323 323
324 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 324 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
325 snd_pcm_suspend_all(chip->pcm);
326 snd_sbmixer_suspend(chip); 325 snd_sbmixer_suspend(chip);
327 return 0; 326 return 0;
328} 327}
diff --git a/sound/isa/cmi8328.c b/sound/isa/cmi8328.c
index de6ef1b1cf0e..617977516201 100644
--- a/sound/isa/cmi8328.c
+++ b/sound/isa/cmi8328.c
@@ -434,7 +434,6 @@ static int snd_cmi8328_suspend(struct device *pdev, unsigned int n,
434 cmi = card->private_data; 434 cmi = card->private_data;
435 snd_cmi8328_cfg_save(cmi->port, cmi->cfg); 435 snd_cmi8328_cfg_save(cmi->port, cmi->cfg);
436 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 436 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
437 snd_pcm_suspend_all(cmi->wss->pcm);
438 cmi->wss->suspend(cmi->wss); 437 cmi->wss->suspend(cmi->wss);
439 438
440 return 0; 439 return 0;
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index 6b8c46942efb..7e5aa06414c4 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -484,7 +484,6 @@ static int snd_cmi8330_suspend(struct snd_card *card)
484 struct snd_cmi8330 *acard = card->private_data; 484 struct snd_cmi8330 *acard = card->private_data;
485 485
486 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 486 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
487 snd_pcm_suspend_all(acard->pcm);
488 acard->wss->suspend(acard->wss); 487 acard->wss->suspend(acard->wss);
489 snd_sbmixer_suspend(acard->sb); 488 snd_sbmixer_suspend(acard->sb);
490 return 0; 489 return 0;
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index 3dfe7e592c25..87527627e059 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -301,10 +301,8 @@ static int snd_es968_pnp_suspend(struct pnp_card_link *pcard,
301 pm_message_t state) 301 pm_message_t state)
302{ 302{
303 struct snd_card *card = pnp_get_card_drvdata(pcard); 303 struct snd_card *card = pnp_get_card_drvdata(pcard);
304 struct snd_es1688 *chip = card->private_data;
305 304
306 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 305 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
307 snd_pcm_suspend_all(chip->pcm);
308 return 0; 306 return 0;
309} 307}
310 308
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 0d103d6f805e..77aa9a27fb3b 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -1731,8 +1731,6 @@ static int snd_es18xx_suspend(struct snd_card *card, pm_message_t state)
1731 1731
1732 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1732 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1733 1733
1734 snd_pcm_suspend_all(chip->pcm);
1735
1736 /* power down */ 1734 /* power down */
1737 chip->pm_reg = (unsigned char)snd_es18xx_read(chip, ES18XX_PM); 1735 chip->pm_reg = (unsigned char)snd_es18xx_read(chip, ES18XX_PM);
1738 chip->pm_reg |= (ES18XX_PM_FM | ES18XX_PM_SUS); 1736 chip->pm_reg |= (ES18XX_PM_FM | ES18XX_PM_SUS);
diff --git a/sound/isa/sb/jazz16.c b/sound/isa/sb/jazz16.c
index bfa0055e1fd6..7a313ff589c7 100644
--- a/sound/isa/sb/jazz16.c
+++ b/sound/isa/sb/jazz16.c
@@ -356,7 +356,6 @@ static int snd_jazz16_suspend(struct device *pdev, unsigned int n,
356 struct snd_sb *chip = acard->chip; 356 struct snd_sb *chip = acard->chip;
357 357
358 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 358 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
359 snd_pcm_suspend_all(chip->pcm);
360 snd_sbmixer_suspend(chip); 359 snd_sbmixer_suspend(chip);
361 return 0; 360 return 0;
362} 361}
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 8f9ebeb998f6..3844d4c02f49 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -471,7 +471,6 @@ static int snd_sb16_suspend(struct snd_card *card, pm_message_t state)
471 struct snd_sb *chip = acard->chip; 471 struct snd_sb *chip = acard->chip;
472 472
473 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 473 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
474 snd_pcm_suspend_all(chip->pcm);
475 snd_sbmixer_suspend(chip); 474 snd_sbmixer_suspend(chip);
476 return 0; 475 return 0;
477} 476}
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index d77dcba276b5..aa2a83eb81a9 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -218,7 +218,6 @@ static int snd_sb8_suspend(struct device *dev, unsigned int n,
218 struct snd_sb *chip = acard->chip; 218 struct snd_sb *chip = acard->chip;
219 219
220 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 220 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
221 snd_pcm_suspend_all(chip->pcm);
222 snd_sbmixer_suspend(chip); 221 snd_sbmixer_suspend(chip);
223 return 0; 222 return 0;
224} 223}
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c
index 3a5008837576..b11ef97bce1b 100644
--- a/sound/isa/wss/wss_lib.c
+++ b/sound/isa/wss/wss_lib.c
@@ -1625,7 +1625,6 @@ static void snd_wss_suspend(struct snd_wss *chip)
1625 int reg; 1625 int reg;
1626 unsigned long flags; 1626 unsigned long flags;
1627 1627
1628 snd_pcm_suspend_all(chip->pcm);
1629 spin_lock_irqsave(&chip->reg_lock, flags); 1628 spin_lock_irqsave(&chip->reg_lock, flags);
1630 for (reg = 0; reg < 32; reg++) 1629 for (reg = 0; reg < 32; reg++)
1631 chip->image[reg] = snd_wss_in(chip, reg); 1630 chip->image[reg] = snd_wss_in(chip, reg);
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 9f569379b77e..e781ccca1793 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -1882,10 +1882,8 @@ static int ali_suspend(struct device *dev)
1882 return 0; 1882 return 0;
1883 1883
1884 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1884 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1885 for (i = 0; i < chip->num_of_codecs; i++) { 1885 for (i = 0; i < chip->num_of_codecs; i++)
1886 snd_pcm_suspend_all(chip->pcm[i]);
1887 snd_ac97_suspend(chip->ac97[i]); 1886 snd_ac97_suspend(chip->ac97[i]);
1888 }
1889 1887
1890 spin_lock_irq(&chip->reg_lock); 1888 spin_lock_irq(&chip->reg_lock);
1891 1889
diff --git a/sound/pci/als300.c b/sound/pci/als300.c
index eaa2d853d922..516b3d9cbfdf 100644
--- a/sound/pci/als300.c
+++ b/sound/pci/als300.c
@@ -731,7 +731,6 @@ static int snd_als300_suspend(struct device *dev)
731 struct snd_als300 *chip = card->private_data; 731 struct snd_als300 *chip = card->private_data;
732 732
733 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 733 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
734 snd_pcm_suspend_all(chip->pcm);
735 snd_ac97_suspend(chip->ac97); 734 snd_ac97_suspend(chip->ac97);
736 return 0; 735 return 0;
737} 736}
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c
index 26b097edec8c..45fa38382e79 100644
--- a/sound/pci/als4000.c
+++ b/sound/pci/als4000.c
@@ -994,7 +994,6 @@ static int snd_als4000_suspend(struct device *dev)
994 994
995 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 995 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
996 996
997 snd_pcm_suspend_all(chip->pcm);
998 snd_sbmixer_suspend(chip); 997 snd_sbmixer_suspend(chip);
999 return 0; 998 return 0;
1000} 999}
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 1a41f8c80243..7715d26916ac 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -733,6 +733,10 @@ static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
733 case SNDRV_PCM_TRIGGER_START: 733 case SNDRV_PCM_TRIGGER_START:
734 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 734 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
735 case SNDRV_PCM_TRIGGER_RESUME: 735 case SNDRV_PCM_TRIGGER_RESUME:
736 if (dma->running && dma->suspended &&
737 cmd == SNDRV_PCM_TRIGGER_RESUME)
738 writel(dma->saved_curptr, chip->remap_addr +
739 dma->ops->dt_cur);
736 dma->ops->enable_transfer(chip, 1); 740 dma->ops->enable_transfer(chip, 1);
737 dma->running = 1; 741 dma->running = 1;
738 dma->suspended = 0; 742 dma->suspended = 0;
@@ -740,9 +744,12 @@ static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
740 case SNDRV_PCM_TRIGGER_STOP: 744 case SNDRV_PCM_TRIGGER_STOP:
741 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 745 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
742 case SNDRV_PCM_TRIGGER_SUSPEND: 746 case SNDRV_PCM_TRIGGER_SUSPEND:
747 dma->suspended = cmd == SNDRV_PCM_TRIGGER_SUSPEND;
748 if (dma->running && dma->suspended)
749 dma->saved_curptr = readl(chip->remap_addr +
750 dma->ops->dt_cur);
743 dma->ops->enable_transfer(chip, 0); 751 dma->ops->enable_transfer(chip, 0);
744 dma->running = 0; 752 dma->running = 0;
745 dma->suspended = cmd == SNDRV_PCM_TRIGGER_SUSPEND;
746 break; 753 break;
747 default: 754 default:
748 err = -EINVAL; 755 err = -EINVAL;
@@ -1479,14 +1486,6 @@ static int snd_atiixp_suspend(struct device *dev)
1479 int i; 1486 int i;
1480 1487
1481 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1488 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1482 for (i = 0; i < NUM_ATI_PCMDEVS; i++)
1483 if (chip->pcmdevs[i]) {
1484 struct atiixp_dma *dma = &chip->dmas[i];
1485 if (dma->substream && dma->running)
1486 dma->saved_curptr = readl(chip->remap_addr +
1487 dma->ops->dt_cur);
1488 snd_pcm_suspend_all(chip->pcmdevs[i]);
1489 }
1490 for (i = 0; i < NUM_ATI_CODECS; i++) 1489 for (i = 0; i < NUM_ATI_CODECS; i++)
1491 snd_ac97_suspend(chip->ac97[i]); 1490 snd_ac97_suspend(chip->ac97[i]);
1492 snd_atiixp_aclink_down(chip); 1491 snd_atiixp_aclink_down(chip);
@@ -1514,8 +1513,6 @@ static int snd_atiixp_resume(struct device *dev)
1514 dma->substream->ops->prepare(dma->substream); 1513 dma->substream->ops->prepare(dma->substream);
1515 writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, 1514 writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN,
1516 chip->remap_addr + dma->ops->llp_offset); 1515 chip->remap_addr + dma->ops->llp_offset);
1517 writel(dma->saved_curptr, chip->remap_addr +
1518 dma->ops->dt_cur);
1519 } 1516 }
1520 } 1517 }
1521 1518
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index dc1de860cedf..a357a8e2e73d 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -1125,8 +1125,6 @@ static int snd_atiixp_suspend(struct device *dev)
1125 int i; 1125 int i;
1126 1126
1127 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1127 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1128 for (i = 0; i < NUM_ATI_PCMDEVS; i++)
1129 snd_pcm_suspend_all(chip->pcmdevs[i]);
1130 for (i = 0; i < NUM_ATI_CODECS; i++) 1128 for (i = 0; i < NUM_ATI_CODECS; i++)
1131 snd_ac97_suspend(chip->ac97[i]); 1129 snd_ac97_suspend(chip->ac97[i]);
1132 snd_atiixp_aclink_down(chip); 1130 snd_atiixp_aclink_down(chip);
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
index fc18c29a8173..90348817f096 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -2699,10 +2699,6 @@ snd_azf3328_suspend(struct device *dev)
2699 2699
2700 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2700 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2701 2701
2702 /* same pcm object for playback/capture */
2703 snd_pcm_suspend_all(chip->pcm[AZF_CODEC_PLAYBACK]);
2704 snd_pcm_suspend_all(chip->pcm[AZF_CODEC_I2S_OUT]);
2705
2706 snd_azf3328_suspend_ac97(chip); 2702 snd_azf3328_suspend_ac97(chip);
2707 2703
2708 snd_azf3328_suspend_regs(chip, chip->ctrl_io, 2704 snd_azf3328_suspend_regs(chip, chip->ctrl_io,
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index cd27b5536654..3d1b0bbff33b 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1910,11 +1910,8 @@ static int snd_ca0106_suspend(struct device *dev)
1910{ 1910{
1911 struct snd_card *card = dev_get_drvdata(dev); 1911 struct snd_card *card = dev_get_drvdata(dev);
1912 struct snd_ca0106 *chip = card->private_data; 1912 struct snd_ca0106 *chip = card->private_data;
1913 int i;
1914 1913
1915 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1914 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1916 for (i = 0; i < 4; i++)
1917 snd_pcm_suspend_all(chip->pcm[i]);
1918 if (chip->details->ac97) 1915 if (chip->details->ac97)
1919 snd_ac97_suspend(chip->ac97); 1916 snd_ac97_suspend(chip->ac97);
1920 snd_ca0106_mixer_suspend(chip); 1917 snd_ca0106_mixer_suspend(chip);
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index 452cc79b44af..5bbf31c1695c 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -3351,10 +3351,6 @@ static int snd_cmipci_suspend(struct device *dev)
3351 3351
3352 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 3352 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
3353 3353
3354 snd_pcm_suspend_all(cm->pcm);
3355 snd_pcm_suspend_all(cm->pcm2);
3356 snd_pcm_suspend_all(cm->pcm_spdif);
3357
3358 /* save registers */ 3354 /* save registers */
3359 for (i = 0; i < ARRAY_SIZE(saved_regs); i++) 3355 for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
3360 cm->saved_regs[i] = snd_cmipci_read(cm, saved_regs[i]); 3356 cm->saved_regs[i] = snd_cmipci_read(cm, saved_regs[i]);
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index ec4247638fa1..a9fb819cad1d 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -2002,8 +2002,6 @@ static int cs4281_suspend(struct device *dev)
2002 unsigned int i; 2002 unsigned int i;
2003 2003
2004 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2004 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2005 snd_pcm_suspend_all(chip->pcm);
2006
2007 snd_ac97_suspend(chip->ac97); 2005 snd_ac97_suspend(chip->ac97);
2008 snd_ac97_suspend(chip->ac97_secondary); 2006 snd_ac97_suspend(chip->ac97_secondary);
2009 2007
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 750eec437a79..a77d4cc44028 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -3781,12 +3781,6 @@ static int snd_cs46xx_suspend(struct device *dev)
3781 3781
3782 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 3782 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
3783 chip->in_suspend = 1; 3783 chip->in_suspend = 1;
3784 snd_pcm_suspend_all(chip->pcm);
3785#ifdef CONFIG_SND_CS46XX_NEW_DSP
3786 snd_pcm_suspend_all(chip->pcm_rear);
3787 snd_pcm_suspend_all(chip->pcm_center_lfe);
3788 snd_pcm_suspend_all(chip->pcm_iec958);
3789#endif
3790 // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); 3784 // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL);
3791 // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); 3785 // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE);
3792 3786
diff --git a/sound/pci/cs5535audio/cs5535audio_pm.c b/sound/pci/cs5535audio/cs5535audio_pm.c
index 82bd10b68a77..446ef1f1b45a 100644
--- a/sound/pci/cs5535audio/cs5535audio_pm.c
+++ b/sound/pci/cs5535audio/cs5535audio_pm.c
@@ -62,7 +62,6 @@ static int __maybe_unused snd_cs5535audio_suspend(struct device *dev)
62 int i; 62 int i;
63 63
64 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 64 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
65 snd_pcm_suspend_all(cs5535au->pcm);
66 snd_ac97_suspend(cs5535au->ac97); 65 snd_ac97_suspend(cs5535au->ac97);
67 for (i = 0; i < NUM_CS5535AUDIO_DMAS; i++) { 66 for (i = 0; i < NUM_CS5535AUDIO_DMAS; i++) {
68 struct cs5535audio_dma *dma = &cs5535au->dmas[i]; 67 struct cs5535audio_dma *dma = &cs5535au->dmas[i];
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index 2ada8444abd9..e622613ea947 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -1548,18 +1548,10 @@ static void atc_connect_resources(struct ct_atc *atc)
1548#ifdef CONFIG_PM_SLEEP 1548#ifdef CONFIG_PM_SLEEP
1549static int atc_suspend(struct ct_atc *atc) 1549static int atc_suspend(struct ct_atc *atc)
1550{ 1550{
1551 int i;
1552 struct hw *hw = atc->hw; 1551 struct hw *hw = atc->hw;
1553 1552
1554 snd_power_change_state(atc->card, SNDRV_CTL_POWER_D3hot); 1553 snd_power_change_state(atc->card, SNDRV_CTL_POWER_D3hot);
1555 1554
1556 for (i = FRONT; i < NUM_PCMS; i++) {
1557 if (!atc->pcms[i])
1558 continue;
1559
1560 snd_pcm_suspend_all(atc->pcms[i]);
1561 }
1562
1563 atc_release_resources(atc); 1555 atc_release_resources(atc);
1564 1556
1565 hw->suspend(hw); 1557 hw->suspend(hw);
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 907cf1a46712..18d30d479b6b 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -2165,9 +2165,6 @@ static int snd_echo_suspend(struct device *dev)
2165{ 2165{
2166 struct echoaudio *chip = dev_get_drvdata(dev); 2166 struct echoaudio *chip = dev_get_drvdata(dev);
2167 2167
2168 snd_pcm_suspend_all(chip->analog_pcm);
2169 snd_pcm_suspend_all(chip->digital_pcm);
2170
2171#ifdef ECHOCARD_HAS_MIDI 2168#ifdef ECHOCARD_HAS_MIDI
2172 /* This call can sleep */ 2169 /* This call can sleep */
2173 if (chip->midi_out) 2170 if (chip->midi_out)
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
index d3203df50a1a..3c41a0edcfb0 100644
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -224,12 +224,6 @@ static int snd_emu10k1_suspend(struct device *dev)
224 224
225 cancel_delayed_work_sync(&emu->emu1010.firmware_work); 225 cancel_delayed_work_sync(&emu->emu1010.firmware_work);
226 226
227 snd_pcm_suspend_all(emu->pcm);
228 snd_pcm_suspend_all(emu->pcm_mic);
229 snd_pcm_suspend_all(emu->pcm_efx);
230 snd_pcm_suspend_all(emu->pcm_multi);
231 snd_pcm_suspend_all(emu->pcm_p16v);
232
233 snd_ac97_suspend(emu->ac97); 227 snd_ac97_suspend(emu->ac97);
234 228
235 snd_emu10k1_efx_suspend(emu); 229 snd_emu10k1_efx_suspend(emu);
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c
index 727eb3da1fda..1f2960ecc57e 100644
--- a/sound/pci/ens1370.c
+++ b/sound/pci/ens1370.c
@@ -2037,9 +2037,6 @@ static int snd_ensoniq_suspend(struct device *dev)
2037 2037
2038 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2038 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2039 2039
2040 snd_pcm_suspend_all(ensoniq->pcm1);
2041 snd_pcm_suspend_all(ensoniq->pcm2);
2042
2043#ifdef CHIP1371 2040#ifdef CHIP1371
2044 snd_ac97_suspend(ensoniq->u.es1371.ac97); 2041 snd_ac97_suspend(ensoniq->u.es1371.ac97);
2045#else 2042#else
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index 9d248eb2e26c..84d07bce581c 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -1475,7 +1475,6 @@ static int es1938_suspend(struct device *dev)
1475 unsigned char *s, *d; 1475 unsigned char *s, *d;
1476 1476
1477 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1477 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1478 snd_pcm_suspend_all(chip->pcm);
1479 1478
1480 /* save mixer-related registers */ 1479 /* save mixer-related registers */
1481 for (s = saved_regs, d = chip->saved_regs; *s; s++, d++) 1480 for (s = saved_regs, d = chip->saved_regs; *s; s++, d++)
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 0b1845ca6005..9dcb698fc8c7 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -2392,7 +2392,6 @@ static int es1968_suspend(struct device *dev)
2392 chip->in_suspend = 1; 2392 chip->in_suspend = 1;
2393 cancel_work_sync(&chip->hwvol_work); 2393 cancel_work_sync(&chip->hwvol_work);
2394 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2394 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2395 snd_pcm_suspend_all(chip->pcm);
2396 snd_ac97_suspend(chip->ac97); 2395 snd_ac97_suspend(chip->ac97);
2397 snd_es1968_bob_stop(chip); 2396 snd_es1968_bob_stop(chip);
2398 return 0; 2397 return 0;
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index e3fb9c61017c..1317f3183eb1 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1408,7 +1408,6 @@ static int snd_fm801_suspend(struct device *dev)
1408 if (chip->tea575x_tuner & TUNER_ONLY) { 1408 if (chip->tea575x_tuner & TUNER_ONLY) {
1409 /* FIXME: tea575x suspend */ 1409 /* FIXME: tea575x suspend */
1410 } else { 1410 } else {
1411 snd_pcm_suspend_all(chip->pcm);
1412 snd_ac97_suspend(chip->ac97); 1411 snd_ac97_suspend(chip->ac97);
1413 snd_ac97_suspend(chip->ac97_sec); 1412 snd_ac97_suspend(chip->ac97_sec);
1414 } 1413 }
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 9f8d59e7e89f..ff6dbed4d3cd 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2927,8 +2927,6 @@ static int hda_codec_runtime_suspend(struct device *dev)
2927 unsigned int state; 2927 unsigned int state;
2928 2928
2929 cancel_delayed_work_sync(&codec->jackpoll_work); 2929 cancel_delayed_work_sync(&codec->jackpoll_work);
2930 list_for_each_entry(pcm, &codec->pcm_list_head, list)
2931 snd_pcm_suspend_all(pcm->pcm);
2932 state = hda_call_codec_suspend(codec); 2930 state = hda_call_codec_suspend(codec);
2933 if (codec->link_down_at_suspend || 2931 if (codec->link_down_at_suspend ||
2934 (codec_has_clkstop(codec) && codec_has_epss(codec) && 2932 (codec_has_clkstop(codec) && codec_has_epss(codec) &&
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index f1fe497c2f9d..dda9b26192cb 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2792,9 +2792,6 @@ static int snd_ice1712_suspend(struct device *dev)
2792 2792
2793 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2793 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2794 2794
2795 snd_pcm_suspend_all(ice->pcm);
2796 snd_pcm_suspend_all(ice->pcm_pro);
2797 snd_pcm_suspend_all(ice->pcm_ds);
2798 snd_ac97_suspend(ice->ac97); 2795 snd_ac97_suspend(ice->ac97);
2799 2796
2800 spin_lock_irq(&ice->reg_lock); 2797 spin_lock_irq(&ice->reg_lock);
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index 057c2f394ea7..42994cf36156 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -2804,9 +2804,6 @@ static int snd_vt1724_suspend(struct device *dev)
2804 2804
2805 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2805 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2806 2806
2807 snd_pcm_suspend_all(ice->pcm);
2808 snd_pcm_suspend_all(ice->pcm_pro);
2809 snd_pcm_suspend_all(ice->pcm_ds);
2810 snd_ac97_suspend(ice->ac97); 2807 snd_ac97_suspend(ice->ac97);
2811 2808
2812 spin_lock_irq(&ice->reg_lock); 2809 spin_lock_irq(&ice->reg_lock);
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index ffddcdfe0c66..885e1d488ed6 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -2614,8 +2614,6 @@ static int intel8x0_suspend(struct device *dev)
2614 int i; 2614 int i;
2615 2615
2616 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2616 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2617 for (i = 0; i < chip->pcm_devs; i++)
2618 snd_pcm_suspend_all(chip->pcm[i]);
2619 for (i = 0; i < chip->ncodecs; i++) 2617 for (i = 0; i < chip->ncodecs; i++)
2620 snd_ac97_suspend(chip->ac97[i]); 2618 snd_ac97_suspend(chip->ac97[i]);
2621 if (chip->device_type == DEVICE_INTEL_ICH4) 2619 if (chip->device_type == DEVICE_INTEL_ICH4)
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
index c84629190cba..44eb9e28a1eb 100644
--- a/sound/pci/intel8x0m.c
+++ b/sound/pci/intel8x0m.c
@@ -1025,11 +1025,8 @@ static int intel8x0m_suspend(struct device *dev)
1025{ 1025{
1026 struct snd_card *card = dev_get_drvdata(dev); 1026 struct snd_card *card = dev_get_drvdata(dev);
1027 struct intel8x0m *chip = card->private_data; 1027 struct intel8x0m *chip = card->private_data;
1028 int i;
1029 1028
1030 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1029 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1031 for (i = 0; i < chip->pcm_devs; i++)
1032 snd_pcm_suspend_all(chip->pcm[i]);
1033 snd_ac97_suspend(chip->ac97); 1030 snd_ac97_suspend(chip->ac97);
1034 if (chip->irq >= 0) { 1031 if (chip->irq >= 0) {
1035 free_irq(chip->irq, chip); 1032 free_irq(chip->irq, chip);
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 62962178a9d7..1a9468c14aaf 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2422,7 +2422,6 @@ static int m3_suspend(struct device *dev)
2422 chip->in_suspend = 1; 2422 chip->in_suspend = 1;
2423 cancel_work_sync(&chip->hwvol_work); 2423 cancel_work_sync(&chip->hwvol_work);
2424 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2424 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2425 snd_pcm_suspend_all(chip->pcm);
2426 snd_ac97_suspend(chip->ac97); 2425 snd_ac97_suspend(chip->ac97);
2427 2426
2428 msleep(10); /* give the assp a chance to idle.. */ 2427 msleep(10); /* give the assp a chance to idle.. */
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
index b97f4ea6b56c..85e46ff44ac3 100644
--- a/sound/pci/nm256/nm256.c
+++ b/sound/pci/nm256/nm256.c
@@ -1413,7 +1413,6 @@ static int nm256_suspend(struct device *dev)
1413 struct nm256 *chip = card->private_data; 1413 struct nm256 *chip = card->private_data;
1414 1414
1415 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1415 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1416 snd_pcm_suspend_all(chip->pcm);
1417 snd_ac97_suspend(chip->ac97); 1416 snd_ac97_suspend(chip->ac97);
1418 chip->coeffs_current = 0; 1417 chip->coeffs_current = 0;
1419 return 0; 1418 return 0;
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index 6a743c878415..d4cfff7e49e1 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -744,13 +744,10 @@ static int oxygen_pci_suspend(struct device *dev)
744{ 744{
745 struct snd_card *card = dev_get_drvdata(dev); 745 struct snd_card *card = dev_get_drvdata(dev);
746 struct oxygen *chip = card->private_data; 746 struct oxygen *chip = card->private_data;
747 unsigned int i, saved_interrupt_mask; 747 unsigned int saved_interrupt_mask;
748 748
749 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 749 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
750 750
751 for (i = 0; i < PCM_COUNT; ++i)
752 snd_pcm_suspend(chip->streams[i]);
753
754 if (chip->model.suspend) 751 if (chip->model.suspend)
755 chip->model.suspend(chip); 752 chip->model.suspend(chip);
756 753
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index 23017e3bc76c..1d431c8052d6 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -1158,7 +1158,6 @@ static int riptide_suspend(struct device *dev)
1158 1158
1159 chip->in_suspend = 1; 1159 chip->in_suspend = 1;
1160 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1160 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1161 snd_pcm_suspend_all(chip->pcm);
1162 snd_ac97_suspend(chip->ac97); 1161 snd_ac97_suspend(chip->ac97);
1163 return 0; 1162 return 0;
1164} 1163}
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
index dcfa4d7a73e2..c56702e6cb60 100644
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -2388,8 +2388,6 @@ static int rme96_suspend(struct device *dev)
2388 struct rme96 *rme96 = card->private_data; 2388 struct rme96 *rme96 = card->private_data;
2389 2389
2390 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2390 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2391 snd_pcm_suspend(rme96->playback_substream);
2392 snd_pcm_suspend(rme96->capture_substream);
2393 2391
2394 /* save capture & playback pointers */ 2392 /* save capture & playback pointers */
2395 rme96->playback_pointer = readl(rme96->iobase + RME96_IO_GET_PLAY_POS) 2393 rme96->playback_pointer = readl(rme96->iobase + RME96_IO_GET_PLAY_POS)
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index 964acf302479..6b27980d77a8 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -1214,7 +1214,6 @@ static int sis_suspend(struct device *dev)
1214 int i; 1214 int i;
1215 1215
1216 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1216 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1217 snd_pcm_suspend_all(sis->pcm);
1218 if (sis->codecs_present & SIS_PRIMARY_CODEC_PRESENT) 1217 if (sis->codecs_present & SIS_PRIMARY_CODEC_PRESENT)
1219 snd_ac97_suspend(sis->ac97[0]); 1218 snd_ac97_suspend(sis->ac97[0]);
1220 if (sis->codecs_present & SIS_SECONDARY_CODEC_PRESENT) 1219 if (sis->codecs_present & SIS_SECONDARY_CODEC_PRESENT)
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index 5523e193d556..f271ea436cff 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -3915,10 +3915,6 @@ static int snd_trident_suspend(struct device *dev)
3915 3915
3916 trident->in_suspend = 1; 3916 trident->in_suspend = 1;
3917 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 3917 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
3918 snd_pcm_suspend_all(trident->pcm);
3919 snd_pcm_suspend_all(trident->foldback);
3920 snd_pcm_suspend_all(trident->spdif);
3921
3922 snd_ac97_suspend(trident->ac97); 3918 snd_ac97_suspend(trident->ac97);
3923 snd_ac97_suspend(trident->ac97_sec); 3919 snd_ac97_suspend(trident->ac97_sec);
3924 return 0; 3920 return 0;
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index c488c5afa195..736ac79901b3 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -2278,8 +2278,6 @@ static int snd_via82xx_suspend(struct device *dev)
2278 int i; 2278 int i;
2279 2279
2280 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2280 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2281 for (i = 0; i < 2; i++)
2282 snd_pcm_suspend_all(chip->pcms[i]);
2283 for (i = 0; i < chip->num_devs; i++) 2281 for (i = 0; i < chip->num_devs; i++)
2284 snd_via82xx_channel_reset(chip, &chip->devs[i]); 2282 snd_via82xx_channel_reset(chip, &chip->devs[i]);
2285 synchronize_irq(chip->irq); 2283 synchronize_irq(chip->irq);
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
index b13c8688cc8d..3f59e0279058 100644
--- a/sound/pci/via82xx_modem.c
+++ b/sound/pci/via82xx_modem.c
@@ -1038,8 +1038,6 @@ static int snd_via82xx_suspend(struct device *dev)
1038 int i; 1038 int i;
1039 1039
1040 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1040 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1041 for (i = 0; i < 2; i++)
1042 snd_pcm_suspend_all(chip->pcms[i]);
1043 for (i = 0; i < chip->num_devs; i++) 1041 for (i = 0; i < chip->num_devs; i++)
1044 snd_via82xx_channel_reset(chip, &chip->devs[i]); 1042 snd_via82xx_channel_reset(chip, &chip->devs[i]);
1045 synchronize_irq(chip->irq); 1043 synchronize_irq(chip->irq);
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index a4926fb03991..c688b7f481da 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -2304,10 +2304,6 @@ static int snd_ymfpci_suspend(struct device *dev)
2304 unsigned int i; 2304 unsigned int i;
2305 2305
2306 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2306 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2307 snd_pcm_suspend_all(chip->pcm);
2308 snd_pcm_suspend_all(chip->pcm2);
2309 snd_pcm_suspend_all(chip->pcm_spdif);
2310 snd_pcm_suspend_all(chip->pcm_4ch);
2311 snd_ac97_suspend(chip->ac97); 2307 snd_ac97_suspend(chip->ac97);
2312 for (i = 0; i < YDSXGR_NUM_SAVED_REGS; i++) 2308 for (i = 0; i < YDSXGR_NUM_SAVED_REGS; i++)
2313 chip->saved_regs[i] = snd_ymfpci_readl(chip, saved_regs_index[i]); 2309 chip->saved_regs[i] = snd_ymfpci_readl(chip, saved_regs_index[i]);
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
index d724ab0653cf..eabf29252895 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
@@ -265,7 +265,6 @@ int snd_pdacf_suspend(struct snd_pdacf *chip)
265 u16 val; 265 u16 val;
266 266
267 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot); 267 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
268 snd_pcm_suspend_all(chip->pcm);
269 /* disable interrupts, but use direct write to preserve old register value in chip->regmap */ 268 /* disable interrupts, but use direct write to preserve old register value in chip->regmap */
270 val = inw(chip->port + PDAUDIOCF_REG_IER); 269 val = inw(chip->port + PDAUDIOCF_REG_IER);
271 val &= ~(PDAUDIOCF_IRQOVREN|PDAUDIOCF_IRQAKMEN|PDAUDIOCF_IRQLVLEN0|PDAUDIOCF_IRQLVLEN1); 270 val &= ~(PDAUDIOCF_IRQOVREN|PDAUDIOCF_IRQAKMEN|PDAUDIOCF_IRQLVLEN0|PDAUDIOCF_IRQLVLEN1);
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index d692e4070167..6d420bd3ae17 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -1365,7 +1365,6 @@ void snd_pmac_suspend(struct snd_pmac *chip)
1365 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot); 1365 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
1366 if (chip->suspend) 1366 if (chip->suspend)
1367 chip->suspend(chip); 1367 chip->suspend(chip);
1368 snd_pcm_suspend_all(chip->pcm);
1369 spin_lock_irqsave(&chip->reg_lock, flags); 1368 spin_lock_irqsave(&chip->reg_lock, flags);
1370 snd_pmac_beep_stop(chip); 1369 snd_pmac_beep_stop(chip);
1371 spin_unlock_irqrestore(&chip->reg_lock, flags); 1370 spin_unlock_irqrestore(&chip->reg_lock, flags);
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 03f36e534050..485eec5be608 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -3155,6 +3155,7 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
3155 } 3155 }
3156 3156
3157 pcm->private_free = soc_pcm_private_free; 3157 pcm->private_free = soc_pcm_private_free;
3158 pcm->no_device_suspend = true;
3158out: 3159out:
3159 dev_info(rtd->card->dev, "%s <-> %s mapping ok\n", 3160 dev_info(rtd->card->dev, "%s <-> %s mapping ok\n",
3160 (rtd->num_codecs > 1) ? "multicodec" : rtd->codec_dai->name, 3161 (rtd->num_codecs > 1) ? "multicodec" : rtd->codec_dai->name,
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 746a72e23cf9..719e10034553 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -811,7 +811,6 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message)
811 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot); 811 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
812 if (!chip->num_suspended_intf++) { 812 if (!chip->num_suspended_intf++) {
813 list_for_each_entry(as, &chip->pcm_list, list) { 813 list_for_each_entry(as, &chip->pcm_list, list) {
814 snd_pcm_suspend_all(as->pcm);
815 snd_usb_pcm_suspend(as); 814 snd_usb_pcm_suspend(as);
816 as->substream[0].need_setup_ep = 815 as->substream[0].need_setup_ep =
817 as->substream[1].need_setup_ep = true; 816 as->substream[1].need_setup_ep = true;
diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c
index c1376bfdc90b..7afe8fae4939 100644
--- a/sound/usb/line6/driver.c
+++ b/sound/usb/line6/driver.c
@@ -849,10 +849,8 @@ int line6_suspend(struct usb_interface *interface, pm_message_t message)
849 if (line6->properties->capabilities & LINE6_CAP_CONTROL) 849 if (line6->properties->capabilities & LINE6_CAP_CONTROL)
850 line6_stop_listen(line6); 850 line6_stop_listen(line6);
851 851
852 if (line6pcm != NULL) { 852 if (line6pcm != NULL)
853 snd_pcm_suspend_all(line6pcm->pcm);
854 line6pcm->flags = 0; 853 line6pcm->flags = 0;
855 }
856 854
857 return 0; 855 return 0;
858} 856}
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index 00c92eb854ce..16ca91f57e7f 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1651,18 +1651,6 @@ static int had_create_jack(struct snd_intelhad *ctx,
1651static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev) 1651static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
1652{ 1652{
1653 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); 1653 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1654 int port;
1655
1656 for_each_port(card_ctx, port) {
1657 struct snd_intelhad *ctx = &card_ctx->pcm_ctx[port];
1658 struct snd_pcm_substream *substream;
1659
1660 substream = had_substream_get(ctx);
1661 if (substream) {
1662 snd_pcm_suspend(substream);
1663 had_substream_put(ctx);
1664 }
1665 }
1666 1654
1667 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot); 1655 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
1668 1656