User Tools

Site Tools


doc:appunti:linux:sa:mpd

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
Last revisionBoth sides next revision
doc:appunti:linux:sa:mpd [2012/08/17 13:31] – [Test ALSA] niccolodoc:appunti:linux:sa:mpd [2012/08/17 15:04] – [Test ALSA] niccolo
Line 80: Line 80:
 </code> </code>
  
 +Il problema principale è che alla scheda audio **viene assegnato l'identificativo #1**, mentre tutti i programmi Alsa per impostazione predefinita usano la scheda #0.
 ==== Test ALSA ==== ==== Test ALSA ====
  
Line 103: Line 104:
 Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
 aplay: set_params:1059: Channels count non available aplay: set_params:1059: Channels count non available
 +</code>
 +
 +Lo stesso identico risultato si ottiene usando **''hw:1,0''** (scheda audio #1, device #0) al posto della stringa descrittiva ''CARD=Set,DEV=0''.
 +
 +Anche il **mixer Alsa** non funziona alla prima:
 +
 +<code>
 +alsamixer 
 +cannot open mixer: No such file or directory
 +</code>
 +
 +La soluzione a tutti i problemi è creare un file di configurazione **''/etc/asound.conf''**:
 +
 +<file>
 +# Give an alias to PCM device hw:1,0 (card 1, device 0):
 +pcm.def_pcm {
 +    type hw
 +    card 1
 +    device 0
 +}
 +# Default (virtual) PCM device goes through the "plug" plugin (which does
 +# rate and channels resampling on-the-fly) to the real PCM device:
 +pcm.!default {
 +    type plug
 +    slave {
 +        pcm def_pcm
 +    }
 +}
 +# Default control (e.g. for mixer) is card 1:
 +ctl.!default {
 +    type hw
 +    card 1
 +</file>
 +
 +Il file di configurazione vale per tutto il sistema, il singolo utente può crearsi un ''.asoundrc'' alternativo. Viene utilizzato per definire alias, device virtuali che combinano funzioni di pre o post-processing, ... In generale non dovrebbe essere necessario, vedere la [[http://alsa.opensrc.org/.asoundrc|documentazione relativa]].
 +
 +==== Test MP3 ====
 +
 +Dopo che il sistema Alsa è stato configurato e collaudato, è possibile testare il funzionamento del decoding mp3:
 +
 +<code>
 +mpg321 -o alsa track001.mp3
 </code> </code>
 ===== MP Client ===== ===== MP Client =====
doc/appunti/linux/sa/mpd.txt · Last modified: 2012/08/17 15:14 by niccolo