Johan Adlers sporadiska skriverier
RSS icon Home icon
  • USB sound on Alix running Voyage

    Posted on May 18th, 2011 Johan Adler 2 comments

    I thought that using a USB sound card with Linux would be easy, just plug and play, but I was wrong, it seems. Plug­ging in the Ter­ra­tec Aureon Dual USB (ID: 0ccd:0077) that I bought ren­de­red a pro­mi­sing out­put from dmesg and lsusb, and lsmod sho­wed that even rele­vant modu­les were loa­ded. The pro­blem was that mpd and other pro­grams did not find any way to actu­ally out­put sound to any device. They had the firm belief that my system was lac­king any sound card. Maybe I would need some sound rela­ted pac­ka­ges?

    aptitude install alsa-base alsaplayer alsaplayer-text alsa-utils


    No luck… The mpd con­fi­gu­ra­tion file /etc/mpd.conf see­med mostly con­fu­sing when it came to out­put devices, and the wiki page it refer­red to did not help eit­her. A search with Google on the USB ID was hel­p­ful though, as usual. Some­one with the alias BigRon also had pro­blems with Debian and this Ter­ra­tec USB sound card. The results from his attempts, docu­men­ted with ver­bose out­put, was simi­lar to mine. User bandan’s reply was the begin­ning of the end of my trouble! I had to edit /etc/modprobe.d/alsa-base.conf to com­ment out a line pre­ven­ting USB devices from becoming the first (default) device, sub­sti­tu­ting it for a line with the oppo­site effect.

    ## Keep snd-usb-audio from beeing loaded as first soundcard<br/> #options snd-usb-audio index=-2


    # Fix from http://forum.doozan.com/read.php?2,4119,4166<br/>

    1. Allow snd-usb-audio to be loaded as first soundcard options snd-usb-audio index=0


      Now I was at least able to get alsa­mixer to ack­now­ledge the mere existence of a sound rela­ted device, but alas it chose an input only device (most likely my Logi­tech webcam with microp­hone) as the default device even though it cal­led the Ter­ra­tec one default by name. Luc­kily for me the just men­tio­ned forum thread linked to a more sub­stan­tial thread descri­bing the pro­blem in more depth. I added myself and the mpd user to the audio group, to make sure that there would not be any pro­blems with per­mis­sions regar­ding the devices

      addgroup jadler audio addgroup mpd audio


      I was still unable to play anyt­hing (wit­hout expli­citly cho­sing what Alsa refers to as sound card 1). So I kept try­ing the stuff that had worked for the per­son repor­ting in the forum, cre­a­ting an /etc/asound.conf file with basi­cally the same con­tent as sug­ges­ted in the last thread refer­red to above, but chan­ging all refe­rences to hw:0 to hw:1, and from card 0 to card 1. Now mplayer works, but I still can’t get mpd to do its thing.

    2. Alix2d13 — Voyage Linux or Debian Live?

      Posted on May 12th, 2011 Johan Adler No comments

      I am not sure whet­her it is cau­sed by the Ubuntu 10.10 amd64 run­ning on my work­sta­tion or on some bug in the Emde­bian pac­kage, but I do have a hard time to get Emde­bian instal­led. I have tried Mul­tistrap, Debootstrap, and Debian Instal­ler, and I have done it on the Alix com­pu­ter using PXE boot, on my work­sta­tion (follo­wed by chroot etc), and on vir­tual machi­nes using qemu/kvm or Vir­tu­al­box, but so far no luck.

      All of this makes it less and less attemp­ting to actu­ally install any Emde­bian based Debian, and so I gradu­ally tur­ned back to Voyage Linux. When I was brow­sing the Voyage site I lear­ned about Debian Live, the system that “punkytse” uses to cre­ate the Voyage ima­ges, and also offers for down­load under tha name “Voyage SDK”. So now I am tes­ting Debian Live and try­ing to learn more about it.

      The wiki and the manual seems to be a good place to start when lear­ning about Debian Live.

      For those inte­res­ted in PC Engi­nes Alix the Alix forum may also be a good source of information.

      (I should really find a bet­ter Word­Press theme, I know…)

    3. Installing Linux on PC Engines Alix2d13 (part 2)

      Posted on May 8th, 2011 Johan Adler No comments

      I have found it to be quite nice to be able to boot the Alix board over the network using PXE. Using the Debian netboot.tar.gz tar­ball and TFTP I can boot the Debian Instal­ler or a rescue system, and the for­mer lets me install Debian Linux wit­hout phy­si­cally touching the CF.

      In order to make net­boot use the serial port as con­sole I have pat­ched the Debian net­boot tar­ball, and I made a script that does all the patching, just for you… :-)

      patch-netboot.sh

      I have tested it with the Debian stable and tes­ting netboot.tar.gz down­lo­a­ded today and it works, and also with the daily snap­shot from Debian installer.

      The script will modify the file syslinux.cfg in order to make PXE­Li­nux use the serial port, and the files adtxt.cfg, rqtxt.cfg and txt.cfg to make sure that the Linux ker­nel (actu­ally the Debian instal­ler in this case) also uses the serial port as con­sole. (Look at the script to see the actual changes. You should of course have a look at it before run­ning it, anyway.)

      Making my anci­ent Net­gear WGT634U run­ning OpenWRT serve PXE ima­ges was really a no-brainer. In the Services/Dnsmasq page I ente­red the three cho­i­ces shown below, with  the pat­ched net­boot untar­red on a USB stick mounted on /mnt/sda2.

      Refe­rences (other that links above):


      Some more patching lets me use pre­see­ding too, but more on that anot­her time.

    4. WordPress, säkerhetsuppdatering, 2.3.3

      Posted on February 5th, 2008 Johan Adler No comments

      Jag ser att det har släppts ännu en bråds­kande säker­hets­upp­da­te­ring för Word­Press.

      Ryan skri­ver:


      Word­Press 2.3.3 is an urgent secu­rity rele­ase. A flaw was found in our XML-RPC imple­men­ta­tion such that a spe­ci­ally craf­ted request would allow any valid user to edit posts of any other user on that blog. In addi­tion to fix­ing this secu­rity flaw, 2.3.3 fixes a few minor bugs. If you are inte­res­ted only in the secu­rity fix, down­load the fixed ver­sion of xmlrpc.php and copy it over your exis­ting xmlrpc.php. Other­wise, you can get the entire rele­ase here.

      Also, there is a vul­ne­ra­bi­lity in the WP-Forum plu­gin that is being acti­vely explo­i­ted right now. If you are using this plu­gin, ple­ase remove it until an update is available.

      Since we are tal­king secu­rity, remem­ber to use strong pas­swords and change them regu­larly.  While you’re upda­ting WP and your plu­gins, con­si­der refreshing your passwords.


      Det känns tryggt att det kom­mer nya säker­hets­upp­da­te­ringar ofta, även om jag ärligt talat inte har instal­le­rat den förra än. Vad jag kan se i bul­le­ti­nen så är det inte säker­hets­hål som berör mig sär­skilt myc­ket. Jag har inga spa­rade utkast, och skulle någon läsa even­tu­ella sådana skulle det inte göra mig så myc­ket. Jag är ensam använ­dare på min egen blogg, så den senaste var­ningen rör mig nog inte heller.

      På sätt och vis känns det, åtminstone för mig per­son­li­gen, som att dessa täta upp­da­te­ringar och den inte helt auto­ma­giska pro­ce­du­ren för att upp­gra­dera, gör att jag gärna vän­tar ett tag innan jag upp­gra­de­rar. Vän­tar jag som nu drygt en månad så kanske det kom­mer ännu en ny upp­da­te­ring, och det är lika myc­ket (eller lite) jobb att upp­gra­dera oav­sett hur många (mindre) ver­sions­steg det gäl­ler. Som Debian-användare är jag väl bort­skämd, van som man är att kunna upp­gra­dera hela linux-installationen med två ord: ‘apt-get upgrade’…

      Andra blog­gar om: , ,

    5. MySQL, Sun och DN:s inkompetens

      Posted on January 17th, 2008 Johan Adler No comments

      Min första text om att Sun köper MySQL blev kort, men det är inte något jag slu­tar tänka på.

      Jag kan inte annat än hålla med blog­ga­ren på Digi­tal Media. DN har verk­li­gen klan­tat sig. Jag kanske är lite par­tisk med tanke på mitt snart 30-åriga dator­in­tresse, men jag har fak­tiskt svårt att för­stå att de inte tar med upp­kö­pet av MySQL på första­si­dan, inte bara som en liten ano­nym blän­kare på två rader på eko­no­mi­de­lens omslag. Vore jag redak­tör vore det första­si­desstoff, och jag skulle se till att en skri­bent som vet vad det hand­lar om skri­ver artikeln.

      Ceci­lia Jacobs­son må vara en bra jour­na­list, därom kan jag inte uttala mig, men det är pate­tiskt uppen­bart att hon inte är insatt i IT.  Dels kan hon inte stava till MySQL (utan sär­skri­ver det som My SQL), dels har hon uppen­bar­li­gen ingen aning om vad som menas med öppen käll­kod eller open source (FOSS). Hon skri­ver att gra­tis ned­ladd­ning är syno­nymt med öppen källkod—jag må vara ska­dad av mina många år som dator­in­tres­se­rad, men jag tyc­ker ändå att en skri­bent som inte för­står skill­na­den mel­lan vad t.ex. WinAMP och GIMP står för inte borde få skriva en arti­kel som denna.

      Påstå­en­det att MySQL är en del av Linux kanske man måste tole­rera, även om många av oss vet bättre. Visst ingår MySQL i många linux­dis­tri­bu­tio­ner, instal­le­ras det inte auto­ma­tiskt så har man i alla fall möj­lig­he­ten att instal­lera det. Att Linux är kär­nan, ker­nel, och att alla andra pro­gram som ingår i en dis­tri­bu­tion inte per auto­ma­tik är syno­nymt med Linux kanske jag mot­vil­ligt måste accep­tera att en glad dato­ra­ma­tör inte kan för­stå (även om det bär emot). Att MySQL åtminstone i begrep­pet LAMP är jäm­ställt med både Linux-kärnan, Apache och PHP ver­kar ha gått Ceci­lia helt förbi.

      Det är inte utan att det känns lite trå­kigt att inte någon av oss som läser och för­står detta kunde ha fått skriva arti­keln istäl­let. För mig är det en världs­om­ska­kande hän­delse, och jag tyc­ker verk­li­gen att DN borde ha till­räck­lig pejl på omvärl­den för att inse det.

      Andra blog­gar om: , , , , , , , ,

Corporate