Here is a new version of my console mpd remote script.
{ 6 décembre 2008 }
Recomposer un HTML valide après l'avoir tronqué.
samedi, décembre 6 2008, 18:21 :: Coding
Récemment, je me suis occupé de la création d'un site web tout joli tout beau, dans lequel les webmasters peuvent composer certaines parties de leur site web via un éditeur online wysiwyg. Mais à certains endroits, j'avais besoin de mettre juste le début du texte suivi des traditionnels 3 petits points.
{ 19 octobre 2008 }
Notify plugin for aMSN updated (1.3)
dimanche, octobre 19 2008, 15:22 :: Coding
New version of my notify plugin for aMSN
Changelog:
- Added "dash hack" : http://www.amsn-project.net/forums/viewtopic.php?t=5847, thanks to nico@nc
- Re-enable sounds on events: http://www.amsn-project.net/forums/viewtopic.php?t=5824 , thanks to nico@nc too
- bumped to version 1.3
Download the pugin: notify-plugin-by-Yoda-BZH_2008-10-19.tar.bz2
See my previous post for more information on this plugin.
{ 26 septembre 2008 }
Augigy SE/LS: Alsa vs OSS4
vendredi, septembre 26 2008, 11:56 :: Info
I finally bought a new sound card: A Sound Blaster Audigy SE (Sound Blaster Audigy SE - Sound Blaster Audigy SE), but lspci says :
┌─(yoda@elonia)(11:27:33) └─(~)-> lspci -vv -s 04:09.0 04:09.0 Multimedia audio controller: Creative Labs SB Audigy LS Subsystem: Creative Labs Device 100a Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 64 (500ns min, 5000ns max) Interrupt: pin A routed to IRQ 18 Region 0: I/O ports at cc00 [size=32] Capabilities: <access denied> Kernel driver in use: audigyls
Ok, it's an Audigy LS.
Alsa
Let's configure this card with Alsa. It suggests me to use the ca0106 module. Once detected and the module loaded, I have now hw:0,0, hw:0,1 and hw:0,2. Which are respectively front, rear and center. Apparently I can't have a native 5.1 surround system. I have 3 different cards. But Alsa let's the possibilty to mix differents things with the /etc/asound.conf file.
I tried differentthings. I've been able to set up a correct dmix system, nor a valid surround system, but NOT both. And no one seemed to manage to make that working. I asked for a little help on #alsa@freenode :
<Yoda-BZH> hi ppl <Yoda-BZH> is it possible to have dmix AND surround (5.1) at the same time ? (with ca0106 module) <wishie> no <Yoda-BZH> seriously ?! <Zider> hey wishie<wishie> Yoda-BZH: seriously <Yoda-BZH>
<Yoda-BZH> why isn't that possible ? <Zider> wishie: shouldn't it be possible to hack up an .asoundrc to do that? <wishie> because the ca0106 is used as 3 x 2ch devices <wishie> and the ca0106 has to use all 3 at once to get 6ch sound <wishie> so basically.. <wishie> you have to mix all 3 streams to get 6ch, then dmix the result <wishie> thats where the problem lies. <wishie> dmix only accepts a hw device as a slave <Zider> aha <wishie> and which one do you give it ? the 1st, 2nd, or 3rd hw device (each 2ch) <Zider> none of the above! <Zider>
<wishie> exactly <Zider> didn't know dmix required a hardware device <wishie> the ca0106 can also be used in a 1x6ch device mode, but its not implemented <Zider> ah <wishie> i believe this is due to the fact, the buffer becomes insanely small if its used in that mode. <wishie> but! <Zider> so the answer is "no, not yet" <Zider>
<Yoda-BZH> hmmmm <Yoda-BZH> ok <wishie> you CAN get it working, IF you want to get compilcated and use PulseAudio aswell <-- hiptobecubic has quit (No route to host) <wishie> i did get it working at one stage, for someone.. cant remember how, though. <wishie> i think it involved doing the upmixing, then passing the resulting stream to PA, then back to ALSA..heh <wishie> it was nasty, in any event. <jeeger`> are the in-kernel drivers in 2.6.27 newer than alsa-1.0.17? <jeeger`> because then I could try out the out-of-kernel drivers
So, without external mixing software (pulseaudio, arts, esd ...) it's not possible to have both dmix and surround5.1.
OSS
I often read posts on OSS, in particular this one that make me thinking a lot. With this Alsa problem, I decided to try OSS4. They proposes different packages, event a .deb file. I downloaded it and installed.
┌─(root@elonia)(11:43:16) └─(/home/yoda/usr/share/oss)-> dpkg -i oss-linux-4.0-1016_i386.deb
The package stopped Alsa proprely, detected correctly my sound card and compiled some drivers. Once loaded the audigyls module, I checked my /dev/dsp* devices. And here is the result :
┌─(yoda@elonia)(11:45:14) └─(~)-> ls -l /dev/dsp* lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp -> /dev/oss/audigyls0/pcm0 lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp0 -> /dev/oss/audigyls0/pcm0 lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp1 -> /dev/oss/audigyls0/pcm1 lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp2 -> /dev/oss/audigyls0/pcm2 lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp3 -> /dev/oss/audigyls0/pcm3 lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp_ac3 -> /dev/oss/audigyls0/pcm0 lrwxrwxrwx 1 root root 8 sep 26 09:17 /dev/dsp_in -> /dev/dsp lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp_mmap -> /dev/oss/audigyls0/pcm0 lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp_multich -> /dev/oss/audigyls0/pcm3 lrwxrwxrwx 1 root root 23 sep 26 09:17 /dev/dsp_out -> /dev/oss/audigyls0/pcm0
Well, I admit that that's really cool to have different /dev/dsp? devices for a single sound card. Software mixing is working on a single device, and if you have an old style OSS software (like teamspeak), you can set it to use a different device ... for the same sound card. Really cool !
Oss is bundled with two mixer software, a command line (ossmix) and a graphical tool (ossxmix). Here's a screenshoft of the graphical one :

Pretty cool huh ?
Well, I don't understand what everything means ... but I managed quite easily to make a surround system working with software mixing. I just have to enable spread.
All applications has the oss plugin, so every one is happy, and can send all their crappy sound to a valid device without conflict.
The final word
This post is not intented to make the glory of OSS4, but the fact is that OSS4 make the point with it system for this sound card. I really like Alsa, but I can't use it on my system. Sorry Alsa.
Links
- Alsa
- ca0106 module by Alsa
- OSS
- OSS Wiki
- Different things I tried: http://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg21412.html, http://forums.opensuse.org/hardware/390362-sb-audigy-ls-snd-ca0106.html, http://forum.ubuntu-fr.org/viewtopic.php?id=86535, http://ubuntuforums.org/showthread.php?t=411244, http://bbs.archlinux.org/viewtopic.php?pid=90299, http://forum.hardware.fr/hfr/OSAlternatifs/Debats/multiplexage-carte-linux-sujet_32016_2.htm, and maybe dozens of others.
{ 17 septembre 2008 }
vrac
mercredi, septembre 17 2008, 21:11 :: Général
- On a retrouvé Gordon Freeman !. Oui oui il est toujours ingénieur dans des trucs scientifiques de fous furieux.
- En parlant du LHC, on peut voir quelques cam du site. Bon visionnage.
- Une école de Jedi vient d'ouvrir. Jveux y aller !!
- Google chercherai à acheter Valve. Ben voyons.
Sinon j'ai acheté une Augigy SE, qui est en fait une Audigy LS (cherchez pas...). D'après la doc d'Alsa, il faut que j'utilise le module ca0106
. Tout content de pouvoir enfin brancher mon kit 5.1 de logitech, je configure Alsa pour avoir le 5.1. Dans cette configuration, pas de dmix. J'essaye de faire marcher dmix, pas de 5.1. D'après les gens de chez #alsa@Freenode, il N'EST PAS POSSIBLE d'avoir les deux en même temps ! En effet, le module ca0106
émule en quelque sorte le 5.1, en faisant du 3 x 2 canaux. Pour mélanger tous les canaux, il faut créer un machin dans la conf. Sauf que le machin pour dmix, il faut lui filer un nom de périphérique en dur, genre hw:0,0
, donc pas moyen de filer le machin de 5.1 qu'on vient de créer. Ok dommage.
Je suis donc passé à OSS4. Et je dois dire que c'est pas mal du tout ! J'ai juste installé le .deb, ça a compilé tout comme il faut. Il y a ossxmix
pour configurer tout ça, et j'ai le mixage software ET le surround 5.1 qui ont l'air de marcher comme il faut. Franchement OSS a un lourd passé de Closed Source, mais là il faut dire que ça marche, et ça marche même plutôt bien ! Leur interface graphique me parle pas trop, on sait pas trop à quoi correspondent les boutons ou les titres (genre vmix-in0, lineout-sel, rec-srcmix-mix, ...), mais une fois qu'on a trouvé les bons réglages, ça ne bouge pas.
Je pense que je ferai un billet un peu plus long là-dessus.
{ 30 août 2008 }
vrac
samedi, août 30 2008, 01:40 :: Général
- Concours du code le plus drôle
- Je sais plus si je l'avais dit ici, mais Tsuna a son blog
- Une vidéo franchement bien faite de San Francisco envahie par l'armée de Star Wars
- Le blog d'IE. (ou pas)
- Un film réalisé entièrement en images de synthèse qui a gagné le concours de dans la catégorie 3D.
{ 21 août 2008 }
MPD Remote control script
jeudi, août 21 2008, 11:53 :: Coding
Hey, i'm still looking for my best audio player. At the moment i'm testing MPD with Sonata as Front-end.
Unfortunately, mpd doesn't come with a remote controle system that can be used with my Logitech keyboard. So I managed to write mine.
You'll need Audio::MPD, which is aviable in Debian with libaudio-mpd-perl
#!/usr/bin/perl # Script by Yoda-BZH http://blog.yoda-bzh.net # v0.1 #use strict; use warnings; use Audio::MPD; use Getopt::Long; my($mpdIp, $mpdPort, $mpdPass, $mpd); $mpdIp = "localhost"; $mpdPort = 6600; $mpdPass = ""; my %opt; GetOptions( \%opt, "h|help" => \&usage, "i|ip=s" => \$mpdIp, "p|port=i" => \$mpdPort, "q|pass|password=s" => \$mpdPass, "play" => \&play, "pause" => \&pause, "fastforward|next" => \&fastforward, "rewind|previous" => \&rewind, ); sub usage() { print "Usage: $0 [-h|--help] [-i|--ip ip] [-p|--port port] [-q|--pass|--password password] action\n"; print "Action can be :\n"; print " [--play]\n"; print " [--pause]\n"; print " [--stop]\n"; print " [--fastforward|--next]\n"; print " [--rewind|--previous]\n"; print ""; } sub mpdConnect() { if($mpd) { return; } $mpd = Audio::MPD->new(hostname => $mpdIp, port => $mpdPort, password => $mpdPass); } sub play() { mpdConnect(); $mpd->play(); } sub pause() { mpdConnect(); $mpd->pause(); } sub fastforward() { mpdConnect(); $mpd->next(); } sub rewind() { mpdConnect(); $mpd->previ(); } exit 1;
{ 19 août 2008 }
Dedibox ipv6 calculator
mardi, août 19 2008, 16:01 ::
Pour ceux qui cherchent à calculer leur (vrai) ipv6 pour leur dedibox (et pour les dedibox *seulement*), j'ai crée un petit outil qui permet de sortir l'ipv6 et ce qu'il faut mettre dans le /etc/network/interfaces à partir de la sortie de ifconfig eth0
C'est par ici que ça se passe.
Si vous rencontrez, signalez le moi ici.
{ 19 août 2008 }
vrac
mardi, août 19 2008, 11:09 :: Général
- CSS Sprites, Reloaded
- Sprites CSS : Meurs, découpe d’images, meurs ! Par Dave Shea
- IOzone Filesystem Benchmark
- NetPIPE : A Network Protocol Independent Performance Evaluator
- Whatever you do, don’t fix the kernel!
- Overture de FreeTure (anciennement Free Culture)
- EPITA in the San Francisco Bay Area: The end .. of the beginning Félicitations !!
- Re: Superpages?
- Free: Changement de serveurs de nom (DNS)
- Enfin Téléphone portable : quelles précautions prenez-vous ?. Je voulais faire tout un billet là-dessus ... mais j'ai assez la flemme. Tout ce que je peux vous dire, c'est que ça crame le corps, ça, c'est certain.
{ 20 juin 2008 }
Imperial March (Vader's theme, piano)
vendredi, juin 20 2008, 11:49 :: Général
Imperial March (Vader's theme)
{ 16 juin 2008 }
Comment résister ?
lundi, juin 16 2008, 16:37 :: Général

Hein franchement ? C'est pas possible ...
{ 16 juin 2008 }
DDR - Butterfly (Duel Piano Cover 3)
lundi, juin 16 2008, 12:56 :: Général
DDR - Butterfly (Duel Piano Cover 3)
Vidéo d'un mec qui joue Butterfly sur deux pianos.Abusé.
{ 15 juin 2008 }
Knicker picker v2
dimanche, juin 15 2008, 20:37 :: Général
Il me semblait que j'en avait déjà parlé, mais apparemment non. Je vais donc directement annoncer la nouvelle version de Knicker Picker. C'est un site où l'on peut faire tester à des modèles des sous-vêtements (ça on le savait déjà), mais maintenant des sous-vêtements de sport et des maillots de bain. De plus, deux nouveaux modèles ont fait leur apparition.
De nombreux produits de différents sites de lingerie ont été ajouté, les gammes de produits sont vraiment étoffées. À tester absolument !
{ 15 juin 2008 }
Photos: Feu d'artifice
dimanche, juin 15 2008, 19:37 :: Photos
Nouvelle série de photo sur le feu d'artifice. Cette fois c'est pour le 14 juillet 2006.
{ 15 juin 2008 }
Photos: Feu d'artifice
dimanche, juin 15 2008, 19:32 :: Photos
Voici une série de photo de Juillet 2004. C'était le feu d'artifice du 14 juillet.
{ 10 juin 2008 }
Photos: À la plage (1/5)
mardi, juin 10 2008, 13:24 :: Photos
Dimanche dernier, compétition de planche à voile, catamaran, optimiste à Loctudy. À défaut de prendre les compétiteurs dans/sur leur embarcation (je n'ai pas encore de gros zoom), j'en ai profité pour faire quelques photos de la plage.
Petite série de photos prise entre les rochers, au ras de l'eau.
« billets précédents - page 2 de 13 - billets suivants »
<wishie> Yoda-BZH: seriously
<Yoda-BZH>
<Yoda-BZH> why isn't that possible ?
<Zider> wishie: shouldn't it be possible to hack up an .asoundrc to do that?
<wishie> because the ca0106 is used as 3 x 2ch devices
<wishie> and the ca0106 has to use all 3 at once to get 6ch sound
<wishie> so basically..
<wishie> you have to mix all 3 streams to get 6ch, then dmix the result
<wishie> thats where the problem lies.
<wishie> dmix only accepts a hw device as a slave
<Zider> aha
<wishie> and which one do you give it ? the 1st, 2nd, or 3rd hw device (each 2ch)
<Zider> none of the above!
<Zider>
<wishie> exactly
<Zider> didn't know dmix required a hardware device
<wishie> the ca0106 can also be used in a 1x6ch device mode, but its not implemented
<Zider> ah
<wishie> i believe this is due to the fact, the buffer becomes insanely small if its used in that mode.
<wishie> but!
<Zider> so the answer is "no, not yet"
<Zider> 

























