diff -rupN squeezeplay-clean/src/Makefile.linux squeezeplay/src/Makefile.linux
--- squeezeplay-clean/src/Makefile.linux	2012-06-14 14:50:54.000000000 +0100
+++ squeezeplay/src/Makefile.linux	2014-01-28 10:29:26.000000000 +0000
@@ -7,7 +7,7 @@
 # Absolute path to top of SQUEEZEPLAY directories
 #
 
-SRC_DIR = $(realpath ${PWD})
+SRC_DIR = $(realpath $(shell pwd))
 BASE_DIR = $(dir ${SRC_DIR})
 
 export BUILD_TOP=$(BASE_DIR)/build/linux
@@ -143,7 +143,7 @@ luafilesystem:
 	cd luafilesystem-1.2 && make install PREFIX=${PREFIX} PLATFORM=linux
 
 luaprofiler:
-	cd luaprofiler-2.0 && make -f Makefile.linux install
+	cd luaprofiler-2.0 && LD="gcc -shared" make -f Makefile.linux install
 
 # just compile the library for to tolua++
 .PHONY: tolua++
diff -rupN squeezeplay-clean/src/squeezeplay/src/audio/decode/decode_alsa_backend.c squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa_backend.c
--- squeezeplay-clean/src/squeezeplay/src/audio/decode/decode_alsa_backend.c	2012-06-14 14:49:56.000000000 +0100
+++ squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa_backend.c	2014-01-28 10:29:31.000000000 +0000
@@ -118,6 +118,8 @@ struct decode_alsa {
 	snd_pcm_t *capture_pcm;
 	snd_pcm_format_t format;
 	snd_pcm_sframes_t period_size;
+	/* used for buggy ALSA driver/pcm_avail_update check */
+	snd_pcm_sframes_t buffer_size;
 
 	/* alsa control state */
 	snd_hctl_t *hctl;
@@ -651,6 +653,13 @@ static int _pcm_open(struct decode_alsa 
 	}
 	state->period_size = size;
 
+	/* retrieve buffer size for buggy ALSA driver/pcm_avail_update check */
+	if ((err = snd_pcm_hw_params_get_buffer_size(hw_params, &size)) < 0) {
+		LOG_ERROR("Unable to get buffer size: %s", snd_strerror(err));
+		return err;
+	}
+	state->buffer_size = size;
+
 	/* iec958 control for playback device only */
 	if (!(state->flags & FLAG_STREAM_PLAYBACK) || mode != SND_PCM_STREAM_PLAYBACK) {
 		goto skip_iec958;	  
@@ -882,6 +891,34 @@ static void *audio_thread_execute(void *
 			continue;
 		}
 
+		/*
+			A fix for 'Sound disappears after running Squeezeplay for a few
+			hours'.
+
+			Some (buggy) ALSA drivers will occasionally return an
+			exceptionally large value from snd_pcm_avail_update, associated
+			with loss of sound.
+
+			The characteristic 'signature' is a long delay in reproducing
+			sound, emerging 5 hours or more after Squeezeplay has been
+			running.
+
+			Reopening the ALSA device appears to restore normal audio output.
+
+			Detection of the condition is straightforward: the number of
+			available frames should never exceed the total number of frames in
+			the buffer. At that point we simply re-open the device.
+
+		*/
+
+		if (avail > state->buffer_size) {
+			LOG_WARN( "snd_pcm_avail_update returned %#lx frames, but buffer "
+			          "size is only %#lx frames. Re-opening pcm device.",
+			          avail, state->buffer_size);
+			do_open = 1;
+			continue;
+		}
+
 		/* this is needed to ensure the sound works on resume */
 		if (( err = snd_pcm_status(state->pcm, status)) < 0) {
 			LOG_ERROR("snd_pcm_status err=%d", err);
diff -rupN squeezeplay-clean/src/squeezeplay/src/audio/decode/decode_pcm.c squeezeplay/src/squeezeplay/src/audio/decode/decode_pcm.c
--- squeezeplay-clean/src/squeezeplay/src/audio/decode/decode_pcm.c	2012-06-14 14:49:56.000000000 +0100
+++ squeezeplay/src/squeezeplay/src/audio/decode/decode_pcm.c	2014-01-28 10:29:19.000000000 +0000
@@ -1,7 +1,7 @@
 /*
 ** Copyright 2007-2008 Logitech. All Rights Reserved.
 **
-** This file is licensed under BSD. Please see the LICENSE file for details.
+** This file is licensed under BSD. Please see the LICENSE file for details.
 */
 
 #include "common.h"
@@ -27,7 +27,7 @@ struct decode_pcm {
 
 /* Indexed by pcm_sample_rate. Sample rate in Hz. */
 static u32_t pcm_sample_rates[] = {
-	11025, 22050, 32000, 44100, 48000, 8000, 12000, 16000, 24000, 96000, 88200
+	11025, 22050, 32000, 44100, 48000, 8000, 12000, 16000, 24000, 96000, 88200, 176400, 192000
 };
 
 
@@ -38,7 +38,7 @@ static u32_t pcm_sample_widths[] = {
 
 
 static sample_t pcm_read8bit(u8_t *pos) { 
-	// 8 bit wav stores samples as unsigned char
+	// 8 bit wav stores samples as unsigned char
 	return (sample_t) ((((u8_t)*pos) - 128) << 24);
 }
 
diff -rupN squeezeplay-clean/src/squeezeplay/src/ui/jive_framework.c squeezeplay/src/squeezeplay/src/ui/jive_framework.c
--- squeezeplay-clean/src/squeezeplay/src/ui/jive_framework.c	2012-06-14 14:49:57.000000000 +0100
+++ squeezeplay/src/squeezeplay/src/ui/jive_framework.c	2014-01-28 10:29:37.000000000 +0000
@@ -1072,7 +1072,7 @@ static int process_event(lua_State *L, S
 
 		/* show mouse cursor */
 		if (pointer_timeout == 0) {
-			SDL_ShowCursor(SDL_ENABLE);
+			SDL_ShowCursor(SDL_DISABLE);
 		}
 		pointer_timeout = now + POINTER_TIMEOUT;
 
diff -rupN squeezeplay-clean/src/squeezeplay/src/ui/jive_surface.c squeezeplay/src/squeezeplay/src/ui/jive_surface.c
--- squeezeplay-clean/src/squeezeplay/src/ui/jive_surface.c	2012-06-14 14:49:57.000000000 +0100
+++ squeezeplay/src/squeezeplay/src/ui/jive_surface.c	2014-01-28 10:29:41.000000000 +0000
@@ -840,7 +840,7 @@ JiveSurface *jive_surface_set_video_mode
 	    flags = SDL_FULLSCREEN;
 	}
 	else {
-	    flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_RESIZABLE;
+	    flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_NOFRAME;
 	}
 
 	sdl = SDL_GetVideoSurface();
@@ -852,7 +852,7 @@ JiveSurface *jive_surface_set_video_mode
 		/* check if we can reuse the existing suface? */
 		video_info = SDL_GetVideoInfo();
 		if (video_info->wm_available) {
-			mask = (SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_RESIZABLE);
+			mask = (SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_NOFRAME);
 		}
 		else {
 			mask = (SDL_HWSURFACE | SDL_DOUBLEBUF);
