Monday, March 11, 2019

Fwd: ssh pi

Remember to try this tip to get Rasbian running headless.

it says:
Once you've burned/etched the Raspbian image onto the microSD card, connect the card to your working PC and you'll see the card being mounted as "boot". Inside this "boot" directory, you need to make 2 new files. You can create the files using Atom code editor.

Step 1: Create an empty file. You can use Notepad on Windows or TextEdit to do so by creating a new file. Just name the file ssh. Save that empty file and dump it into boot partition (microSD).

Step 2: Create another file name wpa_supplicant.conf . This time you need to write a few lines of text for this file. For this file, you need to use the FULL VERSION of wpa_supplicant.conf. Meaning you must have the 3 lines of data namely country, ctrl_interface and update_config


Sunday, March 10, 2019

audio thru USB device

audio thru USB device

make sure user is in "audio" group

uppercase L to list devices, then aplay to play to device

peter@smallfry:/mnt/Music/Music/iTunes/iTunes Music/Deacon Blue/Raintown $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions
default:CARD=UA1A
    EDIROL UA-1A, USB Audio
    Default Audio Device
sysdefault:CARD=UA1A
    EDIROL UA-1A, USB Audio
    Default Audio Device
front:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    Front speakers
surround21:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    Direct sample mixing device
dsnoop:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    Direct sample snooping device
hw:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    Direct hardware device without any conversions
plughw:CARD=UA1A,DEV=0
    EDIROL UA-1A, USB Audio
    Hardware device with all software conversions
peter@smallfry:/mnt/Music/Music/iTunes/iTunes Music/Deacon Blue/Raintown $ aplay -D "hw:CARD=UA1A,DEV=0" "../../../iTunes Music/Soup Dragons/Unknown Album/I'm Free.wav"


Playing WAVE '../../../iTunes Music/Soup Dragons/Unknown Album/I'm Free.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo


ffmpeg to convert to PCM and pipe to aplay

ffmpeg -i 01\ Peter\ and\ the\ Wolf.m4a  -f wav pipe:1 | aplay -D "hw:CARD=UA1A,DEV=0" -


curl http://bbcmedia.ic.llnwd.net/stream/bbcmedia_6music_mf_q | ffmpeg -i - -f wav pipe:1 | aplay -D "hw:CARD=UA1A,DEV=0" -

or one pipe less

ffmpeg -i http://bbcmedia.ic.llnwd.net/stream/bbcmedia_6music_mf_p -f wav pipe:1 | aplay -D "hw:CARD=UA1A,DEV=0" -