Ideas to make Jack detect a tablet's microphone connected via USB (and present in Pulseaudio)? [ SOLVED ]

This section is dedicated to applications and configurations for the Google Android OS.

Moderators: MattKingUSA, khz

User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Ideas to make Jack detect a tablet's microphone connected via USB (and present in Pulseaudio)?

Post by LAM »

Nachei wrote: Sat Dec 30, 2023 4:45 pm

@Bluebell

Thank you for this other great suggestion... Unfortunately, with arecord -l I only get

Code: Select all

**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

This doesn't seem to me like something USB connected, but rather my broken built-in laptop mic....

However, one of the many things I found in Internet and tried without understanding too much:

Code: Select all

pacmd list-sources | grep -e 'index:' -e device.string -e 'name:'

gives

Code: Select all

    index: 1
	name: <alsa_output.pci-0000_00_1f.3.analog-stereo.monitor>
		device.string = "0"
    index: 2
	name: <alsa_input.pci-0000_00_1f.3.analog-stereo>
		device.string = "front:0"
    index: 3
	name: <android>
		device.string = "/tmp/audiosource"
    index: 4
	name: <jack_out.monitor>
  * index: 5
	name: <jack_in>

Therefore the tablet gets detected by Pulseaudio (as index: 3, android)... but not as a hardware connection? Any idea why this might be? Hardware detection is another area where my knowledge is very patchy...

Thank you everybody for the great answers... Even if I don't finally get to solve this, Pulseaudio and Jack have stopped being the dark mystery they used to be for me...

There is no alsa device that you can use with alsa_in/zita, but a fifo sent from your tablet to your PC in PulseAudio.

My solution could work in theory (I haven't tested audiosource on my PC, but as long it's in the PA sources it should work??). At least it's worth trying, because if it works, it does exactly what you are looking for.

Before running my script set your tablet Mic/FIFO source as default source in pavucontrol or with

Code: Select all

pactl set-default-source android

in mix, nobody can hear your screen

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: Ideas to make Jack detect a tablet's microphone connected via USB (and present in Pulseaudio)?

Post by Impostor »

Nachei wrote: Sat Dec 30, 2023 4:27 pm

When I tap on the tablet's mic, the levels of "Unix FIFO Source /tmp/audiosource" move, but the levels on "Monitor of Jack Sink" do nothing (and neither do in Output devices > Jack Sink). Shouldn't those levels be moving too with the taps, given that the sink receives the tablet mic's output?

Maybe there's a selectable output setting on pavucontrol's playback tab for audiosource?

User avatar
erlkönig
Established Member
Posts: 210
Joined: Tue May 31, 2022 8:58 am
Has thanked: 42 times
Been thanked: 48 times

Re: Ideas to make Jack detect a tablet's microphone connected via USB (and present in Pulseaudio)?

Post by erlkönig »

Nachei wrote: Sat Dec 30, 2023 4:36 pm

@erlkönig

Thank you for the idea, udev is something I've hardly used and I've always been curious to harness more its power... Perhaps your suggestion is more of the "stage 2" kind, "once you have it working, optimize it"... I'm still at stage 1 I'm afraid, trying to have something that works... :)

You're absolutely right, you should consider udev, when you have a scriptable solution.

Currently working with
https://www.honeysuckers.rocks/?lang=en
Fiddling with sequencers does not evolve into music necessarily and Mac users have smelly feet and guzzle little children.

Nachei
Established Member
Posts: 235
Joined: Fri Feb 17, 2012 3:32 am
Has thanked: 6 times
Been thanked: 27 times
Contact:

Re: Ideas to make Jack detect a tablet's microphone connected via USB (and present in Pulseaudio)?

Post by Nachei »

Thank you so much everybody!!! @LAM, your solution got this thing working; I had to select android as default source, then run your script, then connect MicOut to Reaper's inputs, and now the track records the Android's mic... Victory!

Unfortunately it has a whopping delay of 4 seconds, so after recording I have to trim the vocal to align it with the keyboard... But it's good enough for what I needed, to record something quick'n dirty, when inspiration strikes and you have to record it on the spot or you lose it...

Now I've started the script to automate this solution, and I'm stumbling upon a problem that I've been finding for a while and drives me crazy, I wonder if some of you know something about it, if not never mind...

When I execute

Code: Select all

qjackctl -p "preset_that_I_want"

it sometimes works, but more often than not it just opens an empty preset called "Default", with no parameters and in the latency field just says "n/a", so I don't even know what the hell is it doing. Any idea of why that is? I guess I'll just move to Cadence soon, but for these tests, to avoid overcomplicating things, I just stuck to the programs I knew better (Qjackctl, Carla)...

Thank you again everybody, having this tablet arrangement really helps my workflow... And of course all the best wishes for this new 2024!

User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Ideas to make Jack detect a tablet's microphone connected via USB (and present in Pulseaudio)?

Post by LAM »

Nachei wrote: Sun Dec 31, 2023 10:13 am

Thank you so much everybody!!! @LAM, your solution got this thing working; I had to select android as default source, then run your script, then connect MicOut to Reaper's inputs, and now the track records the Android's mic... Victory!

Glad it worked. :D

Regarding Qjackctl preset loading it works fine here. I tried a few times with a couple of profiles and they load correctly.

Happy new year!

in mix, nobody can hear your screen

Nachei
Established Member
Posts: 235
Joined: Fri Feb 17, 2012 3:32 am
Has thanked: 6 times
Been thanked: 27 times
Contact:

Re: Ideas to make Jack detect a tablet's microphone connected via USB (and present in Pulseaudio)? [ SOLVED ]

Post by Nachei »

Thank you for trying the Qjackctl thing... No problem, after all a GUI is sort of clutter for a script like this, I'll just learn to configure Jack from the terminal... Thank you for doing the test.

Post Reply