Changeset 703 for GPL/trunk/alsa-kernel/pci/als4000.c
- Timestamp:
- Sep 26, 2021, 6:18:40 PM (4 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-next merged: 696-702
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/pci/als4000.c
r695 r703 836 836 837 837 /* enable PCI device */ 838 if ((err = pci_enable_device(pci)) < 0) { 838 err = pci_enable_device(pci); 839 if (err < 0) 839 840 return err; 840 } 841 841 842 /* check, if we can restrict PCI DMA transfers to 24 bits */ 842 843 if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(24))) { … … 846 847 } 847 848 848 if ((err = pci_request_regions(pci, "ALS4000")) < 0) { 849 err = pci_request_regions(pci, "ALS4000"); 850 if (err < 0) { 849 851 pci_disable_device(pci); 850 852 return err; … … 873 875 snd_als4000_set_addr(acard->iobase, 0, 0, 0, 0); 874 876 875 if ((err = snd_sbdsp_create(card,876 877 877 err = snd_sbdsp_create(card, 878 iobase + ALS4K_IOB_10_ADLIB_ADDR0, 879 pci->irq, 878 880 /* internally registered as IRQF_SHARED in case of ALS4000 SB */ 879 snd_als4000_interrupt, 880 -1, 881 -1, 882 SB_HW_ALS4000, 883 &chip)) < 0) { 881 snd_als4000_interrupt, 882 -1, 883 -1, 884 SB_HW_ALS4000, 885 &chip); 886 if (err < 0) 884 887 goto out_err; 885 }886 888 acard->chip = chip; 887 889 … … 896 898 card->shortname, chip->alt_port, chip->irq); 897 899 898 if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_ALS4000, 899 iobase + ALS4K_IOB_30_MIDI_DATA, 900 MPU401_INFO_INTEGRATED | 901 MPU401_INFO_IRQ_HOOK, 902 -1, &chip->rmidi)) < 0) { 900 err = snd_mpu401_uart_new(card, 0, MPU401_HW_ALS4000, 901 iobase + ALS4K_IOB_30_MIDI_DATA, 902 MPU401_INFO_INTEGRATED | 903 MPU401_INFO_IRQ_HOOK, 904 -1, &chip->rmidi); 905 if (err < 0) { 903 906 dev_err(&pci->dev, "no MPU-401 device at 0x%lx?\n", 904 907 iobase + ALS4K_IOB_30_MIDI_DATA); … … 911 914 * SPECS_PAGE: 21 */ 912 915 913 if ((err = snd_als4000_pcm(chip, 0)) < 0) { 916 err = snd_als4000_pcm(chip, 0); 917 if (err < 0) 914 918 goto out_err; 915 } 916 if ((err = snd_sbmixer_new(chip)) < 0) { 919 920 err = snd_sbmixer_new(chip); 921 if (err < 0) 917 922 goto out_err; 918 }919 923 920 924 if (snd_opl3_create(card, … … 926 930 iobase + ALS4K_IOB_12_ADLIB_ADDR2); 927 931 } else { 928 if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) { 932 err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); 933 if (err < 0) 929 934 goto out_err; 930 }931 935 } 932 936 933 937 snd_als4000_create_gameport(acard, dev); 934 938 935 if ((err = snd_card_register(card)) < 0) { 939 err = snd_card_register(card); 940 if (err < 0) 936 941 goto out_err; 937 } 942 938 943 pci_set_drvdata(pci, card); 939 944 dev++;
Note:
See TracChangeset
for help on using the changeset viewer.