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

audio out headphone jack #51

Open
ghost opened this issue Feb 24, 2019 · 13 comments
Open

audio out headphone jack #51

ghost opened this issue Feb 24, 2019 · 13 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2019

I am running Boombeastic on balenaOS 2.29.2+rev2 and superuser version 9.0.1 with a Raspberry Pi 3 and I want to connect the headphone jack directly to my speaker is there any way of doing this?

@Langholt
Copy link

I want to do the same thing. Is this not possible? @ghost did you have any success?

@curcuz
Copy link
Contributor

curcuz commented Jun 7, 2019

hey @ghost @Langholt yes it can be done! you just need to avoid disabling audio (dtparam) and loading the DAC overlay (dtoverlay) during configuration

@Langholt
Copy link

Langholt commented Jun 7, 2019

@curcuz Awesome, Thanks so much. I'll try this.

@janvda
Copy link

janvda commented Jun 12, 2019

I managed this by:

  1. I set the Fleet Configuration variable RESIN_HOST_CONFIG_dtparam = "i2c_arm=on","spi=on","audio=on"
  2. I didn't set the Fleet Configuration variable RESIN_HOST_CONFIG_dtoverlay = "hifiberry-dac","i2s-mmap"
  3. I disabled the copying of the asound.conf ( ae9962d)
  4. I did not remove the snd_bcm2835 module in mopidy service start.sh (bdd3984 )

You can check if audio is properly setup by means of running the command speaker-test -c2 -t wav in the MOPIDY container.

@Langholt
Copy link

Langholt commented Jul 6, 2019

@janvda Thanks for the tip here, and sorry for the slow reply just testing this now. I'm still not successful. When I run the speaker-test in the MOPIDY command the output that I get is:

`root@171317c:/usr/src/app# speaker-test -c2 -t wav

speaker-test 1.1.3

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
Playback open error: -2,No such file or directory`

@janvda
Copy link

janvda commented Jul 6, 2019

I think the above error indicates that the audio hardware of your raspberry pi is not accessible within your mopidy container.

Did you set privileged: true for the mopidy service in the docker-compose.yml (see example here) ?

Normally if you run the command aplay -l in a terminal window of the mopidy service you should see get something like:

root@f0bc010:/# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  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
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@f0bc010:/#

@Langholt
Copy link

Langholt commented Jul 7, 2019

Thanks @janvda. I have set privileged: true for mopidy in the docker-compose file. It's set to true for all the services.

There looks like there is something up with the hardware. When I run aplay -l I get the following results:

aplay: device_list:270: no soundcards found...

@odm7341
Copy link

odm7341 commented Aug 8, 2019

@Langholt i got it working by doing what @janvda says, but you also have to make the modifications to the files in the Spotify, Airplay, AND Mopidy services. Like what I've done here

@Langholt
Copy link

@odm7341 Noted. I'll try that and report back.

@Langholt
Copy link

Langholt commented Sep 8, 2019

@odm7341 thank you everything works now. Thank to you and @odm7341 and @janvda. I think this issue can be closed now.

Now I just have to figure out how to turn up the volume properly when listening to spotify.

@CHHE-ledtec
Copy link

CHHE-ledtec commented Nov 20, 2019

@Langholt i got it working by doing what @janvda says, but you also have to make the modifications to the files in the Spotify, Airplay, AND Mopidy services. Like what I've done here

@odm7341 i downloaded your version and pushed it .

but i am getting --

root@5a00ead:/usr/src/app# aplay -l

aplay: device_list:272: no soundcards found...
root@5a00ead:/usr/src/app# speaker-test -c2 -t wav

speaker-test 1.1.8

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default
Playback open error: -2,No such file or directory
root@5a00ead:/usr/src/app# ^C
root@5a00ead:/usr/src/app#

@CHHE-ledtec
Copy link

nvm got it working after purging the system and let the rpi redownload it

@Langholt
Copy link

Great to hear. One note from me, I'm still dealing with issues on very low volume, even when all my volume controls are maxed. Have any of you dealt with that? Do I need to adjust alsamixer settings? And if so in which container.

This might be off topic for this thread.

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

5 participants