doc:appunti:linux:sa:mpd
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:linux:sa:mpd [2012/08/17 12:25] – niccolo | doc:appunti:linux:sa:mpd [2012/08/17 15:14] (current) – [Test MP3] niccolo | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| In generale l' | In generale l' | ||
| + | |||
| + | ===== Configurazione del server ===== | ||
| + | |||
| + | ==== Sistema audio ALSA ==== | ||
| + | |||
| + | Anzitutto conviene verificare che il sottositema audio funzioni a dovere. L' | ||
| + | |||
| + | Dopo il boot verifichiamo che una scheda audio sia stata rilevata e che i moduli kernel siano stati caricati: | ||
| + | |||
| + | < | ||
| + | lsusb | ||
| + | Bus 001 Device 002: ID 0c76:1607 JMTek, LLC. audio controller | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | lsmod | grep snd | ||
| + | snd_usb_audio | ||
| + | snd_pcm | ||
| + | snd_usb_lib | ||
| + | snd_hwdep | ||
| + | snd | ||
| + | soundcore | ||
| + | usbcore | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Questa è la " | ||
| + | |||
| + | < | ||
| + | cat / | ||
| + | 1 [Set ]: USB-Audio - USB Headphone Set | ||
| + | USB Headphone Set at usb-orion-ehci.0-1, | ||
| + | </ | ||
| + | |||
| + | elenco delle schede audio e di tutti i device audio digitali: | ||
| + | |||
| + | < | ||
| + | aplay -l | ||
| + | **** List of PLAYBACK Hardware Devices **** | ||
| + | card 1: Set [USB Headphone Set], device 0: USB Audio [USB Audio] | ||
| + | Subdevices: 0/1 | ||
| + | Subdevice #0: subdevice #0 | ||
| + | </ | ||
| + | |||
| + | elenco dei dispositivi capaci di riprodurre audio [[wp> | ||
| + | |||
| + | < | ||
| + | aplay -L | ||
| + | null | ||
| + | Discard all samples (playback) or generate zero samples (capture) | ||
| + | front: | ||
| + | USB Headphone Set, USB Audio | ||
| + | Front speakers | ||
| + | surround40: | ||
| + | USB Headphone Set, USB Audio | ||
| + | 4.0 Surround output to Front and Rear speakers | ||
| + | surround41: | ||
| + | USB Headphone Set, USB Audio | ||
| + | 4.1 Surround output to Front, Rear and Subwoofer speakers | ||
| + | surround50: | ||
| + | USB Headphone Set, USB Audio | ||
| + | 5.0 Surround output to Front, Center and Rear speakers | ||
| + | surround51: | ||
| + | USB Headphone Set, USB Audio | ||
| + | 5.1 Surround output to Front, Center, Rear and Subwoofer speakers | ||
| + | surround71: | ||
| + | USB Headphone Set, USB Audio | ||
| + | 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers | ||
| + | iec958: | ||
| + | USB Headphone Set, USB Audio | ||
| + | IEC958 (S/PDIF) Digital Audio Output | ||
| + | </ | ||
| + | |||
| + | Il problema principale è che alla scheda audio **viene assegnato l' | ||
| + | ==== Test ALSA ==== | ||
| + | |||
| + | Il **primo problema** lo incontriamo con il comando **'' | ||
| + | |||
| + | < | ||
| + | aplay / | ||
| + | ALSA lib confmisc.c: | ||
| + | ALSA lib conf.c: | ||
| + | ALSA lib confmisc.c: | ||
| + | ALSA lib conf.c: | ||
| + | ALSA lib confmisc.c: | ||
| + | ALSA lib conf.c: | ||
| + | ALSA lib conf.c: | ||
| + | ALSA lib pcm.c: | ||
| + | aplay: main:654: audio open error: No such file or directory | ||
| + | </ | ||
| + | |||
| + | Specificando il dispositivo si ha un miglioramento, | ||
| + | |||
| + | < | ||
| + | aplay --device=' | ||
| + | Playing WAVE '/ | ||
| + | aplay: set_params: | ||
| + | </ | ||
| + | |||
| + | Lo stesso identico risultato si ottiene usando **'' | ||
| + | |||
| + | Anche il **mixer Alsa** non funziona alla prima: | ||
| + | |||
| + | < | ||
| + | alsamixer | ||
| + | cannot open mixer: No such file or directory | ||
| + | </ | ||
| + | |||
| + | La soluzione a tutti i problemi è creare un file di configurazione **''/ | ||
| + | |||
| + | < | ||
| + | # 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 " | ||
| + | # 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 | ||
| + | </ | ||
| + | |||
| + | Il file di configurazione vale per tutto il sistema, il singolo utente può crearsi un '' | ||
| + | |||
| + | ==== Test MP3 ==== | ||
| + | |||
| + | Dopo che il sistema Alsa è stato configurato e collaudato, è possibile testare il funzionamento del decoding mp3: | ||
| + | |||
| + | < | ||
| + | mpg321 -o alsa track001.mp3 | ||
| + | </ | ||
| + | |||
| + | nel nostro caso specifico ci sono dei problemi di qualità: l' | ||
| + | ===== MP Client ===== | ||
| + | |||
| + | ==== Client per Android ==== | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
doc/appunti/linux/sa/mpd.1345199110.txt.gz · Last modified: by niccolo
