Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to configure I2S microphone on RPi ZW #282

Closed
MakeSenseIoT opened this issue Sep 24, 2019 · 4 comments
Closed

how to configure I2S microphone on RPi ZW #282

MakeSenseIoT opened this issue Sep 24, 2019 · 4 comments

Comments

@MakeSenseIoT
Copy link

Hi,
I'm trying to do the audio streaming on RPi ZW as per example here https://www.linux-projects.org/uv4l/tutorials/rpi-webapp-screen-audio-keyboard-sharing/ .The I2S microphone works following the setup from here https://github.com/mano1979/Pesky-Products-ICS-43434
When I try your software, I have:
root@raspberrypi:# cava
Could not open pulseaudio mainloop to find default device name: 0
check if pulseaudio is running
root@raspberrypi:
#
root@raspberrypi:# arecord -l | grep CARD
root@raspberrypi:
# arecord -L | grep CARD
sysdefault:CARD=Loopback
front:CARD=Loopback,DEV=0
surround21:CARD=Loopback,DEV=0
surround40:CARD=Loopback,DEV=0
surround41:CARD=Loopback,DEV=0
surround50:CARD=Loopback,DEV=0
surround51:CARD=Loopback,DEV=0
surround71:CARD=Loopback,DEV=0
dmix:CARD=Loopback,DEV=0
dmix:CARD=Loopback,DEV=1
dsnoop:CARD=Loopback,DEV=0
dsnoop:CARD=Loopback,DEV=1
hw:CARD=Loopback,DEV=0
hw:CARD=Loopback,DEV=1
plughw:CARD=Loopback,DEV=0
plughw:CARD=Loopback,DEV=1
sysdefault:CARD=memsmic
dmix:CARD=memsmic,DEV=0
dsnoop:CARD=memsmic,DEV=0
hw:CARD=memsmic,DEV=0
plughw:CARD=memsmic,DEV=0
root@raspberrypi:~#

root@raspberrypi:# arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
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: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
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 2: memsmic [mems-mic], device 0: bcm2835-i2s-ics43432-hifi ics43432-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@raspberrypi:
#
Can you kindly help with a setup?
Cheers,
Jan

@karlstav
Copy link
Owner

you have setup cava to use pulseaudio, but you don't seem to have pulseaudio installed. change your config to use alsa instead.

@MakeSenseIoT
Copy link
Author

I have now:
root@RPi3AP:~/.config/cava# arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: memsmic [mems-mic], device 0: bcm2835-i2s-ics43432-hifi ics43432-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

root@RPi3AP:/.config/cava# arecord -L | grep CARD
default:CARD=memsmic
sysdefault:CARD=memsmic
dmix:CARD=memsmic,DEV=0
dsnoop:CARD=memsmic,DEV=0
hw:CARD=memsmic,DEV=0
plughw:CARD=memsmic,DEV=0
root@RPi3AP:
/.config/cava#

within config I put:

method = alsa
source = hw:1
; source = hw:Loopback,1

but I have a black screen.

Can you help? Sorry, I'm a newbie to Linux

cava

@MakeSenseIoT
Copy link
Author

I have it working, but only with a single channel (mono)
It seems to be a problem with i2s-mmap. I added dtoverlay=i2s-mmap in my /boot/config.txt and I use the following .asoundrc

pcm.mic_hw{
type hw
card memsmic
channels 2
format S32_LE
}
pcm.mic_mm{
type mmap_emul
slave.pcm mic_hw
}
pcm.mic_rt{
type route
slave.pcm mic_mm
ttable.0.0 1
ttable.0.1 0
ttable.1.0 1
ttable.1.1 0
}
pcm.mic_sv{
type softvol
slave.pcm mic_rt
control {
name "Boost Capture Volume"
card memsmic
}
min_dB -3.0
max_dB 50.0
}

Any idea how to fix it?

@karlstav
Copy link
Owner

karlstav commented Dec 7, 2019

something with the ttable probably, don't know. could be something with the mic...

@karlstav karlstav closed this as completed Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants