<div dir="ltr"><div>I am reading around that the garbled audio is a result of latency in the usb audio stream and it has something to do with the i/o packets or something like that, as per here:<br><br><a href="http://www.raspyfi.com/raspberry-pi-usb-audio-fix/">http://www.raspyfi.com/raspberry-pi-usb-audio-fix/</a><br><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 15, 2015 at 8:23 PM, Lou Crittenden <span dir="ltr"><<a href="mailto:loucrittenden63@gmail.com" target="_blank">loucrittenden63@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Good news on getting all the channels to work on my card: as per this how to located here: <a href="http://ubuntuforums.org/showthread.php?t=783222" target="_blank">http://ubuntuforums.org/showthread.php?t=783222</a><br><br></div>I had to create a .asoundrc file in my /root (or my home) directory with the following contents:<br><br><pre style="min-height:156px">pcm.!default {
    type route
    slave.pcm surround51
    slave.channels 6
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1
    ttable.0.5 0.5
    ttable.1.5 0.5
}<br><br>I then had to tell mplayer to use alsa as the main output as per instructions in this link:<br><a href="http://crunchbang.org/forums/viewtopic.php?pid=229427" target="_blank">http://crunchbang.org/forums/viewtopic.php?pid=229427</a><br><br>of course, I edited out the x11 stuff and others that are not relevant to my setup.<br><br>I still have the garbled audio on mplayer unless I use the -quiet option, unfortunately.<br></pre></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 7:23 PM, Lou Crittenden <span dir="ltr"><<a href="mailto:loucrittenden63@gmail.com" target="_blank">loucrittenden63@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Also tried loading songs on the sd card, but I have the same issue.<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 2, 2015 at 2:08 AM, Lou Crittenden <span dir="ltr"><<a href="mailto:loucrittenden63@gmail.com" target="_blank">loucrittenden63@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span><div>> Do you have audio distortions too in case of leds blinking etc.?<br>
> If no its definitely not a pure electric problem..., if yes try another<br>
> sound device...<br><br></div></span>No.<br></div>The garbled audio I showed happens only with the usb device on buildroot, but not on the raspbian image, whereas the noise happens on both the raspbian image and buildroot.<br><br>The clicks, whines, pops, hiss etc are noticeable in between songs or quiet passages of a song as background noise that is also present on the onboard audio of the Pi. The pi audio has it much worse, though<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 26, 2015 at 2:54 PM, Peter Seiderer <span dir="ltr"><<a href="mailto:ps.report@gmx.net" target="_blank">ps.report@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Lou,<br>
<span><br>
On Wed, Feb 25, 2015 at 07:53:01PM -0600, Lou Crittenden wrote:<br>
> >I was able to compile and run a rockbox version on RPi/buildroot, but still<br>
> > without audio file playing...<br>
><br>
> Awesome! Can I see it?<br>
<br>
</span>See buildroot patch at end of e-mail (very early, very hackisch version)...<br>
<span><br>
><br>
> I was able to run mplayer with no options in a terminal within the raspbian<br>
> image that came with my waveshare device and it didn't have a bit of<br>
> problems with the audio. It sounded great actually.<br>
><br>
<br>
</span>Do you have audio distortions too in case of leds blinking etc.?<br>
If no its definitely not a pure electric problem..., if yes try another<br>
sound device...<br>
<span><br>
> You're probably right on the resource part, and I believe the buildroot<br>
> kernel has a lot to do with it, but the raspbian kernel didn't have that<br>
> issue at all, but of course it just takes a long time to boot compared to<br>
> buildroot. I want to use the isolator to isolate the usb sound device from<br>
> the background zipper noises, pops, buzzes, whining, and other garbage from<br>
> the main computer board that happens when for example you are scrolling a<br>
> page or leds on the board blink.<br>
><br>
<br>
</span>Sounds strange...<br>
<span><br>
> I have included a sample of what I am running into as far as the audio.<br>
> This was with the commands:<br>
><br>
> # cd /media/usb0 (this thumbdrive is where my music is located)<br>
> # mplayer *<br>
><br>
> and with my usb sound device plugged in. It doesn't do that with the<br>
> onboard card, though (even though it sounds like poo, as I have heard it<br>
> was only 11-bit audio). When I'm running:<br>
><br>
> # mplayer -quiet *<br>
><br>
> it plays normally through the usb card even with other processes running,<br>
> but still doesn't sound near as good as either my ubuntu system or the<br>
> raspbian image.<br>
><br>
</span>> [-- Attachment #2: garbled mplayer no flags switching songs.mp3 --]<br>
> [-- Type: audio/mpeg, Encoding: base64, Size: 743K --]<br>
<br>
Strange, but I would suspect some kernel/driver problem, try to copy<br>
the sound files to the local filesystem, unplug your usb-memory and<br>
try with only the usb-soundcard attached (just guessing, not much<br>
help without hardware to test)...<br>
<br>
Try to find out the difference between raspbian and buildroot<br>
kernel version/config...<br>
<span><br>
> I also found out that the snd-usb-audio driver indeed does work with all of<br>
> the channels when I input the command<br>
><br>
> # speaker-test -Dplug:surround51 -c6<br>
><br>
> to test all of the speaker channels. The woman's voice came through on all<br>
> the appropriate channels, plus they are adjustable in alsamixer. I just<br>
> can't get mplayer to use them all when using alsa as the backend (I haven't<br>
> gotten pulseaudio to work in buildroot) and it outputs through the front<br>
> only. I have the same issue when using alsa as the backend on this card in<br>
> the raspbian image as well (but good sound) yet it uses the same<br>
> snd-usb-audio driver, same with my ubuntu system.<br>
><br>
> Would you recommend pulseaudio in my situation?<br>
><br>
<br>
</span>Should work with alsasound directly....but you can never know..., sorry I am<br>
no alsa-/pulse sound expert...<br>
<br>
Regards,<br>
Peter<br>
<div><div><br>
><br>
> On Wed, Feb 25, 2015 at 1:42 PM, Peter Seiderer <<a href="mailto:ps.report@gmx.net" target="_blank">ps.report@gmx.net</a>> wrote:<br>
><br>
> > Hello Lou,<br>
> ><br>
> > On Tue, Feb 24, 2015 at 05:58:45PM -0600, Lou Crittenden wrote:<br>
> > > Good news, I found a workaround to the garbled audio issue on use of<br>
> > > mplayer when using my USB card. What I have to do is pass the -quiet<br>
> > option<br>
> > > when running mplayer. For example: mplayer -quiet test.mp3. It turns out<br>
> > > that activity on the lcd screen was the culprit, and it interferes with<br>
> > the<br>
> > > audio and it ONLY does that when using the usb audio card. When no<br>
> > options<br>
> > > are passed, the display continually scrolls the time and whatnot of the<br>
> > > audio playback every millisecond.<br>
> > ><br>
> > > mpg123 has much less terminal activity, and thus doesn't have the issue.<br>
> > ><br>
> > > I was wondering if this is a power issue and if it would work if I used<br>
> > an<br>
> > > isolator that allowed the device to receive its own power independent of<br>
> > > the Raspberry Pi board? Something like this:<br>
> > ><br>
> > ><br>
> > <a href="http://www.ebay.com/itm/ADUM4160-USB-Isolator-Board-ADI-USB-Port-Isolator-Protection-/191303685123?pt=LH_DefaultDomain_0&hash=item2c8a969403" target="_blank">http://www.ebay.com/itm/ADUM4160-USB-Isolator-Board-ADI-USB-Port-Isolator-Protection-/191303685123?pt=LH_DefaultDomain_0&hash=item2c8a969403</a><br>
> > ><br>
> > > that electronically isolates the usb audio and power from the pi, but<br>
> > > allows the pi to talk to the device so the sound improves and improves<br>
> > > power stability.<br>
> > ><br>
> ><br>
> > Hard to tell without hearing a sample of what you describe as 'garbled<br>
> > audio',<br>
> > but I would less suspect a electrical/decouple problem, more suspect a pure<br>
> > resource problem of the mplayer aplication doing audio and display<br>
> > updates...<br>
> ><br>
> > Maybe you can stress mplayer -quiet and/or mpg123 doing some concurrent<br>
> > work/<br>
> > testbench running (e.g. untar a huge file (kernel source)), etc. and get<br>
> > the<br>
> > same audio defects?<br>
> ><br>
> > I was able to compile and run a rockbox version on RPi/buildroot, but still<br>
> > without audio file playing...<br>
> ><br>
> > Regards,<br>
> > Peter<br>
> ><br>
<br>
</div></div>---begin---<br>
>From 218e06519422ec6923ec0b6bb068bee65ef39e6e Mon Sep 17 00:00:00 2001<br>
From: Peter Seiderer <<a href="mailto:ps.report@gmx.net" target="_blank">ps.report@gmx.net</a>><br>
Date: Sat, 7 Feb 2015 14:53:17 +0100<br>
Subject: [PATCH] rockbox: new package (erly draft - hack version)<br>
<br>
<br>
diff --git a/package/Config.in b/package/Config.in<br>
index fe3d3d0..30eed47 100644<br>
--- a/package/Config.in<br>
+++ b/package/Config.in<br>
@@ -30,6 +30,7 @@ menu "Audio and video applications"<br>
        source "package/on2-8170-libs/Config.in"<br>
        source "package/opus-tools/Config.in"<br>
        source "package/pulseaudio/Config.in"<br>
+       source "package/rockbox/Config.in"<br>
        source "package/sox/Config.in"<br>
        source "package/tidsp-binaries/Config.in"<br>
        source "package/tstools/Config.in"<br>
diff --git a/package/rockbox/0001-hack-for-buildroot-compile.patch b/package/rockbox/0001-hack-for-buildroot-compile.patch<br>
new file mode 100644<br>
index 0000000..1e98854<br>
--- /dev/null<br>
+++ b/package/rockbox/0001-hack-for-buildroot-compile.patch<br>
@@ -0,0 +1,58 @@<br>
+diff --git a/tools/configure b/tools/configure<br>
+index 2dd1bf3..999dc6c 100755<br>
+--- a/tools/configure<br>
++++ b/tools/configure<br>
+@@ -158,6 +158,12 @@ findsdl(){<br>
+   files="${CROSS_COMPILE}sdl-config:sdl-config"<br>
+   winbuild="$1"<br>
+<br>
++  # check for overwrite via SDL_CONFIG<br>
++  if [ -n "${SDL_CONFIG}" ]; then<br>
++    echo ${SDL_CONFIG}<br>
++    return;<br>
++  fi<br>
++<br>
+   IFS=":"<br>
+   for file in $files<br>
+   do<br>
+@@ -327,6 +333,8 @@ simcc () {<br>
+<br>
+  sdl=`findsdl $winbuild`<br>
+<br>
++ echo "sdl = $sdl"<br>
++<br>
+  if [ -n `echo $app_type | grep "sdl"` ]; then<br>
+     if [ -z "$sdl" ]; then<br>
+         echo "configure didn't find sdl-config, which indicates that you"<br>
+@@ -416,6 +424,13 @@ EOF<br>
+ # the gcc version should most likely match what versions we build with<br>
+ # rockboxdev.sh<br>
+ #<br>
++buildroot () {<br>
++ prefixtools arm-buildroot-linux-gnueabi-<br>
++ GCCOPTS="$CCOPTS -mcpu=rm1176jzf-s"<br>
++ GCCOPTIMIZE="-fomit-frame-pointer"<br>
++ endian="little"<br>
++}<br>
++<br>
+ shcc () {<br>
+  prefixtools sh-elf-<br>
+  GCCOPTS="$CCOPTS -m1"<br>
+@@ -3391,6 +3406,7 @@ fi<br>
+     app_set_paths<br>
+     app_set_lcd_size<br>
+     memory=8<br>
++    buildroot<br>
+     uname=`uname`<br>
+     simcc "sdl-app"<br>
+     tool="cp "<br>
+@@ -4232,7 +4248,8 @@ if [ -z "$arch" ]; then<br>
+     elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then<br>
+         arch="arm"<br>
+         # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)<br>
+-        arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"<br>
++        # arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"<br>
++        arch_version="6"<br>
+     elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then<br>
+         arch="mips"<br>
+         arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep _MIPS_ARCH_MIPS | sed -e 's,.*\([0-9][0-9]\).*,\1,')"<br>
diff --git a/package/rockbox/Config.in b/package/rockbox/Config.in<br>
new file mode 100644<br>
index 0000000..837ed53<br>
--- /dev/null<br>
+++ b/package/rockbox/Config.in<br>
@@ -0,0 +1,6 @@<br>
+config BR2_PACKAGE_ROCKBOX<br>
+       bool "rockbox"<br>
+       help<br>
+         Rockbox is a free replacement firmware for digital music players.<br>
+<br>
+         <a href="http://www.rockbox.org/" target="_blank">http://www.rockbox.org/</a><br>
diff --git a/package/rockbox/<a href="http://rockbox.mk" target="_blank">rockbox.mk</a> b/package/rockbox/<a href="http://rockbox.mk" target="_blank">rockbox.mk</a><br>
new file mode 100644<br>
index 0000000..9731b54<br>
--- /dev/null<br>
+++ b/package/rockbox/<a href="http://rockbox.mk" target="_blank">rockbox.mk</a><br>
@@ -0,0 +1,40 @@<br>
+################################################################################<br>
+#<br>
+# rockbox<br>
+#<br>
+################################################################################<br>
+<br>
+ROCKBOX_VERSION = 8aa72f07f4bf38e9b898fb8d8042239861b9a423<br>
+ROCKBOX_SITE = git://<a href="http://git.rockbox.org/rockbox" target="_blank">git.rockbox.org/rockbox</a><br>
+# ToDo: check license and find the correct files<br>
+#ROCKBOX_LICENSE = GPLv2+<br>
+#ROCKBOX_LICENSE_FILES = COPYING COPYRIGHT<br>
+ROCKBOX_DEPENDENCIES = sdl alsa-lib<br>
+<br>
+# $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS)<br>
+<br>
+#      BUILDDIR=$(@D)<br>
+<br>
+define ROCKBOX_CONFIGURE_CMDS<br>
+       mkdir -p $(TARGET_DIR)/opt/rockbox<br>
+       cd $(@D); \<br>
+       CROSS_COMPILE=$(HOST_DIR)/usr/bin/arm-buildroot-linux-gnueabi- \<br>
+       SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config \<br>
+       tools/configure \<br>
+       --target=sdlapp \<br>
+       --lcdwidth=320 \<br>
+       --lcdheight=240 \<br>
+       --type=normal \<br>
+       --prefix=$(TARGET_DIR)/opt/rockbox<br>
+endef<br>
+<br>
+#      $(MAKE) -C $(@D) help<br>
+define ROCKBOX_BUILD_CMDS<br>
+       cd $(@D); $(MAKE)<br>
+endef<br>
+<br>
+#define ROCKBOX_INSTALL_TARGET_CMDS<br>
+#      $(MAKE) -C $(@D) fullinstall<br>
+#endef<br>
+<br>
+$(eval $(generic-package))<br>
<span><font color="#888888">--<br>
2.1.4<br>
---end---<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>