How to use external...
 
Notifications
Clear all

How to use external speakers

21 Posts
6 Users
9 Reactions
4,324 Views
Qbo Robot
(@nonogrub)
Member Admin
Joined: 8 years ago
Posts: 185
 
Posted by: @caju

Hi Qbo, at least for the visual feeling, there is no delay between the sound from the raspberry and the mouth. We have checked it few mates and there is nothing appreciable to the eye.

Really really good!. Good Job!!!. Please, can you upload some video?


   
ReplyQuote
caju
 caju
(@caju)
Member
Joined: 4 years ago
Posts: 22
 

Hello! First of all, sorry for the delay, I have just seen your message. I attach the video file where you can check it.

Note that I disconnected the wires for the original speaker and the sound is going through the jack output of the raspberry to my headphones. But at the same time the mouth works because the sound is being sent via serial to the originar speaker, only I disconnected it.


   
ReplyQuote
Niko
 Niko
(@niko)
Eminent Member
Joined: 6 years ago
Posts: 39
 

awesome  😊  @caju


   
ReplyQuote
caju
 caju
(@caju)
Member
Joined: 4 years ago
Posts: 22
 

However, now I am facing a little problem.

Everytime I swicth on the robot, the sound has a big delay between the serial output (the mouth) and the raspberry's jack (the speaker). To solve this and make them be on time again, I need to open "pavucontrol" and choose the Simultaneous output again. Now I am trying to find out how to configure it correctly so from the beginning they are simultaneous. I will write when I solve it.


   
ReplyQuote
caju
 caju
(@caju)
Member
Joined: 4 years ago
Posts: 22
 

Finally I have been able to solve the problem with the delay when switching on the robot. 

First of all, you must make sure that by default the audio device selected is the "combined". To check that, you can execute pacmd list-sinks in terminal to look for the audio devices. Just to watch the relevant information, you can write this command:

pacmd list-sinks | grep -e 'name:' -e 'index'

There, you must make sure that the * symbol is before the combined audio device (As in the picture "1-default_audio.jpg" attached)

I want to indicate that now my /etc/asound.conf file is simply:

pcm.!default {
  type hw
  card 0
  device 0
}

Once you have checked that the audio device is correctly selected, you must make sure that every device is working as it must. To check that, you must make sure that the combined is IDLE (or RUNNING if is playing anything) and the analog for the jack and the analog for the serial are RUNNING. To see that, you must write the following command:

pactl list sinks short

And the output should be like the one you can find in the picture "2-sink_status.jpg"

 

Here came the problem I had. When I executed the last command, every device was SUSPENDED. And only when I entered in "pavucontrol" and selected again the combined device, it was as it should be (IDLE for combined and RUNNING for the others).

To solve this issue, I followed the answer found in https://unix.stackexchange.com/questions/114602/pulseaudio-sink-always-suspended

To solve it, you must disable the suspend-on-idle in /etc/pulse/default.pa. Simply comment with # the next line (The second):

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

After doing that and rebooting the raspberry, I checked that everytime it worked correctly, cause looking at pactl list sinks short I have no longer seen a SUSPENDED device.


   
ReplyQuote
(@romeo)
Member
Joined: 6 years ago
Posts: 76
 

https://www.amazon.com/ROBOTICS-EDUCATION-CODING-English-version/dp/B0BRMT29KC/ref=sr_1_1?crid=3HLX2FOV83UZV&keywords=qbo+coding+for+stem&qid=1679435736&s=books&sprefix=qbo+coding+for+stem%2Cstripbooks-intl-ship%2C195&sr=1-1

I advise you to read my textbook to implement Q.BO STEM or Q.BO One at the latest version, with which you can also make it play with chat-gpt.


   
ReplyQuote
Page 2 / 2
Share: