braincraft hat. Error when testing hat microphone

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

When trying to test the Hat microphone, I am getting this error:

sudo arecord -f cd -Dhw:1 | aplay -Dhw:1
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:1407: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: 4
BUFFER_TIME: (500045 500046)
BUFFER_SIZE: 22052
BUFFER_BYTES: 88208
TICK_TIME: 0
aplay: read_header:2839: read error

I am using a Raspberry Pi 4, 2GB, with Bullseye lite. The Hat earphone works well and both channels are functional, using Card1:

sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

Any help will be appreciated

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: braincraft hat. Error when testing hat microphone

Post by mikeysklar »

It looks as though you are doing everything correctly.

If you try to record to a file does that work?

If you try to then playback the file does that work?

Based on your previous error it was aplay failing so arecord should be working. Let's confirm.

Code: Select all

arecord -f cd -Dhw:1 -d 60 outfile.wav

Code: Select all

aplay -Dhw:1 output.wav

User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

Re: braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

Thank you very much for your reply. Unfortunately, it didn't work. And the strange thing is that now the card is #2. Here is the output from aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 2: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

Accordingly, I am using now card#2:

sudo arecord -f cd -Dhw:2 | aplay -Dhw:2
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:1407: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: 4
BUFFER_TIME: (500045 500046)
BUFFER_SIZE: 22052
BUFFER_BYTES: 88208
TICK_TIME: 0
aplay: read_header:2839: read error

(Same error)

With arecord to a file:
arecord -f cd -Dhw:2 -d 60 outfile.wav
Recording WAVE 'outfile.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:1407: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: 4
BUFFER_TIME: (500045 500046)
BUFFER_SIZE: 22052
BUFFER_BYTES: 88208
TICK_TIME: 0

I've tried to test the hat using Buster. The microphone, earphones, camera and display worked well, but couldn't get Tensor flow to install. I moved to Bullseye lite and can't get either the microphone or camera to work. Earphones and display do work. Incidentally, I double-checked that the switch is set to "on" .

Would it be possible that the installation instructions may not be up to date to the latest release of of Bullseye?

Thanks again,

Pedro

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: braincraft hat. Error when testing hat microphone

Post by mikeysklar »

I agree that something about Bullseye might have introduced an incompatibility. My guess would be related to the ALSA kernel driver itself. the set_params error that pops up is probably the clue to follow.

Did arecord without the pipe to aplay record a file?

Can you provide the output from these commands. I know the card hardware location might jump around so adapt as needed.

Code: Select all

arecord -D hw2 --dump-hw-params

Code: Select all

lsusb -v 

User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

Re: braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

Again, thank you for your help.

Incidentally, I don't think it's relevant, but I am running the commands through a ssh from a WSL Debian window using Windows 11.

Here is the output from both commands:

First command:

restrepo@BraincraftPi:~ $ arecord -D hw2 --dump-hw-params
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM hw2
arecord: main:830: audio open error: No such file or directory

Second command:
restrepo@BraincraftPi:~ $ lsusb -v

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
idProduct 0x0003 3.0 root hub
bcdDevice 5.15
iManufacturer 3 Linux 5.15.84-v7l+ xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:01:00.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x001f
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
BANNED 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
bMaxBurst 0

Bus 001 Device 004: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x045e Microsoft Corp.
idProduct 0x0040 Wheel Mouse Optical
bcdDevice 3.00
iManufacturer 1 Microsoft
iProduct 3 Microsoft 3-Button Mouse with IntelliEye(TM)
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
BANNED 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 72
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 10

Bus 001 Device 003: ID 413c:2105 Dell Computer Corp. Model L100 Keyboard
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x413c Dell Computer Corp.
idProduct 0x2105 Model L100 Keyboard
bcdDevice 3.50
iManufacturer 1 Dell
iProduct 2 Dell USB Keyboard
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
BANNED 70mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 5
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 65
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 24

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x2109 VIA Labs, Inc.
idProduct 0x3431 Hub
bcdDevice 4.21
iManufacturer 0
iProduct 1 USB2.0 Hub
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0019
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
BANNED 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 5.15
iManufacturer 3 Linux 5.15.84-v7l+ xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:01:00.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0019
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
BANNED 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12

User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

Re: braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

I don't understand why this is happening, but, it may be related: if I enable or disable the legacy camera, the card number for the microphone changes. Let me start with a fresh clean installation of bullseye, without dealing with the camera issues and report back.

User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

Re: braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

I installed Bullseye lite from scratch, and followed the instructions on https://learn.adafruit.com/running-tens ... tial-setup, which calls for installing the Bullseye 64 bit lite, because it notes that Tensorflow is not supported any longer on a 32 bit OS.

Both that page and this one:

https://learn.adafruit.com/adafruit-bra ... spberry-pi

deal with setting up the Braincraft hat. The second link, however, calls for installing the 32 bit OS.

I installed everything and verified that I have sound coming out of both right and left earphones.

The microphone still doesn't work.

Here is the output from the instructions you provided, but for Card#3 which is what my system now shows.
(I assume you meant hw:3 as opposed to hw3)

restrepo@Braincraft64:~ $ arecord -D hw:3 --dump-hw-params
Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:3":
--------------------
ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT: S16_LE S24_LE S32_LE
SUBFORMAT: STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 64]
CHANNELS: 2
RATE: [8000 48000]
PERIOD_TIME: (666 8192000]
PERIOD_SIZE: [32 65536]
PERIOD_BYTES: [256 524288]
PERIODS: [2 4096]
BUFFER_TIME: (1333 16384000]
BUFFER_SIZE: [64 131072]
BUFFER_BYTES: [256 524288]
TICK_TIME: ALL
--------------------
arecord: set_params:1343: Sample format non available
Available formats:
- S16_LE
- S24_LE
- S32_LE

============================ Second test=================

restrepo@Braincraft64:~ $ lsusb -v

Bus 002 Device 004: ID 054c:0baf Sony Corp. MRW-E90
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x054c Sony Corp.
idProduct 0x0baf
bcdDevice 0.01
iManufacturer 3 Sony
iProduct 4 MRW-E90
iSerial 5 318450301389
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x002c
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
BANNED 96mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 4
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 4

Bus 002 Device 003: ID 054c:0bae Sony Corp. MRW-E90
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x054c Sony Corp.
idProduct 0x0bae
bcdDevice 0.01
iManufacturer 1 Sony
iProduct 2 MRW-E90
iSerial 3 218490001976
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x002c
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
BANNED 96mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3

Bus 002 Device 002: ID 054c:0bad Sony Corp. MRW-E90
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x054c Sony Corp.
idProduct 0x0bad
bcdDevice 63.03
iManufacturer 1 Sony
iProduct 2 MRW-E90
iSerial 3 118450201328
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x001f
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
BANNED 144mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 19
Transfer Type Interrupt
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 8
bMaxBurst 0

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
idProduct 0x0003 3.0 root hub
bcdDevice 5.15
iManufacturer 3 Linux 5.15.84-v8+ xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:01:00.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x001f
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
BANNED 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
bMaxBurst 0

Bus 001 Device 006: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x045e Microsoft Corp.
idProduct 0x0040 Wheel Mouse Optical
bcdDevice 3.00
iManufacturer 1 Microsoft
iProduct 3 Microsoft 3-Button Mouse with IntelliEye(TM)
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
BANNED 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 72
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 10

Bus 001 Device 004: ID 413c:2105 Dell Computer Corp. Model L100 Keyboard
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x413c Dell Computer Corp.
idProduct 0x2105 Model L100 Keyboard
bcdDevice 3.50
iManufacturer 1 Dell
iProduct 2 Dell USB Keyboard
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
BANNED 70mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 5
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 65
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 24

Bus 001 Device 003: ID 054c:0bac Sony Corp. MRW-E90
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 2 TT per port
bMaxPacketSize0 64
idVendor 0x054c Sony Corp.
idProduct 0x0bac
bcdDevice 63.03
iManufacturer 1 Sony
iProduct 2 MRW-E90
iSerial 3 118450201328
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
BANNED 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 1 Single TT
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 2 TT per port
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x2109 VIA Labs, Inc.
idProduct 0x3431 Hub
bcdDevice 4.21
iManufacturer 0
iProduct 1 USB2.0 Hub
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0019
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
BANNED 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 5.15
iManufacturer 3 Linux 5.15.84-v8+ xhci-hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:01:00.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0019
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
BANNED 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: braincraft hat. Error when testing hat microphone

Post by mikeysklar »

With a fresh 64-bit Bullseye and new Card location what are you seeing when you try the original command?

Code: Select all

sudo arecord -f cd -Dhw:3 | aplay -Dhw:3

User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

Re: braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

No change: Speakers work, but testing the microphone still gives the same error:

restrepo@Braincraft64:~ $ sudo arecord -f cd -Dhw:3 |aplay -Dhw:3
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:1407: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: 4
BUFFER_TIME: (500045 500046)
BUFFER_SIZE: 22052
BUFFER_BYTES: 88208
TICK_TIME: 0
aplay: read_header:2839: read error

User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

Re: braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

For what's worth, I just tried with Buster and it works fine. So, it's not a hardware problem, but a software issue

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: braincraft hat. Error when testing hat microphone

Post by mikeysklar »

Thanks. Confirming everything works with Buster is helpful.

The set_params error is that is popping up in your arecord output looks like it is resolved with the HinTak/seeed-voicecard installation. Are you seeing any errors when you do this?

Code: Select all

cd ~
sudo apt-get install -y git
git clone https://github.com/HinTak/seeed-voicecard
cd seeed-voicecard
Use the default version that gets pulled down with the above commands don't do the git checkout to another version.

https://learn.adafruit.com/adafruit-bra ... udio-setup

User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

Re: braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

Here is the output. There were three error messages about linux-raspi, linux-headers-raspi and linux-image-raspi. I highlighted them in red.

restrepo@Braincraft64:~ $ sudo apt-get install -y git
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
git is already the newest version (1:2.30.2-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

restrepo@Braincraft64:~ $ git clone https://github.com/HinTak/seeed-voicecard
fatal: destination path 'seeed-voicecard' already exists and is not an empty directory.

restrepo@Braincraft64:~ $ ls
raspi-blinka.py seeed-voicecard

restrepo@Braincraft64:~ $ rm -rf seeed-voicecard/
restrepo@Braincraft64:~ $ git clone https://github.com/HinTak/seeed-voicecard

Cloning into 'seeed-voicecard'...
remote: Enumerating objects: 1356, done.
remote: Counting objects: 100% (380/380), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 1356 (delta 362), reused 361 (delta 354), pack-reused 976
Receiving objects: 100% (1356/1356), 1.16 MiB | 5.32 MiB/s, done.
Resolving deltas: 100% (894/894), done.

restrepo@Braincraft64:~ $ cd seeed-voicecard/
restrepo@Braincraft64:~/seeed-voicecard $ git checkout v5.9

Already on 'v5.9'
Your branch is up to date with 'origin/v5.9'.

restrepo@Braincraft64:~/seeed-voicecard $ sudo ./install.sh
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main armhf Packages [213 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main arm64 Packages [210 kB]
Get:7 http://security.debian.org/debian-security bullseye-security/main Translation-en [140 kB]
Get:8 http://archive.raspberrypi.org/debian bullseye/main arm64 Packages [302 kB]
Get:9 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [311 kB]
Fetched 1,291 kB in 2s (705 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
raspberrypi-kernel is already the newest version (1:1.20230106-1).
raspberrypi-kernel-headers is already the newest version (1:1.20230106-1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package linux-raspi
E: Unable to locate package linux-headers-raspi
E: Unable to locate package linux-image-raspi

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libasound2-plugins is already the newest version (1.2.2-2).
dkms is already the newest version (2.8.4-3).
git is already the newest version (1:2.30.2-1).
i2c-tools is already the newest version (4.2-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
grep: /boot/kernel.img: No such file or directory

gzip: stdin: unexpected end of file
grep: /boot/kernel.img: No such file or directory

gzip: stdin: unexpected end of file

------------------------------
Deleting module version: 0.3
completely from the DKMS tree.
------------------------------
Done.

Creating symlink /var/lib/dkms/seeed-voicecard/0.3/source ->
/usr/src/seeed-voicecard-0.3

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...
applying patch back-to-v5.8.diff...patching file ac108.c
patching file sound-compatible-4.18.h
patching file wm8960.c


Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.15.84-v8+ -C /lib/modules/5.15.84-v8+/build M=/var/lib/dkms/seeed-voicecard/0.3/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.84-v8+ (aarch64)
Consult /var/lib/dkms/seeed-voicecard/0.3/build/make.log for more information.
mkdir: cannot create directory ‘/etc/voicecard’: File exists
git init
Reinitialized existing Git repository in /etc/voicecard/.git/
git add --all
git commit -m "origin configures"
On branch master
nothing to commit, working tree clean
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Enjoy!
------------------------------------------------------

After rebooting:

restrepo@Braincraft64:~ $ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
restrepo@Braincraft64:~ $ alsamixer
restrepo@Braincraft64:~ $ speaker-test -c2

speaker-test 1.2.4

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 12000 to 18000
Period size range from 6000 to 6000
Using max buffer size 18000
Periods = 4
was set period_size = 6000
was set buffer_size = 18000
0 - Front Left
1 - Front Right
^CWrite error: -4,Interrupted system call
xrun_recovery failed: -4,Interrupted system call
Transfer failed: Interrupted system call

[NOTE: ^C to stop the speaker test. It worked well, with sound coming from both right and left sides]

restrepo@Braincraft64:~ $ sudo arecord -f cd -Dhw:3 | aplay -Dhw:3
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:1407: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: 4
BUFFER_TIME: (500045 500046)
BUFFER_SIZE: 22052
BUFFER_BYTES: 88208
TICK_TIME: 0
aplay: read_header:2839: read error

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: braincraft hat. Error when testing hat microphone

Post by mikeysklar »

Thank you for the detailed output of the install and run time errors. This is also quite valuable. The engineer who wrote this guide has been asked to assist with this issue.

User avatar
pjrestrepo
 
Posts: 49
Joined: Sun Apr 15, 2012 7:43 pm

Re: braincraft hat. Error when testing hat microphone

Post by pjrestrepo »

Thank you. Looking forward to the engineer's input.

Pedro

User avatar
MakerMelissa
 
Posts: 375
Joined: Wed Jun 05, 2013 2:10 am

Re: braincraft hat. Error when testing hat microphone

Post by MakerMelissa »

Hi, from what I understand, it says you are using Bullseye Lite in order to use this guide: https://learn.adafruit.com/running-tens ... berry-pi-4

However, I was only able to get everything working with the Desktop version (I believe getting Picamera 2 working in python was the major limiting factor and not the audio). Now it's totally possible an update from Raspberry Pi broke something (this wouldn't be the first time), so I'l do some testing with the audio on both desktop and lite to see if I run into issues as well.

Also, I believe the PiCamera folks fixed what wasn't working in the lite version since I updated the guide, so if we can get audio working, it should theoretically be possible to run it either way. I'l let you know what my results are and hopefully it will be something simple.

Melissa

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”