Sound is tricky because there are several layers that interact in
interesting ways: hardware, the USB layer, sound drivers, and the
transcoder software. I'd try to simplify: for instance, exclude the
transcoding layer by translating the files offline to a non-compressed
format, like .wav, and playing those. Now, the .wav files do have a
tradeoff: they don't require decoding, but they are larger, so they
may tax the mass storage bandwidth, so make sure to put them on the
fastest storage you have (presumably eMMC, or even a ramdisk). If the
.wav files play OK, then you'll know that the mpeg3 decode is to
blame. Othwerwise, it's down to examining other layers: e.g. trying a
different hardware sound card.

On Thu, Feb 9, 2017 at 9:55 AM, 'Ian Watts' via BeagleBoard
<beagleboard@googlegroups.com> wrote:
> Hi all,
>
> I'm still pretty new to my BBB / BBGW (I prefer the BBGW simply because of
> it's inbuilt wifi - real simple).
> So, I'm running on a SEED BeagleBone Green Wireless.
> with Debian / Linux 8 : 2016-06-14. The system is up to date - as of now.
> I'm running headless via wi-fi ssh on Terminal (Mac Sierra).
> and I'm trying to add sound playback of mp3 / wav files.
>
> So Far:
>
> I've installed / updated alsa and alsa-utils.
> I've plugged in a standard 10$ USB sound stick form EC Technology - some
> post suggest I get this one - I'm ambivalent as to the precise device but
> the smaller the better :
> https://www.amazon.co.uk/EC-Technology-Adapter-Window-above/dp/B012W70XH8/ref=sr_1_1?ie=UTF8&qid=1486650199&sr=8-1&keywords=EC-Technology+usb+sound+Adapter
> I'm also happy to switch to a new device if there is an even smaller /
> better / more readily hackable device available - but that's probably for
> another time - suggestions always welcome though !)
>
> I've used 'aplay -l' to confirm the USB device exists :
> card0:WILINK8_BT... device 0: WILIINK8 ...
>      Subdevices: 0/1
>      Subdevice #0: subdevice #0
> card1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
>      Subdevices: 0/1
>      Subdevice #0: subdevice #0
>
> I have reconfigured the alsa device file (/usr/share/alsa/alsa.conf) to
> direct audio to the USB card (defaults.ctl.card 1    and
> defaults.pcm.card 1) and not the BT module and I can hear pink noise
> (sound-test) from the connected USB Audio stick & speakers / headphones
> following an alsa restart / system reboot.
> I have installed mpg321 and, more recently, madplay.
> I have dumped some ripped mp3 music files into a 'Music' directory on
> uSDCard and can hear the output with :
> mpg321 -g 50 /media/uSDCard/Music/MyMusicTrack.mp3
>
> The sound that I hear appears to be 'clipped'. It is distorted and plays
> back too fast but with no increase in pitch etc. just like a broken / poor
> 'phone connection.
>
> Initially, I thought the problem may be with the track/file I had copied
> across & chosen to play, so selected another (no difference). Then I
> selected and left playing the whole folder (around 12 tracks) whilst I did
> some research.
> mpg321 -g 50 /media/uSDCard/Music/*
>
> Oddly enough, after a couple of tracks the sound was perfect and I listened
> to the rest of the selection (maybe 8 or 9 tracks in total) with some
> satisfaction. I also concluded (incorrectly) that the problem must have been
> with some of the files having been corrupted during the transfer process.
> However, when I decided to play the tracks again I note they are ALL
> suffering from the same clipped / broken / slightly too fast playback
> problem.
>
> I'm delighted to have gotten this far but... frustration... so near and yet
> so far...
>
> I have tried with powered speakers and with a simple headset... (no
> difference, remains distorted / clipped).
> I have tried with mpg321 and madplay... (no difference, remains distorted /
> clipped).
> Anyways, I'm now pretty sure this is a sampling mismatch / there will be
> some setting I've missed but, like my opening line said, I'm still pretty
> new to the BBB / BBGW and I'm unsure as to how to proceed - especially as
> I'm pretty nervous of taking too many retro-steps and 'playing' with far too
> little knowledge. I have googled and forum-ed this but find it confusing
> enough extracting relevant Wheezy / Jessie differences and trying to adapt
> Raspbian / Debian examples etc... anyways... I'm lost...
> Apologies for the length of this post but too much info is generally better
> than way too little... I hope...
> Thanks for reading, hope you can give me some pointers.
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/88a79ba0-5860-48ec-acbe-b1e1703b576b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAC%3D1GgHnR7H9VS4iRBOZJGaGsJ0Wcyq2qNi4OP4QOL3VBzkDJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to