Jump to content

ALSA


Lexicon
 Share

Recommended Posts

Dmix, program mixing, reproducing sound

If you have any problems with a sound card (mostly integrated), os sound server, arts, esd, you can create hidden file .asoundrc in your /home directory, or for all users of your computers in /etc/asound.conf (if necessary: create it). In this file write

 

pcm.card0 {

type hw

card 0

}

pcm.!default {

type plug

slave.pcm "dmixer"

}

pcm.dmixer {

type dmix

ipc_key 1025

slave {

pcm "hw:0,0"

period_time 0

period_size 4096

buffer_size 16384

#4096 if problems

period 128

rate 44100

}

bindins {

0 0

1 1

}

}

 

OK, this fragment to leane on dplug, dmix plugins. Not much information of ALSA software ....Lex

 

 

cd... Text is entirely my and design for every and transferred from different forum on which I happened in Poland

http://www.mandrivalinux.eu/showthread.php?t=18412

Text is translate behind help of translator.

 

 

Alsa this drivers to cards of sound new generation appeared which enough no long ago and they gained huge popularity. And though them fast development follows, still indispensable service of older open system of sound oss is us. Example here vocal transport and also ; as well as ; television of video are continually linux. Difference is large between this drivers and most important this quantity of served sound cards as well as utilization of some components, advanced control. Small record onto this subject is defect too. Obviously alsa has to emulate drivers oss and therefore it is peaceable backwards. Some programmes be able to to act from alsa still. In kernels 2.6.X. Alsa became add for ever . But one should to remember that add drivers (drivery) became only. Alsa to work demands libraries, tools of every type which it was been possible to take

<http://www.alsa-project.org> from home side of project. All packets have to be this myself version!. Newest drivers in moment version of writing this posta this 1.10 - system indispensable libraryalsa-lib this using programmes from sound.

- Modules of indispensable corealsa-drivers this for concrete work of cards and her components.

- Additional programmes alsa-utils this to service of sound acting card from line of recommendations but giving control strengths of voice, recording and reproduction. Sometimes they are indispensable and more necessary depression mixers and graphic players. They bring in information much. -Alsa-firmware of some card need File firmware to correct working so-called -alsa-tools this additional programmes e.g. To loading firmware etc During installation of system in most of cases card will become detected and installed indispensable software will become. Drivers alsa co-operate arts for kde whether esd for gnome from servers, servers exist also for wmakera and characterizing server jack this one self low latency even to 1 millisecond. Servers mediate between drivers alsa and applications what makes possible using from sound many applications simultaneously. In front of shopping of card get to to know smallest problems are cards it is proper with which. Read a little record which is kernela in /usr/src/documentation/sound/ after installation of sources it is proper also. If we know what driver serves we can our card take drivery alsa already and after unpacking giving command ./configure - we will inquirehelp whether we have our driver. Users kernelis from 2.4 have easier assignment, however in one should 2.6 to remove library alsa and drivers from switch -force whether -nodeps because it can this to pull removal of half of system in depending. To to install drivers we give standard recommendations - example for card sblive 1024player ./configure -with-cards=emu10k1accessible #### is more option for midi, jojstika etc Make

make install ####as root if at configure we will not choose concrete card this all drivers will compile themselves us. List of accessible drivers in version 1.0.10

 

In file /etc/modprobe.conf we have whole configuration of card - example of final value 0 they mark number of sound card, I ask not to mislead that device is disabled. We have to acquaint possibilities with everybody amixera amixer obviously necessarily -help to reproduce what next application aplay will say us, giving command aplay -l we will receive list of accessible devices. Example: aplay -d hw:0,0 *.wav

 

aplay -d plug:surround40 *.wav

 

aplay -d plug:surround40:1 *.wav ###if we want to get sound on second sound card - for owners more depression of one card. Checking of working of front loudspeakers is different interesting function, back in dependence from model cards and example: aplay -d front *.Wav

aplay -d rear *.wav option plug permits onto reproduction of incompatible sound through our card. It does not mark this and I ask not to mislead from codecs, but example to be possibility of listening of sound 24 bite on card 16 bit maybe. Possibility of listening of spatial sound is different example on cards audigy2 and newer sound ac3 demand which to correct working. We can this behind to simulate e.g.

 

Programme mplayer.

 

Mplayer -channels -af 6 surround=100 -ao alsa:device=surround51 film.Avi ##(musician.wav) for owners of cards 4 channels we write down surround40 and channels 4. Example how to get sound e.g. 5,1 whether 6,0 and maybe larger use is in kaffeine. In arrangements audio in my case I included sound 6,0 and I included integrated card earlier realtek on sterowniku via snd-via82xx. Having two card we modify file /etc/modprobe.Sound 4,0 and this example of modification

 

 

Thanks serves conf because my basic card only ago in kaffeine we have 6 channels but original sound from plate dvd. Some sound cards possess one's own processor dsp (sblive) and different no ( integratedcard with main plate). In this last processor dsp is emulated through processor main what burdens system and it causes larger delays still in sure degree. Here problem of working in two directions dochodzi also so-called Dupplex, equipment, they be able to to act in full fulldupplexie and software`that no. About what so does it walk exactly - obviously recording and reproduction of sound simultaneously. About this users convinced themselves e.g. Skype. Sound servers in sure degree this be able to to make up , but never to end. It exists many projects how dmix - reproduction from many sources as well as dsnoop recording from many sources. Aplay -d dmix *.Wav encountered problems and curiosities:

 

 

simple mixer control 'master',0
simple mixer control 'headphone lfe',1
simple mixer control 'headphone',1
simple mixer control 'headphone center',1
simple mixer control 'tone',0
simple mixer control 'bass',0
simple mixer control 'treble',0
simple mixer control 'pcm',0
simple mixer control 'surround',0
simple mixer control 'center',0
simple mixer control 'lfe',0
simple mixer control 'synth',0
simple mixer control 'wave',0
simple mixer control 'wave center',0
simple mixer control 'wave lfe',0
simple mixer control 'wave surround',0
simple mixer control 'line',0
simple mixer control 'line livedrive',0
simple mixer control 'line2 livedrive',1
simple mixer control 'cd',0
simple mixer control 'mic',0
simple mixer control 'mic boost (+20db)',0
simple mixer control 'mic select',0
simple mixer control 'video',0
simple mixer control 'phone',0
simple mixer control 'iec958 coaxial',0
simple mixer control 'iec958 livedrive',0
simple mixer control 'iec958 optical raw',0
simple mixer control 'iec958 ttl',0
simple mixer control 'pc speaker',0
simple mixer control 'aux',0
simple mixer control 'capture',0
simple mixer control 'mix',0
simple mixer control 'mix mono',0
simple mixer control 'ac97',0
simple mixer control 'external amplifier',0
simple mixer control 'sb live analog/digital output jack',0

 

Final value 0 they mark number of sound card, I ask not to mislead that device is wyłaczone. We have to acquaint possibilities with everybody amixera amixer obviously necessarily -help to reproduce what next application aplay will say us, giving command aplay -l we will receive list of accessible devices.

Example:

 

aplay -d hw:0,0 *.Wav

 

 

aplay -d plug:surround40 *.wav

 

aplay -d plug:surround40:1 *.wav ###if we want to get sound on second sound card - for owners more depression of one card. Checking of working of front loudspeakers is different interesting function, back in dependence from model cards and example: aplay -d front *.Wav

aplay -d rear *.Wav option plug permits onto reproduction of nieobsługiwanego sound through our card. It does not mark this and I ask not to mislead from kodekami, but example to be possibility of listening of sound 24 bite on card 16 bite maybe. Possibility of listening of spatial sound is different example on cards audigy2 and newer sound ac3 demand which to correct working. We can this behind to simulate e.g. Programme mplayer. Mplayer -channels -af 6 surround=100 -ao alsa:device=surround51 film.Avi ##(musician.wav) for owners of cards 4 channels we write down surround40 and channels 4. Example how to get sound e.g. 5,1 whether 6,0 and maybe larger use is in kaffeine. In arrangements audio in my case I included sound 6,0 and I included integrated card earlier realtek on sterowniku via snd-via82xx. Having two card we modify file /etc/modprobe.Sound 4,0 and this example of modification serves conf because my basic card only

 

 

install usb-interface /sbin/modprobe uhci-hcd; /sbin/modprobe ehci-hcd; /bin/true
options bttv card=15 tuner=0 gbuffers=4
remove snd-via82xx /sbin/modprobe --first-time -r --ignore-remove snd-via82xx
install snd-via82xx /sbin/modprobe --first-time --ignore-install snd-via82xx
remove snd-emu10k1 /sbin/modprobe -r snd-pcm-oss; /sbin/modprobe --first-time -r --ignore-remove snd-emu10k1
install snd-emu10k1 /sbin/modprobe --first-time --ignore-install snd-emu10k1 && { /sbin/modprobe snd-pcm-oss; /bin/true; }
options snd-cards_limit=2
alias snd-card-0 snd-via82xx
alias snd-card-1 snd-emu10k1
options snd-via82xx index=0
options snd-emu10k1 index=1
###for oss
alias sound-slot-0 snd-via82xx
alias sound-slot-1 snd-emu10k1

 

Thanks ago in kaffeine we have 6 channels but original sound from plate dvd. Some sound cards possess one's own processor dsp (sblive) and different no ( integratedcard with main plate). In this last processor dsp is emulated through processor main what burdens system and it causes larger delays still in sure degree. Here problem of working in two directions it causes also so-called Dupplex, equipment, they be able to to act in full fulldupplex and software`that no. About what so does it walk exactly - obviously recording and reproduction of sound simultaneously. About this users convinced themselves e.g. Skype. Sound servers in sure degree this be able to to make up , but never to end. It exists many projects how dmix - reproduction from many sources as well as dsnoop recording from many sources. Aplay -d dmix *.wav

encountered problems and curiosities:

 

curiosities and problems

 

Some applications be able to to deprive us of possibility listening of full number of channels. Such example to be use maybe kopete whether kadu being he line, and even mplayer itself he did not advise problem with this. Lock e.g. helps Kadu, kopete etc This normal thing - cards have one's limited possibilities also. It is different problem utilization of processor dsp for sound effects and this can reduce quantity of served channels also. Some stereo will need reductions of sound from some channels to usual - reason this possession e.g. of Set stereo. In kaffeine it suffices to include a52 surround_downmix and in xine one should disable alsa_mmap_enable in options playera

mplayer run with options mplayer -channels 2

 

midi

 

small file, often used in internet in games then take down some elements. Device called sequencer, bank of sounds of (sample) as well as steering file this devices that is our file midi. He contains only and exclusively informations about heights sound, his length, number of sound as well as to contain maybe more information e.g. Text. This small informations are no including in need much memory of sound samples. Loading suitable drivers we can steer external device midi, or internal if card such a one possesses. Often used they are today program emulators (timidity)which equal quality and even equipment sequencery top. It happens this behind matter of added effects through authors of software, however samples for equipments' devices are loaded without effects. Timidity is example of program player with bank timidity-instruments. It possesses he very large possibility and him creation of file is main assignment wav, aiff, etc From file mid without necessity of listen to of whole work. Considerable quantity of effects possesses. Example:

 

timidity -s 48000 -od1 --reverb=n --chorus=n *.Mid ## will play us file midi
timidity -s 48000 -ow --reverb=n --chorus=n *.Mid ## will create file wav.

 

Aplymidi is standard player in alsa. It be able to to use also from everybody of accessible harbours. Aplay -l #### will show accessible harbours

port client name port name 62:0 midi through midi through port-0 64:0 emu10k1 mpu-401 (uart) emu10k1 mpu-401 (uart) 65:0 emu10k1 wavetable emu10k1 port 0 65:1 emu10k1 wavetable emu10k1 port 1 65:2 emu10k1 wavetable emu10k1 port 2 65:3 emu10k1 wavetable emu10k1 port 3
128:0 timidity timidity port 0
128:1 timidity timidity port 1
128:2 timidity timidity port 2
128:3 timidity timidity port 3

 

Aplay -p 128:0 *.mid will redirect and it will reproduce us sample behind help sequencer timidity. To to use one should to load accessible samples under names * from equipment's harbour.sf2. To loading to memory It serves programme asfxload from packet awesfx. Sfxload /home/user/4gmgsmt.sf2

 

aplay -p 65:0 /home/user/*.mid

 

Interesting patch to be xplaymidi as well as kmid maybe for kde. Splendid patches exist obviously on players, mixers as mplayer, xine, aumix, kmix and such I command to apply, but sometimes We have to intervention in textual mode and I think that this example will help you in this somewhat. Sometimes problems appear with cards e.g. of Type ensonic and it it was not been known how to advise itself with them - default arrangements not even modprobe are not effective , and this example for one from cards:

 

sb esstype=1869 io=0x220 irq=5 dma=1

 

for ess chips an additional parameter "esstype" can be specified. This controls
the (auto) detection of the ess chips. It can have 3 kinds of values: -1 act like 2.0 kernels: only detect es688 or es1688.
0 try to auto-detect the chip (may fail for es1688)
688 the chip will be treated as es688
1688 ,, ,, ,, ,, ,, ,, es1688
1868 ,, ,, ,, ,, ,, ,, es1868
1869 ,, ,, ,, ,, ,, ,, es1869
1788 ,, ,, ,, ,, ,, ,, es1788
1887 ,, ,, ,, ,, ,, ,, es1887
1888 ,, ,, ,, ,, ,, ,, es1888 because full duplex is supported for es1887 you can specify a second dma
channel by specifying module parameter dma16. It can be one of: 0, 1, 3 or 5.

 

http://linux-audio.net/

http://linux-sound.org/

cdn........

 

......Lex

Edited by Lexicon
Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

Note to all of which commanded paste commands or browse amixera

 

In this version and probably in the next

Quote:

Quote:

Advanced Linux Sound Architecture Driver Version 1.0.18rc3.

 

 

You will need to state the number of device-c x

 

and, for instance, to know what control the card or the first one to give

 

 

amixer -c 0 scontrols

 

Sorry for the inconvenience

You probably will be more changes, you must keep track of John ....Lex

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...