Thursday, October 2, 2014

pulse audio clicking/popping sounds

After a recent routine update , my audio streams had clicks /pops in it which did not seem to occur  synchronously  . After some investigation I figured out that the problem was with pulseaudio  timer based scheduling . This parameter is driver specific and may be required "on" on some sound cards. 


To turn timer-based scheduling off add tsched=0 in /etc/pulse/default.pa
After editing the above file , restart pulse audio  sudo service pulseaudio restart
  
This fixed my clicks and pops but introduced another glitch which i'm working on right now. Alsamixer is reset every time I play mplayer .. aaarrgh !!!

UPDATE :  That fix was irritating . Pulse is probably broken since the latest update  . The best thing to do is use JACK :) . jack can coexist with pulse and is lighter , more efficient and works great .

start it by using  " jackd -d alsa -r 44100 "   and to make mplayer use jack , just use vo=jack :)

Problem solved

Saturday, June 28, 2014

Multiple displays with xrandr

Do you have a LCD TV or a spare monitor ? You can use that extra screen size  to see more code  : ) or watch a movie.  It's easy to manage multiple displays in linux using xrandr. Install xrandr if you havent already . I use a trivial script to switch between my displays . Here it is :


 #!/bin/bash
# switch from VGA to LVDS ( xrandr )
#####################################

# set wall to the path of your wallpaper
frm=$1
wall="/full/path/wallpaper.jpg"

if [[ $frm -eq 1 ]]
then
        xrandr --output VGA1 --auto
        sleep 2
        xrandr --output LVDS1 --off
        fbsetbg $wall  
else
        xrandr --output VGA1 --off
        sleep 1
        xrandr --output LVDS1 --auto
        fbsetbg $wall
fi



use xrandr --query  to check which displays have been detected and change the names of the displays accordingly. Also , If you are using fluxbox then make sure that  it's compiled with xinerama support. It helps with the window geometries etc. when switching.  Use a keybinding in fluxbox to switch from  VGA (tv) and LVDS ( laptop) so that if there is a power cut , you wont have a switched off laptop screen ! .

Monday, March 24, 2014

Fixing the "Whiteout" for the samsung 21 inch TV

Samsung has a design flaw in their LCD TV's . The  flaw leads to something called a "whiteout" wherein the screen turns bright white and  nothing is displayed. The problem is a PCB situated on the top back of the panel . This PCB is covered by a metal cover with which it eventually shorts. Insulating The metal studs under the metal cover solves this issue! . Use insulating tape (electrical tape ) . Also Insulate under the PCB . Just in case .. Don't stick tape to PCB! .. just under PCB and over the metal studs touching the PCB .

JKturner has an excellent article on the same so I wont repeat the whole thing here . His  however is for the 32 '' TV. It's a good read for anyone attempting to solve the 21 inch but remember , on the 21, there is only one PCB at the top back of the panel (after you have removed the chassis housing the motherboard and SMPS).

An open TV chassis can be somewhat intimidating to some, so be brave but be gentle with the internal  connectors. BTW,  this became my first TV hack partly because I was too lazy to take it to the service center :P and partly because It appears that the service center folks misdiagnose it ( perhaps deliberately !) as a blown panel and charge the consumer for a new one ....  and the whole hack worked like a charm !! .

happy hacking