New install: Help with audio please

Forum for discussion about the Langstone Microwave Transceiver that shares some features with the Portsdown. Wiki: https://wiki.microwavers.org.uk/Langstone_Project
w0iy
Posts: 27
Joined: Sat Jul 04, 2020 2:38 am

New install: Help with audio please

Post by w0iy » Tue Aug 04, 2020 10:02 pm

I've got all new gear: pi4, 7" LCD, Pluto, ps. The pi and LCD are up and alive. I've done the Update & upgrade via wired network. I can SSH in ok.
When starting Langstone, the display shows the green virtual buttons at the bottom and nothing else.
Per debug doc from github, I do NOT have 3 jobs running, in fact none are running.
I manually start: python Lang_RX.py & this starts, but on SSH I see it griping about "alsa"

pi@raspberrypi:~/Langstone $ Warning: the blks2.selector block is deprecated.
gr::log :INFO: audio source - Audio sink arch: alsa
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
python: pcm.c:785: snd_pcm_nonblock: Assertion `pcm' failed.

I think this means it is unhappy with my audio IO. I have my standard Logitech headset and also an old fob which I think has CM108. I get the same errors with both. The headset is known good on other pc. The fob was brand new.

With the fob installed I get:

pi@raspberrypi:~/Langstone $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0603:2801 Novatek Microelectronics Corp.
Bus 001 Device 007: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
Bus 001 Device 008: ID 0456:b673 Analog Devices, Inc.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:~/Langstone $
so Linux sees the fob ok.

The fob LED is NOT blinking.
Pluto LED1= 2 flahses and repeats. Ready LED is on steady.

Any suggestions?

btw - Pluto is Rev B, just arrived from Mouser.

thanks for any advice
Barry w0iy

G8GKQ
Site Admin
Posts: 2812
Joined: Sun Mar 22, 2009 1:21 pm

Re: New install: Help with audio please

Post by G8GKQ » Tue Aug 04, 2020 10:12 pm

Barry

The Langstone is hard-wired to use this audio adapter https://wiki.microwavers.org.uk/Langsto ... io_Adapter

You would have to modify the code to work with your headset and CM108. It is very difficult to support multiple varieties of audio devices in Linux builds such as this.

The approved audio adapter costs less than a beer. Or you could modify the code.

Dave, G8GKQ

w0iy
Posts: 27
Joined: Sat Jul 04, 2020 2:38 am

Re: New install: Help with audio please

Post by w0iy » Tue Aug 04, 2020 10:15 pm

AH ha!
I do Allstar on pi's and we have lots of different audio interfaces. Linux works with them just fine. You have to make sure the vendor and device ID are in a file somewhere - which I can't recite.

As the "lsusb" shows, Linux already knows what the fob is. hmmm.... Can you point me to the spot/file in GNU Radio that has this hard coded?

Are the fobs available on ebay or ? A link would be great.

Thanks
Barry

G8GKQ
Site Admin
Posts: 2812
Joined: Sun Mar 22, 2009 1:21 pm

Re: New install: Help with audio please

Post by G8GKQ » Tue Aug 04, 2020 10:21 pm

Probably https://www.ebay.com/itm/External-USB-2 ... Swcv9esnHk, but you can never be sure with eBay....

Dave

g4eml
Posts: 688
Joined: Thu Apr 26, 2018 9:36 am

Re: New install: Help with audio please

Post by g4eml » Tue Aug 04, 2020 10:55 pm

The GNU Radio modules need the audio device to be hard coded.

You can edit the files Lang_TX.py and Lang_RX.py You will find the audio card is defined as

hw:CARD=Device, DEV=0

You will need to enter aplay -L and find the matching description for your device.
Use the appropriate hw: entry.

Some people have found their headsets are hw:CARD=set, DEV=0


Colin G4EML

w0iy
Posts: 27
Joined: Sat Jul 04, 2020 2:38 am

Re: New install: Help with audio please

Post by w0iy » Wed Aug 05, 2020 2:30 am

I tried aplay -L with the USB headset plugged in and I get:

pi@raspberrypi:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
output
input
sysdefault:CARD=Headphones
bcm2835 Headphones, bcm2835 Headphones
Default Audio Device
dmix:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct sample mixing device
dsnoop:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct sample snooping device
hw:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct hardware device without any conversions
plughw:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Hardware device with all software conversions
sysdefault:CARD=H540
Logitech USB Headset H540, USB Audio
Default Audio Device
front:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
Front speakers
surround21:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
Direct sample mixing device
dsnoop:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
Direct sample snooping device
hw:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
Direct hardware device without any conversions
plughw:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
Hardware device with all software conversions
pi@raspberrypi:~ $


Based on this--> hw:CARD=H540,DEV=0
Logitech USB Headset H540, USB Audio
Direct hardware device without any conversions

In Lang_RX.py I set hw:CARD=H540,DEV=0 (also made the same change in Lang_tx.py)
This lets the program come to life, but still no audio

DL5BCA
Posts: 158
Joined: Tue Jun 30, 2020 11:59 am

Re: New install: Help with audio please

Post by DL5BCA » Wed Aug 05, 2020 9:26 am

Hallo Berry,

i took this one:https://www.rasppishop.de/USB-Soundkarte-Soundadapter

73 Thomas DL5BCA
73 Thomas
DL5BCA

G8GKQ
Site Admin
Posts: 2812
Joined: Sun Mar 22, 2009 1:21 pm

Re: New install: Help with audio please

Post by G8GKQ » Wed Aug 05, 2020 10:06 am

Hi Barry

You may need to change the sample rate for the Logitech headset from 48000 to something else (32000?). I have expanded the guidance on the Wiki https://wiki.microwavers.org.uk/Langsto ... io_Adapter based on Colin's advice.

Edit - Colin advises that only devices with a sample rate of 48000 will work, so if your headset does not support this, it is not compatible

Dave

g4eml
Posts: 688
Joined: Thu Apr 26, 2018 9:36 am

Re: New install: Help with audio please

Post by g4eml » Wed Aug 05, 2020 10:19 am

Dave, You can’t simply change the sample rate for the audio card, it must be 48000. This is because GNU Radio needs to maintain the correct sample rate throughout the whole flow graph. Changing the sample rate of the audio device would require all the other blocks to be adjusted to match.

If the device does not support the 48000 sample rate then it is not going to work.

Colin.

g0mjw
Posts: 2349
Joined: Sat Sep 20, 2014 9:15 am

Re: New install: Help with audio please

Post by g0mjw » Wed Aug 05, 2020 12:17 pm

I suppose a rational resampler at the input could compensate for this, but better people read and follow the standard guidance unless they know what they are doing and how to fix it.

Mike

Post Reply

Return to “The Langstone Microwave Transceiver”