aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/sb.h2
-rw-r--r--sound/isa/als100.c2
-rw-r--r--sound/isa/sb/sb16.c2
-rw-r--r--sound/isa/sb/sb16_main.c8
-rw-r--r--sound/pci/cs5530.c2
5 files changed, 6 insertions, 10 deletions
diff --git a/include/sound/sb.h b/include/sound/sb.h
index 13438ff3e5a4..33e2d11deedb 100644
--- a/include/sound/sb.h
+++ b/include/sound/sb.h
@@ -320,7 +320,7 @@ irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip);
320int snd_sb8dsp_midi(struct snd_sb *chip, int device); 320int snd_sb8dsp_midi(struct snd_sb *chip, int device);
321 321
322/* sb16_init.c */ 322/* sb16_init.c */
323int snd_sb16dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm); 323int snd_sb16dsp_pcm(struct snd_sb *chip, int device);
324const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction); 324const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction);
325int snd_sb16dsp_configure(struct snd_sb *chip); 325int snd_sb16dsp_configure(struct snd_sb *chip);
326/* sb16.c */ 326/* sb16.c */
diff --git a/sound/isa/als100.c b/sound/isa/als100.c
index 32d01525211d..bc9ea306ee02 100644
--- a/sound/isa/als100.c
+++ b/sound/isa/als100.c
@@ -233,7 +233,7 @@ static int snd_card_als100_probe(int dev,
233 irq[dev], dma8[dev], dma16[dev]); 233 irq[dev], dma8[dev], dma16[dev]);
234 } 234 }
235 235
236 if ((error = snd_sb16dsp_pcm(chip, 0, &chip->pcm)) < 0) { 236 if ((error = snd_sb16dsp_pcm(chip, 0)) < 0) {
237 snd_card_free(card); 237 snd_card_free(card);
238 return error; 238 return error;
239 } 239 }
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 3f694543a7ea..4a7d7c89808f 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -374,7 +374,7 @@ static int snd_sb16_probe(struct snd_card *card, int dev)
374 if (! is_isapnp_selected(dev) && (err = snd_sb16dsp_configure(chip)) < 0) 374 if (! is_isapnp_selected(dev) && (err = snd_sb16dsp_configure(chip)) < 0)
375 return err; 375 return err;
376 376
377 if ((err = snd_sb16dsp_pcm(chip, 0, &chip->pcm)) < 0) 377 if ((err = snd_sb16dsp_pcm(chip, 0)) < 0)
378 return err; 378 return err;
379 379
380 strcpy(card->driver, 380 strcpy(card->driver,
diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
index 72b10f4f3e70..63d11b7b9fe8 100644
--- a/sound/isa/sb/sb16_main.c
+++ b/sound/isa/sb/sb16_main.c
@@ -860,19 +860,18 @@ static struct snd_pcm_ops snd_sb16_capture_ops = {
860 .pointer = snd_sb16_capture_pointer, 860 .pointer = snd_sb16_capture_pointer,
861}; 861};
862 862
863int snd_sb16dsp_pcm(struct snd_sb * chip, int device, struct snd_pcm ** rpcm) 863int snd_sb16dsp_pcm(struct snd_sb *chip, int device)
864{ 864{
865 struct snd_card *card = chip->card; 865 struct snd_card *card = chip->card;
866 struct snd_pcm *pcm; 866 struct snd_pcm *pcm;
867 int err; 867 int err;
868 868
869 if (rpcm)
870 *rpcm = NULL;
871 if ((err = snd_pcm_new(card, "SB16 DSP", device, 1, 1, &pcm)) < 0) 869 if ((err = snd_pcm_new(card, "SB16 DSP", device, 1, 1, &pcm)) < 0)
872 return err; 870 return err;
873 sprintf(pcm->name, "DSP v%i.%i", chip->version >> 8, chip->version & 0xff); 871 sprintf(pcm->name, "DSP v%i.%i", chip->version >> 8, chip->version & 0xff);
874 pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; 872 pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX;
875 pcm->private_data = chip; 873 pcm->private_data = chip;
874 chip->pcm = pcm;
876 875
877 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sb16_playback_ops); 876 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sb16_playback_ops);
878 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sb16_capture_ops); 877 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sb16_capture_ops);
@@ -885,9 +884,6 @@ int snd_sb16dsp_pcm(struct snd_sb * chip, int device, struct snd_pcm ** rpcm)
885 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 884 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
886 snd_dma_isa_data(), 885 snd_dma_isa_data(),
887 64*1024, 128*1024); 886 64*1024, 128*1024);
888
889 if (rpcm)
890 *rpcm = pcm;
891 return 0; 887 return 0;
892} 888}
893 889
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c
index b1025507a467..0a8cf94c4858 100644
--- a/sound/pci/cs5530.c
+++ b/sound/pci/cs5530.c
@@ -223,7 +223,7 @@ static int snd_cs5530_create(struct snd_card *card,
223 return err; 223 return err;
224 } 224 }
225 225
226 err = snd_sb16dsp_pcm(chip->sb, 0, &chip->sb->pcm); 226 err = snd_sb16dsp_pcm(chip->sb, 0);
227 if (err < 0) { 227 if (err < 0) {
228 dev_err(card->dev, "Could not create PCM\n"); 228 dev_err(card->dev, "Could not create PCM\n");
229 snd_cs5530_free(chip); 229 snd_cs5530_free(chip);