Closed IsiTapier closed 2 years ago
As far as I understand these are different concepts. In audio_hal_codec_mode_t you specify if you do input or output or both and audio_hal_adc_input_t specifies the input from which device you receive the input.
By the way audio_hal_adc_input_t does not work properly on the AudioKit... https://github.com/Ai-Thinker-Open/ESP32-A1S-AudioKit/issues/31
Oh good to know Do you know whether it is working for the esp32 lyra-t? And does it work if you set the audio_hal_codec_mode_t to AUDIO_HAL_CODEC_MODE_LINE_IN?
Input and Output is working for all boards. It is just with the AI Thinker Audiokit (ES8388) that the microphone and line in get mixed together. On the old AC101 AudioKit and on the Lyrat Boards this is working properly! I recommend to use my arduino-audio-tools project which uses this library and adds an easy to use layer on top of this and there are plenty of examples which show how to input and output audio....
cfg.adc_input = AUDIO_HAL_ADC_INPUT_LINE1; // microphone cfg.adc_input = AUDIO_HAL_ADC_INPUT_LINE2; // line in
You can test this with https://github.com/pschatzmann/arduino-audio-tools/tree/main/examples/examples-audiokit/streams-audiokit-audiokit
In my case I have a Audio kit (ES8388) 2974 and I cannot get line in audio. LINE_1 gives buzzing, LINE_2 only the on-board microphone. What can I do to debug this thing?
It's an open question then. In my case I don't event get the line in mixed. I've used a Y adapter for a headset, and nothing gets captured from the headset microphone. Thank for the fast answer!
Maybe there is just not enough power ? I tested with an IPAD having the power 3/4 up... If I remember right, there is also an API to set the input volume.
Tried to input sound from output of my pc with a jack to jack adapter. I get sound but is very distorted and slowed. I was trying to make a voip intercom with this board but is becoming more and more frustrating.
If you need to connect the audiokit with the pc you could try to use Wifi or Bluetooth to transmit the audio...
Oh no is just for the audio in test you suggested. But no luck at all
Ah, so voip intercom should still be possible...
I was thinking about using the SIP protocol so I can think about my intercom as a phone and send a key number code to open the door. got everything working except the microphone input with esp-adf.
I haven't worked with ADF, but I think that's strange: have you tried both AUDIO_HAL_ADC_INPUT_LINE1 and AUDIO_HAL_ADC_INPUT_LINE2 ?
Line 2 works only for the built-in microphone. Line 1 low volume buzzing.
I'm thinking about desoldering the microphone and attach an audio jack...
Oh, you want to use an external microphone. Is the built-in microphone not good enough ?
With external jack I could take the intercom audio and pipe it into the board so it can send it to my phone and vice versa with the jack out. I could do it even without jacks and solder wires, but this board has 2 jacks and I would like to make this crappy board do what it's built for..
If you check the comment from Uzmeyer: If I am correct, the only way to fix this is taking MIC2 out of the circuit, simplest by removing the coupling caps C19 and C20, then you would be left with a working stereo line-in on LIN2/RIN2 and mono microphone on LIN1+RIN1.
What are the coupling caps? Sorry for the stupid question!
2 capacitor on the board. Figured out.
I've removed the mic2 from the board and set the line 2 (Not the coupling caps). The line in with headset still doesn't work BUT mic1 captures audio if I plug the jack into the board line in. This is driving me crazy.
Desoldered the second mic too. The line2 with linein attached work in a strange way. If I use a Y adapter and plug a headset with microphone into the board, I can hear sound but the microphone doesn't work. HOWEVER If I put the headphone plug into che linein, my headset speaker act as a microphone! What's happening?
Yes! In the first picture I can hear sound but linein doesn't pick up anything. In the second, headset speakers acts as microphone!
I tested with some earphones and when I plug them into Linein like you did, I don't get any output! So, either your board (version) is messed up, or then signs on your headset are wrong: Did you try to plug the input into earphones and the output into linein (so picture 2 but reversed) ?
Sorry, I've edited the post, the two images were inverted... I'm so sorry!
Headset works well on pc
My gut feeling is that the output of the microphone is just not strong enough to be picked up. Can you test with another audio source. E.g. connect your mobile phone, play music and use full volume Or there is something wrong with the plugs...
If I connect the headphone to the line in, the headset speakers act as a microphone and works! It should not be a power problem!
Why is LINE_IN in the audio_hal_codec_mode_t setting and not in the audio_hal_adc_input_t setting? Isn't it possible to have AUDIO_HAL_CODEC_MODE_BOTH activated and still LINE_IN selected as Input source? (simultaneously doing line in and line out)