aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emu10k1x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/emu10k1x.c')
-rw-r--r--sound/pci/emu10k1/emu10k1x.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 15933f92f63a..6d1b98d14327 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -847,15 +847,13 @@ static const struct snd_pcm_chmap_elem clfe_map[] = {
847 { } 847 { }
848}; 848};
849 849
850static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device, struct snd_pcm **rpcm) 850static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device)
851{ 851{
852 struct snd_pcm *pcm; 852 struct snd_pcm *pcm;
853 const struct snd_pcm_chmap_elem *map = NULL; 853 const struct snd_pcm_chmap_elem *map = NULL;
854 int err; 854 int err;
855 int capture = 0; 855 int capture = 0;
856 856
857 if (rpcm)
858 *rpcm = NULL;
859 if (device == 0) 857 if (device == 0)
860 capture = 1; 858 capture = 1;
861 859
@@ -896,15 +894,8 @@ static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device, struct snd_pcm **r
896 snd_dma_pci_data(emu->pci), 894 snd_dma_pci_data(emu->pci),
897 32*1024, 32*1024); 895 32*1024, 32*1024);
898 896
899 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, map, 2, 897 return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, map, 2,
900 1 << 2, NULL); 898 1 << 2, NULL);
901 if (err < 0)
902 return err;
903
904 if (rpcm)
905 *rpcm = pcm;
906
907 return 0;
908} 899}
909 900
910static int snd_emu10k1x_create(struct snd_card *card, 901static int snd_emu10k1x_create(struct snd_card *card,
@@ -1583,15 +1574,15 @@ static int snd_emu10k1x_probe(struct pci_dev *pci,
1583 return err; 1574 return err;
1584 } 1575 }
1585 1576
1586 if ((err = snd_emu10k1x_pcm(chip, 0, NULL)) < 0) { 1577 if ((err = snd_emu10k1x_pcm(chip, 0)) < 0) {
1587 snd_card_free(card); 1578 snd_card_free(card);
1588 return err; 1579 return err;
1589 } 1580 }
1590 if ((err = snd_emu10k1x_pcm(chip, 1, NULL)) < 0) { 1581 if ((err = snd_emu10k1x_pcm(chip, 1)) < 0) {
1591 snd_card_free(card); 1582 snd_card_free(card);
1592 return err; 1583 return err;
1593 } 1584 }
1594 if ((err = snd_emu10k1x_pcm(chip, 2, NULL)) < 0) { 1585 if ((err = snd_emu10k1x_pcm(chip, 2)) < 0) {
1595 snd_card_free(card); 1586 snd_card_free(card);
1596 return err; 1587 return err;
1597 } 1588 }