aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2007-08-13 11:37:55 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:58:52 -0400
commitb83f346bc4d6ab358fd0da85b7eab08bf0234c0b (patch)
tree4e4d033bcba71b343e96e1063d6b5f8f88175f7a /sound
parentf9ff161a14baca1a4ead5f12377ab25b9dd332e1 (diff)
[ALSA] remove incorrect usage of SNDRV_PCM_INFO_SYNC_START and snd_pcm_set_sync()
Set the SNDRV_PCM_INFO_SYNC_START flag and the substream's sync ID (only) if the substream actually can be linked to another one. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/isa/ad1816a/ad1816a_lib.c2
-rw-r--r--sound/pci/ca0106/ca0106_main.c10
-rw-r--r--sound/pci/cs4281.c24
-rw-r--r--sound/pci/cs5535audio/cs5535audio_pcm.c6
-rw-r--r--sound/pci/emu10k1/p16v.c16
-rw-r--r--sound/pci/korg1212/korg1212.c4
-rw-r--r--sound/pci/maestro3.c2
-rw-r--r--sound/pci/mixart/mixart.c4
-rw-r--r--sound/pci/nm256/nm256.c1
-rw-r--r--sound/pci/pcxhr/pcxhr.c2
-rw-r--r--sound/pci/rme96.c8
-rw-r--r--sound/ppc/pmac.c3
12 files changed, 32 insertions, 50 deletions
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index ec9209cd5177..cf18fe4617a1 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -453,7 +453,6 @@ static int snd_ad1816a_playback_open(struct snd_pcm_substream *substream)
453 453
454 if ((error = snd_ad1816a_open(chip, AD1816A_MODE_PLAYBACK)) < 0) 454 if ((error = snd_ad1816a_open(chip, AD1816A_MODE_PLAYBACK)) < 0)
455 return error; 455 return error;
456 snd_pcm_set_sync(substream);
457 runtime->hw = snd_ad1816a_playback; 456 runtime->hw = snd_ad1816a_playback;
458 snd_pcm_limit_isa_dma_size(chip->dma1, &runtime->hw.buffer_bytes_max); 457 snd_pcm_limit_isa_dma_size(chip->dma1, &runtime->hw.buffer_bytes_max);
459 snd_pcm_limit_isa_dma_size(chip->dma1, &runtime->hw.period_bytes_max); 458 snd_pcm_limit_isa_dma_size(chip->dma1, &runtime->hw.period_bytes_max);
@@ -469,7 +468,6 @@ static int snd_ad1816a_capture_open(struct snd_pcm_substream *substream)
469 468
470 if ((error = snd_ad1816a_open(chip, AD1816A_MODE_CAPTURE)) < 0) 469 if ((error = snd_ad1816a_open(chip, AD1816A_MODE_CAPTURE)) < 0)
471 return error; 470 return error;
472 snd_pcm_set_sync(substream);
473 runtime->hw = snd_ad1816a_capture; 471 runtime->hw = snd_ad1816a_capture;
474 snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.buffer_bytes_max); 472 snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.buffer_bytes_max);
475 snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.period_bytes_max); 473 snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.period_bytes_max);
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index c7f79be98d04..31d8db9f7a4c 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -274,10 +274,11 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
274 274
275/* hardware definition */ 275/* hardware definition */
276static struct snd_pcm_hardware snd_ca0106_playback_hw = { 276static struct snd_pcm_hardware snd_ca0106_playback_hw = {
277 .info = (SNDRV_PCM_INFO_MMAP | 277 .info = SNDRV_PCM_INFO_MMAP |
278 SNDRV_PCM_INFO_INTERLEAVED | 278 SNDRV_PCM_INFO_INTERLEAVED |
279 SNDRV_PCM_INFO_BLOCK_TRANSFER | 279 SNDRV_PCM_INFO_BLOCK_TRANSFER |
280 SNDRV_PCM_INFO_MMAP_VALID), 280 SNDRV_PCM_INFO_MMAP_VALID |
281 SNDRV_PCM_INFO_SYNC_START,
281 .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, 282 .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
282 .rates = (SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | 283 .rates = (SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 |
283 SNDRV_PCM_RATE_192000), 284 SNDRV_PCM_RATE_192000),
@@ -507,6 +508,7 @@ static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substr
507 return err; 508 return err;
508 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0) 509 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
509 return err; 510 return err;
511 snd_pcm_set_sync(substream);
510 512
511 if (chip->details->spi_dac && channel_id != PCM_FRONT_CHANNEL) { 513 if (chip->details->spi_dac && channel_id != PCM_FRONT_CHANNEL) {
512 const int reg = spi_dacd_reg[channel_id]; 514 const int reg = spi_dacd_reg[channel_id];
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index 44cf54607647..1fca49a1641a 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -842,12 +842,11 @@ static snd_pcm_uframes_t snd_cs4281_pointer(struct snd_pcm_substream *substream)
842 842
843static struct snd_pcm_hardware snd_cs4281_playback = 843static struct snd_pcm_hardware snd_cs4281_playback =
844{ 844{
845 .info = (SNDRV_PCM_INFO_MMAP | 845 .info = SNDRV_PCM_INFO_MMAP |
846 SNDRV_PCM_INFO_INTERLEAVED | 846 SNDRV_PCM_INFO_INTERLEAVED |
847 SNDRV_PCM_INFO_MMAP_VALID | 847 SNDRV_PCM_INFO_MMAP_VALID |
848 SNDRV_PCM_INFO_PAUSE | 848 SNDRV_PCM_INFO_PAUSE |
849 SNDRV_PCM_INFO_RESUME | 849 SNDRV_PCM_INFO_RESUME,
850 SNDRV_PCM_INFO_SYNC_START),
851 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | 850 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |
852 SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE | 851 SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE |
853 SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE | 852 SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE |
@@ -868,12 +867,11 @@ static struct snd_pcm_hardware snd_cs4281_playback =
868 867
869static struct snd_pcm_hardware snd_cs4281_capture = 868static struct snd_pcm_hardware snd_cs4281_capture =
870{ 869{
871 .info = (SNDRV_PCM_INFO_MMAP | 870 .info = SNDRV_PCM_INFO_MMAP |
872 SNDRV_PCM_INFO_INTERLEAVED | 871 SNDRV_PCM_INFO_INTERLEAVED |
873 SNDRV_PCM_INFO_MMAP_VALID | 872 SNDRV_PCM_INFO_MMAP_VALID |
874 SNDRV_PCM_INFO_PAUSE | 873 SNDRV_PCM_INFO_PAUSE |
875 SNDRV_PCM_INFO_RESUME | 874 SNDRV_PCM_INFO_RESUME,
876 SNDRV_PCM_INFO_SYNC_START),
877 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | 875 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |
878 SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE | 876 SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE |
879 SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE | 877 SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE |
@@ -904,7 +902,6 @@ static int snd_cs4281_playback_open(struct snd_pcm_substream *substream)
904 dma->right_slot = 1; 902 dma->right_slot = 1;
905 runtime->private_data = dma; 903 runtime->private_data = dma;
906 runtime->hw = snd_cs4281_playback; 904 runtime->hw = snd_cs4281_playback;
907 snd_pcm_set_sync(substream);
908 /* should be detected from the AC'97 layer, but it seems 905 /* should be detected from the AC'97 layer, but it seems
909 that although CS4297A rev B reports 18-bit ADC resolution, 906 that although CS4297A rev B reports 18-bit ADC resolution,
910 samples are 20-bit */ 907 samples are 20-bit */
@@ -924,7 +921,6 @@ static int snd_cs4281_capture_open(struct snd_pcm_substream *substream)
924 dma->right_slot = 11; 921 dma->right_slot = 11;
925 runtime->private_data = dma; 922 runtime->private_data = dma;
926 runtime->hw = snd_cs4281_capture; 923 runtime->hw = snd_cs4281_capture;
927 snd_pcm_set_sync(substream);
928 /* should be detected from the AC'97 layer, but it seems 924 /* should be detected from the AC'97 layer, but it seems
929 that although CS4297A rev B reports 18-bit ADC resolution, 925 that although CS4297A rev B reports 18-bit ADC resolution,
930 samples are 20-bit */ 926 samples are 20-bit */
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c
index 5450a9e8f133..ec920cbb2a71 100644
--- a/sound/pci/cs5535audio/cs5535audio_pcm.c
+++ b/sound/pci/cs5535audio/cs5535audio_pcm.c
@@ -43,7 +43,6 @@ static struct snd_pcm_hardware snd_cs5535audio_playback =
43 SNDRV_PCM_INFO_BLOCK_TRANSFER | 43 SNDRV_PCM_INFO_BLOCK_TRANSFER |
44 SNDRV_PCM_INFO_MMAP_VALID | 44 SNDRV_PCM_INFO_MMAP_VALID |
45 SNDRV_PCM_INFO_PAUSE | 45 SNDRV_PCM_INFO_PAUSE |
46 SNDRV_PCM_INFO_SYNC_START |
47 SNDRV_PCM_INFO_RESUME 46 SNDRV_PCM_INFO_RESUME
48 ), 47 ),
49 .formats = ( 48 .formats = (
@@ -71,8 +70,7 @@ static struct snd_pcm_hardware snd_cs5535audio_capture =
71 SNDRV_PCM_INFO_MMAP | 70 SNDRV_PCM_INFO_MMAP |
72 SNDRV_PCM_INFO_INTERLEAVED | 71 SNDRV_PCM_INFO_INTERLEAVED |
73 SNDRV_PCM_INFO_BLOCK_TRANSFER | 72 SNDRV_PCM_INFO_BLOCK_TRANSFER |
74 SNDRV_PCM_INFO_MMAP_VALID | 73 SNDRV_PCM_INFO_MMAP_VALID
75 SNDRV_PCM_INFO_SYNC_START
76 ), 74 ),
77 .formats = ( 75 .formats = (
78 SNDRV_PCM_FMTBIT_S16_LE 76 SNDRV_PCM_FMTBIT_S16_LE
@@ -102,7 +100,6 @@ static int snd_cs5535audio_playback_open(struct snd_pcm_substream *substream)
102 runtime->hw = snd_cs5535audio_playback; 100 runtime->hw = snd_cs5535audio_playback;
103 cs5535au->playback_substream = substream; 101 cs5535au->playback_substream = substream;
104 runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_PLAYBACK]); 102 runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_PLAYBACK]);
105 snd_pcm_set_sync(substream);
106 if ((err = snd_pcm_hw_constraint_integer(runtime, 103 if ((err = snd_pcm_hw_constraint_integer(runtime,
107 SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 104 SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
108 return err; 105 return err;
@@ -348,7 +345,6 @@ static int snd_cs5535audio_capture_open(struct snd_pcm_substream *substream)
348 runtime->hw = snd_cs5535audio_capture; 345 runtime->hw = snd_cs5535audio_capture;
349 cs5535au->capture_substream = substream; 346 cs5535au->capture_substream = substream;
350 runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_CAPTURE]); 347 runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_CAPTURE]);
351 snd_pcm_set_sync(substream);
352 if ((err = snd_pcm_hw_constraint_integer(runtime, 348 if ((err = snd_pcm_hw_constraint_integer(runtime,
353 SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 349 SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
354 return err; 350 return err;
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index 6ace1076c19b..d619a3842cdd 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -124,11 +124,12 @@
124 124
125 /* hardware definition */ 125 /* hardware definition */
126static struct snd_pcm_hardware snd_p16v_playback_hw = { 126static struct snd_pcm_hardware snd_p16v_playback_hw = {
127 .info = (SNDRV_PCM_INFO_MMAP | 127 .info = SNDRV_PCM_INFO_MMAP |
128 SNDRV_PCM_INFO_INTERLEAVED | 128 SNDRV_PCM_INFO_INTERLEAVED |
129 SNDRV_PCM_INFO_BLOCK_TRANSFER | 129 SNDRV_PCM_INFO_BLOCK_TRANSFER |
130 SNDRV_PCM_INFO_RESUME | 130 SNDRV_PCM_INFO_RESUME |
131 SNDRV_PCM_INFO_MMAP_VALID), 131 SNDRV_PCM_INFO_MMAP_VALID |
132 SNDRV_PCM_INFO_SYNC_START,
132 .formats = SNDRV_PCM_FMTBIT_S32_LE, /* Only supports 24-bit samples padded to 32 bits. */ 133 .formats = SNDRV_PCM_FMTBIT_S32_LE, /* Only supports 24-bit samples padded to 32 bits. */
133 .rates = SNDRV_PCM_RATE_192000 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100, 134 .rates = SNDRV_PCM_RATE_192000 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100,
134 .rate_min = 44100, 135 .rate_min = 44100,
@@ -207,6 +208,11 @@ static int snd_p16v_pcm_open_playback_channel(struct snd_pcm_substream *substrea
207 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 208 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
208 return err; 209 return err;
209 210
211 runtime->sync.id32[0] = substream->pcm->card->number;
212 runtime->sync.id32[1] = 'P';
213 runtime->sync.id32[2] = 16;
214 runtime->sync.id32[3] = 'V';
215
210 return 0; 216 return 0;
211} 217}
212/* open_capture callback */ 218/* open_capture callback */
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
index 5338243fb035..c4af57fb5af1 100644
--- a/sound/pci/korg1212/korg1212.c
+++ b/sound/pci/korg1212/korg1212.c
@@ -1391,8 +1391,6 @@ static int snd_korg1212_playback_open(struct snd_pcm_substream *substream)
1391 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_open [%s]\n", 1391 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_open [%s]\n",
1392 stateName[korg1212->cardState]); 1392 stateName[korg1212->cardState]);
1393 1393
1394 snd_pcm_set_sync(substream); // ???
1395
1396 snd_korg1212_OpenCard(korg1212); 1394 snd_korg1212_OpenCard(korg1212);
1397 1395
1398 runtime->hw = snd_korg1212_playback_info; 1396 runtime->hw = snd_korg1212_playback_info;
@@ -1422,8 +1420,6 @@ static int snd_korg1212_capture_open(struct snd_pcm_substream *substream)
1422 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_open [%s]\n", 1420 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_open [%s]\n",
1423 stateName[korg1212->cardState]); 1421 stateName[korg1212->cardState]);
1424 1422
1425 snd_pcm_set_sync(substream);
1426
1427 snd_korg1212_OpenCard(korg1212); 1423 snd_korg1212_OpenCard(korg1212);
1428 1424
1429 runtime->hw = snd_korg1212_capture_info; 1425 runtime->hw = snd_korg1212_capture_info;
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 8a5ff1cb5362..32245770595e 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -1821,7 +1821,6 @@ snd_m3_playback_open(struct snd_pcm_substream *subs)
1821 return err; 1821 return err;
1822 1822
1823 runtime->hw = snd_m3_playback; 1823 runtime->hw = snd_m3_playback;
1824 snd_pcm_set_sync(subs);
1825 1824
1826 return 0; 1825 return 0;
1827} 1826}
@@ -1846,7 +1845,6 @@ snd_m3_capture_open(struct snd_pcm_substream *subs)
1846 return err; 1845 return err;
1847 1846
1848 runtime->hw = snd_m3_capture; 1847 runtime->hw = snd_m3_capture;
1849 snd_pcm_set_sync(subs);
1850 1848
1851 return 0; 1849 return 0;
1852} 1850}
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index c5109547f43f..880b824e24cd 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -652,7 +652,7 @@ static int snd_mixart_hw_free(struct snd_pcm_substream *subs)
652static struct snd_pcm_hardware snd_mixart_analog_caps = 652static struct snd_pcm_hardware snd_mixart_analog_caps =
653{ 653{
654 .info = ( SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 654 .info = ( SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
655 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_SYNC_START | 655 SNDRV_PCM_INFO_MMAP_VALID |
656 SNDRV_PCM_INFO_PAUSE), 656 SNDRV_PCM_INFO_PAUSE),
657 .formats = ( SNDRV_PCM_FMTBIT_U8 | 657 .formats = ( SNDRV_PCM_FMTBIT_U8 |
658 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | 658 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
@@ -673,7 +673,7 @@ static struct snd_pcm_hardware snd_mixart_analog_caps =
673static struct snd_pcm_hardware snd_mixart_digital_caps = 673static struct snd_pcm_hardware snd_mixart_digital_caps =
674{ 674{
675 .info = ( SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 675 .info = ( SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
676 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_SYNC_START | 676 SNDRV_PCM_INFO_MMAP_VALID |
677 SNDRV_PCM_INFO_PAUSE), 677 SNDRV_PCM_INFO_PAUSE),
678 .formats = ( SNDRV_PCM_FMTBIT_U8 | 678 .formats = ( SNDRV_PCM_FMTBIT_U8 |
679 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | 679 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
index c7621bd770a6..276c5763f0e5 100644
--- a/sound/pci/nm256/nm256.c
+++ b/sound/pci/nm256/nm256.c
@@ -842,7 +842,6 @@ static void snd_nm256_setup_stream(struct nm256 *chip, struct nm256_stream *s,
842 runtime->private_data = s; 842 runtime->private_data = s;
843 s->substream = substream; 843 s->substream = substream;
844 844
845 snd_pcm_set_sync(substream);
846 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 845 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
847 &constraints_rates); 846 &constraints_rates);
848} 847}
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index 1b787f455576..cd4613a97bd7 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -904,6 +904,8 @@ static int pcxhr_open(struct snd_pcm_substream *subs)
904 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 4); 904 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 4);
905 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 4); 905 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 4);
906 906
907 snd_pcm_set_sync(subs);
908
907 mgr->ref_count_rate++; 909 mgr->ref_count_rate++;
908 910
909 mutex_unlock(&mgr->setup_mutex); 911 mutex_unlock(&mgr->setup_mutex);
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
index 9a4596f879e8..ba4a34bae48f 100644
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -1176,8 +1176,6 @@ snd_rme96_playback_spdif_open(struct snd_pcm_substream *substream)
1176 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 1176 struct rme96 *rme96 = snd_pcm_substream_chip(substream);
1177 struct snd_pcm_runtime *runtime = substream->runtime; 1177 struct snd_pcm_runtime *runtime = substream->runtime;
1178 1178
1179 snd_pcm_set_sync(substream);
1180
1181 spin_lock_irq(&rme96->lock); 1179 spin_lock_irq(&rme96->lock);
1182 if (rme96->playback_substream != NULL) { 1180 if (rme96->playback_substream != NULL) {
1183 spin_unlock_irq(&rme96->lock); 1181 spin_unlock_irq(&rme96->lock);
@@ -1214,8 +1212,6 @@ snd_rme96_capture_spdif_open(struct snd_pcm_substream *substream)
1214 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 1212 struct rme96 *rme96 = snd_pcm_substream_chip(substream);
1215 struct snd_pcm_runtime *runtime = substream->runtime; 1213 struct snd_pcm_runtime *runtime = substream->runtime;
1216 1214
1217 snd_pcm_set_sync(substream);
1218
1219 runtime->hw = snd_rme96_capture_spdif_info; 1215 runtime->hw = snd_rme96_capture_spdif_info;
1220 if (snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG && 1216 if (snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG &&
1221 (rate = snd_rme96_capture_getrate(rme96, &isadat)) > 0) 1217 (rate = snd_rme96_capture_getrate(rme96, &isadat)) > 0)
@@ -1247,8 +1243,6 @@ snd_rme96_playback_adat_open(struct snd_pcm_substream *substream)
1247 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 1243 struct rme96 *rme96 = snd_pcm_substream_chip(substream);
1248 struct snd_pcm_runtime *runtime = substream->runtime; 1244 struct snd_pcm_runtime *runtime = substream->runtime;
1249 1245
1250 snd_pcm_set_sync(substream);
1251
1252 spin_lock_irq(&rme96->lock); 1246 spin_lock_irq(&rme96->lock);
1253 if (rme96->playback_substream != NULL) { 1247 if (rme96->playback_substream != NULL) {
1254 spin_unlock_irq(&rme96->lock); 1248 spin_unlock_irq(&rme96->lock);
@@ -1280,8 +1274,6 @@ snd_rme96_capture_adat_open(struct snd_pcm_substream *substream)
1280 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 1274 struct rme96 *rme96 = snd_pcm_substream_chip(substream);
1281 struct snd_pcm_runtime *runtime = substream->runtime; 1275 struct snd_pcm_runtime *runtime = substream->runtime;
1282 1276
1283 snd_pcm_set_sync(substream);
1284
1285 runtime->hw = snd_rme96_capture_adat_info; 1277 runtime->hw = snd_rme96_capture_adat_info;
1286 if (snd_rme96_getinputtype(rme96) == RME96_INPUT_ANALOG) { 1278 if (snd_rme96_getinputtype(rme96) == RME96_INPUT_ANALOG) {
1287 /* makes no sense to use analog input. Note that analog 1279 /* makes no sense to use analog input. Note that analog
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index adbc86855b09..04b95ae5c3aa 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -551,9 +551,6 @@ static int snd_pmac_pcm_open(struct snd_pmac *chip, struct pmac_stream *rec,
551 551
552 runtime->hw.periods_max = rec->cmd.size - 1; 552 runtime->hw.periods_max = rec->cmd.size - 1;
553 553
554 if (chip->can_duplex)
555 snd_pcm_set_sync(subs);
556
557 /* constraints to fix choppy sound */ 554 /* constraints to fix choppy sound */
558 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); 555 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
559 return 0; 556 return 0;