Blog de Stéphane Berthelot

Fan d’opensource, de technologies et d’autres choses palpitantes…
Icône RSS Icône Accueil
  • Layer break for DVD+R DL with growisofs / dvd+rw-tools

    Posté le 11th septembre 2009 sberthelot Pas de commentaires

    I’ve started recently to play around with DVD+R DL because they start becoming cheaper and some applications really need them :)

    I was very surprised that the current version of growisofs / dvd+rw-tools (7.1) advertises layer break position setting support but in reality I couldn’t get it to break where I want.

    Looking at the code (especially from growisofs_mmc.cpp) I found very strange that the “-use-the-force-luke=break:NNNN” option wasn’t really used either in calculations or cuesheet sending.

    Investigating a little bit more in the code I produced the following patch that I have sent upstream to get it included somehow in the next version.

    It allows a user (who should be careful of what it does :) ) to manually force a layer break position for DVD+R DL burning. (For those of you who haven’t had this problem yet please notice that : DVD-R DL (minus) DO NOT allow layer position to be changed, that said you should know what to do … only DVD+R DL (plus) allow that)

    For this patch to work you have to specify “-dvd-compat” on the command line, otherwise the cuesheet sending code is not called (I didn’t understand exactly why…) and the layer break wouldn’t be set …

    In any case the output of growisofs command should tell you where the layer break is going to be set.

    I’ve tested it succesfully for a dozen of DL burns with or without layer break so it should be safe enough (the patch is not very intrusive anyways ; I also tested without the option to see if the normal behavior was preserved…)

    Use it this way :

    growisofs -dvd-compat [your other options here] -use-the-force-luke=break:XXXX [where XXXX is the layer break in sectors] -Z /dev/[your device]=[image.iso]

    for example :) :

    growisofs -dvd-compat -use-the-force-luke=break:2084960 -use-the-force-luke=dao -Z /dev/sr0=/home/johndoe/m.iso

    note the dao option usage that will close the session, otherwise the disc would remain “open” if it’s not full and depending on what you burn you’d really want to close the session trust me :)

    Have an happy dual layer with positionned break burning !

    Attachment : dvd+rw-tools-7.1-layerbreaksetup.patch

    Note: use a command similar to apply (change to -p 1 depending on where you are) :

    patch -p 0 < dvdrw-tools-7.1-layerbreaksetup.patch

  • Getting rid of Computrace on Dell Inspiron mini 10v (Inspiron 1011)

    Posté le 8th septembre 2009 sberthelot 1 commentaire

    Today I just received my very small and not so shiny Dell Inspiron mini 10v (1011 model). I will possibly make a review later if there is enough popular demand :)

    Playing with the BIOS I activated “Computrace” to see what it means, thinking that it was some sort of TPM module. What a mess !! I didn’t pay attention at all that this setting could not be changed later… or could it ? :)

    Do the following at your own risk of course …

    I grabbed a bootdisk (floppy image) with Dell utilities on it (especially ASSET.COM and EE-VALUE.EXE)

    (Google is your friend, don’t even try to ask about any non-opensource download here…)

    After some fight with those utilities I finally found how to change Service Tag and Asset Tag from my small laptop. I read posts on different forums that it should be enough to reset Computrace but it wasn’t …

    So to change Service Tag use

    ASSET /S /D (to delete and set it up again in the BIOS menu) or

    ASSET /S NEWTAG

    Depending on asset version it should work flawlessly, I tried ASSET_A209.EXE and it didn’t work for me (an old version did)

    Use similar commands without /S to change Asset Tag.

    But the trickiest part was to deactivate the damn Computrace module in BIOS.

    This time we would use EE-VALUE that allows to set a value directly on the BIOS NVRAM (not sure about CMOS of NVRAM but anyways…) and looking at different values I finally found (using EE-VALUE /D to display contents) that there was a strange value at offset 0×50.

    Using

    EE-VALUE /W=50,FF

    will reset it to default and then you will be able to select or disable it again.

    If you have any doubt or if you have a different laptop check first with

    EE-VALUE /D

    and try to find any “03″ (activated) or strange value around 0×50.

    Very strong protection from Absolute Software guys ! It takes seconds to remove once your laptop has been stolen, very efficient …

    I had this error for a long time before discovering I could do it directly with EE-VALUE so I put it here for indexing purposes :

    SVCTAG.EXE version 3.3

    I told you what I am. But what are you?

    EE-CPB.exe: Error 0

    Now, then I’m going back to my fresh Slackware 13.0 install again. Thanks for reading and I hope this will help people with Dell laptop to manage their “Computrace” settings like they want.

  • Dolby Digital ou DTS en HDMI ? Non répondent Sharp et Samsung !

    Posté le 28th juillet 2009 sberthelot 1 commentaire

    Un petit coup de gueule une fois n’est pas coutume contre les fabricants de téléviseurs LCD, en particulier de TV HD avec entrées HDMI.

    Après plusieurs échanges ressemblant à un dialogue de sourd et quelques tests chez des amis (merci Jérôme !) je viens de m’apercevoir que la plupart des téléviseurs du marché ne supportent pas de faire transiter le son HDMI vers la sortie optique numérique, un comble !!

    Alors, me direz-vous quel intérêt de mettre tout en numérique, en particulier via le sacro-saint câble HDMI qui est censé remplacer tous nos anciens câbles et passer tout en numérique multi-canaux y compris le son ? Et bien Sharp et a priori Samsung répondent : aucun ! Je sens que je me suis bien fait entuber sur ce coup-là pour rester poli …

    Petit résumé : j’achète un Acer Revo, un peu galère sous Linux mais le bestiau s’en sort bien surtout grâce à son NVIDIA Ion et le VDPAU, l’Atom lui est franchement à la ramasse, la compil du kernel m’a laissé le temps de boire une boisson, manger une pizza, regarder Nolife et revenir pour constater qu’il avait fait 50%du boulot à peine … Malgré tout cela, content de ce matériel qui ne contient qu’une sortie HDMI en guise de sortie numérique, le son passant dedans en numérique, je le relie à ma TV Sharp LCD 52X20E en pensant naturellement faire sortir le son par la sortie optique de là-dite télévision vers mon vieillissant ampli 5.1 (qui fait tout de même DD et DTS, c’est déjà bien). Mais oh! surprise! le son ne sort qu’en PCM stéréo…

    Après quelques débats sur les mailings-lists côté ALSA (où il traine des gens très sympathiques !) on me file un coup de main pour au final constater que tout se passe bien côté ALSA et côté Revo mais c’est la TV qui boude et ne transmet pas le magique flux DD (ou DTS) vers mon ampli ; encore pire elle décode le flux et l’envoie en PCM stéréo comme si de rien n’était !!

    J’ai donc acheté un boitier externe pour récupérer mon flux audio du HDMI et le sortir sur un optique (ou coaxial au choix) et tout cela parce que Monsieur Acer a un tout petit peu oublié de faire une sortie numérique audio séparée (mais comme le HDMI promet monts et merveilles on ne lui en veut pas trop) mais surtout que Sharp NE FAIT PAS SON BOULOT, car après avoir jetté quelques coups d’oeil dans le code GPL fourni sur leur site, il semble y avoir des bribes de code pour le faire ! (eh oui Monsieur Sharp utilise Linux dans ses télés mais ne sait apparemment pas bien le faire fonctionner ; j’ai plus que quelques notions côté Linux donc note pour M. Sharp : ne pas prendre tous ses consommateurs pour des blaireaux …)

    Et la cerise sur le gâteau, ce pour quoi je m’épanche via ce post : un mail reçu ce jour du service technique (qui doit en avoir marre qu’on lui demande de faire marcher correctement ses produits achetés relativement cher, quelle demande inconvenante! …) me remballe directement avec un “Il n’est pas prévu de mise à jour pour un tel fonctionnement, ce n’est pas un souci de compatibilité [...] Le rôle du téléviseur est surtout d’afficher une image, la sortie optique est dédiée pour le son de la TNT” ; comprenez, on a affiché des tas de logos Dolby Digital machin ++ etc. etc. partout et on est même pas foutus de faire sortir autre chose que du PCM stéréo sauf pour le DVB-T par la sortie optique… Car oui le DVB-T (appelé TNT chez nous) marche bien en DD ou DTS sur la sortie optique … un comble !

    Enfin voilà, à quoi j’en suis réduit, si toi lecteur, tu souhaites acheter une TV LCD Sharp ou Samsung, pense déjà à rajouter à ton budget l’achat d’un nouvel ampli HDMI, ce qui gonfle assez largement le budget à l’heure actuelle ou à peut-être envisager une “vraie” marque avec une électronique bien programmée qui elle, renvoie le son numérique multicanaux via ses sorties numériques audio …

    Je ne suis pas prêt de racheter du matériel Sharp !!! A bon entendeur …

  • SIP Fax detection with Asterisk 1.6.2.0

    Posté le 15th mai 2009 sberthelot 5 commentaires

    Here it goes again, still the same problems for detecting voice based fax calls on Asterisk 1.6.

    I know that “we should use T38″ or “get a decent SIP provider” are all along the way but hey! I’m using Free with it’s freephonie service in France and we’re even getting multiple ADSL connections (from different companies that are in the same building) and bridged them together to an Asterisk server.

    It’s very handy, we get SIP trunking for a very small fee : free :) but in fact it’s in a whole package for 30€ per month : ADSL2+, Free telephony, HD TV (tax included)

    So, I wanted to post about the recent “patch” I prepared after upgrading to Asterisk 1.6.2.0-beta2.

    Why upgrade to a beta version ? Simple, since there was advertised Fax detection support for T38 (which should work, I didn’t test since I don’t have a decent provider with T38 support ;) ).

    Looking at the chan_sip.c code I figured out it was very easy to tweak the fax detection code to also do detection on SIP audio channels,but … I was plain wrong ! In fact it could have worked but it’s much more difficult than it seems. To make a long story short, I looked more deeply at the NV Faxdetect applications (from Justin Newman) and in fact they use a similar approach that the one I finally got through : use Asterisk DSP to actually do the detection and then branch on the dialplan to “fax” extension (code already done in 1.6.2 for T38 only).

    Removing specific T38 tests I almost got through after spending 3 hours to finally get to a point that was very near NV Faxdetect : I first had to switch to slinear before using DSP (or it wouldn’t detect faxes at all, if someone knows why please tell me :) ) and then switch back to alaw or ulaw (what came first) to get the call through.

    Seing that I needed to patch chan_sip.c alot with very dirty hacks I finally decided to go back on app_nv_faxdetect.c and app_nv_backgrounddetect.c and simply patch them (with very little effort surprisingly) and got them to work perfectly with Asterisk 1.6.2.0-beta2 (the patch should certainly apply to later 1.6.2.x version relatively cleanly, just make sure to apply it on vanilla sources *before* ./configure and make menuselect ; issue a make distclean if you didn’t)

    I remembered I used to leave some mails to Justin, asking me to wait for a new version to come out and many people on http://www.voip-info.org seemed to have tried to patch it (or at least asked to) and noone managed to get a working version for 1.6.x.

    Here it goes, but I’m very surprised I had to change very little portions of code (nothing really important, only definition and variable name changes) and everything has been working very well here for more than 2 weeks, with more than a dozen faxes correctly detected.

    If you need to, leave me a comment since I started to test at home (yes I also have an Asterisk box at home ;) ) and I patched a version for Asterisk 1.6.1.0 that compiled and worked flawlessly.

    Be sure to grab the patch attached here and enjoy your fax detection on voice part of SIP channels :)

    asterisk-1620-beta2-faxdetect.diff

    See you for other Asterisk weirdnesses, I have some more to post !!

  • Bonjour à tous et bienvenue sur mon blog !

    Posté le 15th mai 2009 sberthelot Pas de commentaires

    Je n’ai pas encore trop l’habitude de cet exercice même si certains m’ont déjà vu bloguer dans d’autres univers :)

    Je compte sur vous pour m’aider en laissant des commentaires et j’espère que ce contenu sera aussi amusant qu’instructif.

    Vous y trouverez certainement des billets légers et courts sur des coups de gueule, sur l’actualité par exemple aussi bien de que des billets certainement plus longs sur des explications techniques, détails (voire même patchs) de logiciels en particulier Open Source qui parfois ont besoin d’un petit coup de pouce pour faire ce qu’on attend d’eux.

    Bien entendu certains billets seront dans la langue de Molière et d’autres dans celle de Shakespeare, afin de toucher le plus grand nombre, si certains articles sont très populaire je pourrai même peut-être les proposer dans les 2 langues…

    Allez je ne vais pas m’éterniser déjà, j’aurai le temps de le faire dans d’autres billets, bonne lecture !