[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howtos:hardware:soundblaster-live-5.1 [2014/03/19 07:16 (UTC)] – [Diagnostic and information gathering] wisedracohowtos:hardware:soundblaster-live-5.1 [2014/03/19 12:06 (UTC)] – [Problems with SoundFonts] wisedraco
Line 80: Line 80:
 e: john AT sten.lv. e: john AT sten.lv.
  
 +===== Play files from CLI =====
 +
 +For playing MIDI (.mid) files under Command Line Interface, you can use a **aplaymidi** command from slackware, or download and install pmidi from http://slackbuilds.org .
 +The both programms is very similar in use and syntax.
 +To play MIDI via aplaymidi:
 +
 +do
 +<code bash>
 +
 +aplaymidi -l
 +
 +</code>
 +
 +you get something like this:
 +
 +<code bash>
 +
 + aplaymidi -l
 + Port    Client name                      Port name
 + 14:   Midi Through                     Midi Through Port-0
 + 16:   SB Audigy 2 Value [Unknown]      Audigy MPU-401 (UART)
 + 16:32   SB Audigy 2 Value [Unknown]      Audigy MPU-401 #2
 + 17:   Emu10k1 WaveTable                Emu10k1 Port 0
 + 17:   Emu10k1 WaveTable                Emu10k1 Port 1
 + 17:   Emu10k1 WaveTable                Emu10k1 Port 2
 + 17:   Emu10k1 WaveTable                Emu10k1 Port 3
 +
 +
 +</code>
 +
 +now you must define hw wavetable port for programm and midi file to play:
 +
 +<code bash>
 + aplaymidi -p 17:0 BBEE.MID
 +
 +</code>
 +
 +
 +To play another types of files ( .wav .flac .mp3 and so on) you can use "play" command.
 +in default it use default sound card for output. 
 +<code bash>
 + 
 +play loona.mp3
 +
 +loona.mp3:
 +
 + File Size: 3.44M     Bit Rate: 112k
 +  Encoding: MPEG audio    
 +  Channels: 2 @ 16-bit   
 +Samplerate: 44100Hz      
 +Replaygain: off         Artist: Loona
 +  Duration: 00:04:05.48  Title: Hijo de la La Luna
 +
 +</code>
 +
 +You also can use mixer for change volume: 
 +<code bash>
 +alsamixer
 +
 +</code>
  
 ===== TroubleShooting ===== ===== TroubleShooting =====
Line 86: Line 146:
  
 For first  -try gathering some useful information about your situation: For first  -try gathering some useful information about your situation:
 +
 +<code bash>
 + lspci
 +</code>
 +
 +Gives you info about hardware devices sits on PCI and PCIe bus of your computer
 +
 + <code bash>
 + cat /proc/asound/cards
 +</code>
 +
 +gives you information about cards found your sound system and its numerating. 0 card is be default card.
 +
 +
 +there is also some another useful commands:
 +
 +<code bash>
 + aplay -l
 +</code>
 + and 
 +
 +<code bash>
 + aplay -L
 +</code>
 +
 +and even 
 +
 +<code bash>
 + lsmod
 +</code>
  
  
Line 92: Line 182:
 ==== Make a right soundcard as first (default) ==== ==== Make a right soundcard as first (default) ====
  
 +Firstly, make a file called sound.conf under /etc/modprobe.d/  :
  
 +<code bash>
 +##alias char-major-116 snd
 +options snd cards_limit=2 slots=snd-emu10k1,snd-hda-intel
 +# LHB6.mOmgEN0gox0:SBLive! 5.1 Digital Model SB0220
 +alias snd-card-0 snd-emu10k1
 +alias sound-slot-0 snd-emu10k1
 +# W60f.x8s5HMdIibD:82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller
 +alias snd-card-1 snd-hda-intel
 +alias sound-slot-1 snd-hda-intel
 +
 +##options snd-emu10k1 enable=1 index=0 max_buffer_size=756
 +options snd-emu10k1 enable=1 index=0 max_buffer_size=1750
 +
 +options snd-hda-intel enable=1 index=1
 +
 +</code>
  
  
Line 98: Line 205:
  
 SB Live! And Audigy Rx use similar DSP - emu10k based, and looks like have similar problems. SB Live! And Audigy Rx use similar DSP - emu10k based, and looks like have similar problems.
 +
 As i read, problem root is in that fact, a DSP use 31 bit in memory address instead of 32 bits - and it causes problem on linux x64 systems with more than 2 (3?) Gb RAM. As i read, problem root is in that fact, a DSP use 31 bit in memory address instead of 32 bits - and it causes problem on linux x64 systems with more than 2 (3?) Gb RAM.
 +
 I encounter that with 4 Gb RAM on Slackware64 14.1 - the symptoms is that, you cannot load soundfont larger than 16 Mb - asfxload on trying that writes: I encounter that with 4 Gb RAM on Slackware64 14.1 - the symptoms is that, you cannot load soundfont larger than 16 Mb - asfxload on trying that writes:
 +
 sfxload: no memory left sfxload: no memory left
 +
 while asfxload -M gives something like this: while asfxload -M gives something like this:
 +
 DRAM memory left = 115576 kB DRAM memory left = 115576 kB
-it means - about 100+ megabytes free ram. but you really cannot load even 30 Mb soundbank.+ 
 +it means - about 100+ megabytes free ram. But you really cannot load even 30 Mb soundbank.
  
 Ok, what is workaround? Ok, what is workaround?
-there is two: decrease memory size used by system at boot stage to 2 Gb  - use at lilo kernel parameter +There is two: decrease memory size used by system at boot stage to 2 Gb  - use at lilo kernel parameter  
 ''memmap=2048M\\$6144M'' ''memmap=2048M\\$6144M''
  
-other is more usable - change kernel source files and recompile kernel:+Other is more usable - change kernel source files and recompile kernel: 
 + 
 +go to /usr/src/~linux  - that is your linux source. 
  
 arch/x86/include/asm/dma.h arch/x86/include/asm/dma.h
  
 change in string: change in string:
- +<code bash> 
-''/* 4GB broken PCI/AGP hardware bus master zone */ +  
-     #define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)''+/* 4GB broken PCI/AGP hardware bus master zone */ 
 +     #define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) 
 +      
 +</code>
            
   change 4UL to 2UL:   change 4UL to 2UL:
      
-  ''+<code bash> 
 +  
   /* 4GB broken PCI/AGP hardware bus master zone */   /* 4GB broken PCI/AGP hardware bus master zone */
-     #define MAX_DMA32_PFN ((2UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)'' +     #define MAX_DMA32_PFN ((2UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)
-     +
            
 +</code> 
 +    
      after that need to recompile kernel. after that you get usable 1 Gb RAM for SB Live /Audigy Rx soundfonts.      after that need to recompile kernel. after that you get usable 1 Gb RAM for SB Live /Audigy Rx soundfonts.
-     if you want more - you need edit also +     
 +    <note> if you want more - you need edit also</note> 
            
      sound/pci/emu10k1/emu10k1.c      sound/pci/emu10k1/emu10k1.c
            
-      +<code bash> 
-   ''   err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);          +      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);          
     if (err < 0)                                                                     if (err < 0)                                                                
         return err;                                                                      return err;                                                             
Line 143: Line 265:
                       &emu)) < 0)                                                                      &emu)) < 0)                                               
         goto error;                                                          goto error;                                                 
-       '' +        
 +</code> 
  
-you must comment  that strings, as in upper block:    +you must comment  that strings, as in upper block:    
 + 
 +<code bash>
  else if (max_buffer_size[dev] > 1024)                                           else if (max_buffer_size[dev] > 1024)                                         
         max_buffer_size[dev] = 1024;           max_buffer_size[dev] = 1024;  
 +</code> 
                  
 +        And then there is one else thing: default memory size for soundfonts is 128 Mb. If you want to increase it, you must create a sound.conf file in /etc/modprobe.d/ 
 +
 +write in file /etc/modprobe.d/sound.conf :        
 +<code bash>
 +
 +options snd-emu10k1  max_buffer_size=1750     
 + 
 +</code> 
 +
 +where max_buffer_size reffers to amount of RAM dedicated to soundfonts, in megabytes. in that case its about 1.7 Gb.
 +
                  
-        after that you can use up to 2 Gb RAm for soundfonts loading.+<note tip>    after that you can use up to 2 Gb RAM for soundfonts loading ( when define that in max_buffer_size, and do restart). 
 +</note>
                  
 ====== Useful Links: ====== ====== Useful Links: ======
Line 161: Line 299:
   * [[https://bugs.launchpad.net/ubuntu/+source/awesfx/+bug/183456]]   * [[https://bugs.launchpad.net/ubuntu/+source/awesfx/+bug/183456]]
   * [[https://github.com/koppi/renoise-refcards/wiki/HOWTO-setup-EMU10k-soundfont-DSP-on-Ubuntu-11.10]]   * [[https://github.com/koppi/renoise-refcards/wiki/HOWTO-setup-EMU10k-soundfont-DSP-on-Ubuntu-11.10]]
 +  * [[http://www.linuxquestions.org/questions/slackware-14/sound-problems-in-slackware64-14-1-xfce-4175497387/]]
  
 ====== Sources ====== ====== Sources ======
 Originally written by  --- //[[wiki:user:wisedraco|John Ciemgals]] 2013/02/07 04:50// Originally written by  --- //[[wiki:user:wisedraco|John Ciemgals]] 2013/02/07 04:50//
 +
 +Rewrited with used materials from "Links" and LinuxQuestions.org Slackware forum, especially user Drakeo help --- //[[wiki:user:wisedraco|John Ciemgals]] 2014/03/19 01:15//
  
 Edited by  --- //[[wiki:user:mfillpot|mfillpot]] Edited by  --- //[[wiki:user:mfillpot|mfillpot]]
 howtos:hardware:soundblaster-live-5.1 ()