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 cards ? #9

Closed
kopr12 opened this issue Sep 26, 2016 · 11 comments
Closed

How to configure cards ? #9

kopr12 opened this issue Sep 26, 2016 · 11 comments

Comments

@kopr12
Copy link

kopr12 commented Sep 26, 2016

Trying to make this work under Gentoo x64, tried few examples and none worked.
For example conswebstream gives me this :

$ ./conswebstream 
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:979:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
===> Libraries are loaded.
===> uos_CreatePlayer => ok
===> uos_AddFromURL => ok
===> uos_AddIntoDevOut => ok
===> All ready to play.
Press a key to play...

Nothing happens when I press a key btw.
Looking at those messages seems like it can't find a sound card or something.
I have integrated realtek sound card, never had problems before, have no clue what's going on with this. Same happens with SimplePlayer example, I click on "Load that libraries" then in terminal I get this :

$ ./SimplePlayer
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:979:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
@fredvs
Copy link
Owner

fredvs commented Sep 26, 2016

Hello.

Hum, it seems that the problem is not uos but your sound-card.

Could you try this in console ?:
speaker-test -c 2 -D default

Do you get some sound ?

And what is the result of that ?:
aplay -L

Fre;D

@kopr12
Copy link
Author

kopr12 commented Sep 26, 2016

Hello, yeah okay, might be my sound card, though like I said never had any problems with anything before, ever.


$ speaker-test -c 2 -D default

speaker-test 1.1.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 11.015216
 0 - Front Left
 1 - Front Right
Time per period = 11.014255
 0 - Front Left
 1 - Front Right
Time per period = 11.036259
 0 - Front Left
 1 - Front Right
Time per period = 11.012387

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=Intel
    HDA Intel, ALC662 rev1 Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Analog
    Front speakers
surround21:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Digital
    IEC958 (S/PDIF) Digital Audio Output

Edit : Yes, I can hear the sound with speaker-test -c 2 -D default

@fredvs
Copy link
Owner

fredvs commented Sep 27, 2016

Yes, your sound-card seems ok.

Did you try /uos/examples/deviceinfos program ?
What is the result ?

Other thing, what if you change PulseAudio default sound-server for Alsa or Oss ?

Fre;D

@kopr12
Copy link
Author

kopr12 commented Sep 27, 2016

Same thing happens with deviceinfos :

$ ./deviceinfos 
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:979:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave

I really don't want to change settings for PulseAudio or anything else for this because it's working just fine as it is, doesn't matter, was just curious and had to ask, thanks for your help.

@fredvs
Copy link
Owner

fredvs commented Sep 27, 2016

Hello.

OK, sorry that I could not help.

It seems that your sound card is 7 channels (left, right, front, Center, Side, Rear and Woofer).
I have to confess that I never try it and uos was tested only for mono or stereo devices.

Fre;D

@kopr12
Copy link
Author

kopr12 commented Sep 27, 2016

Hey, no problem, I just had to ask for some reason, I didn't expect anything.
btw my card has 5 channels, don't know why aplay -L gave that output saying I have 7 channels, but in sound preferences 5.1 is selected, there is no 7.1 option, and I know it's a 5 channels card.

screenshot at 2016-09-27 19-51-58

Edit: I just tried to change that selection to Stereo and try one of the example programs, but same thing happened.

btw how do you change PulseAudio default sound server ?

@fredvs
Copy link
Owner

fredvs commented Sep 28, 2016

Hello.

Maybe you could take a look at this:

unknown-pcm-cards-pcm-rear

It propose to remove in /usr/share/alsa/alsa.conf the unrecognized pcm's.

ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:979:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave

PS: Before to do it, please do a backup of your alsa.conf.

Fre;D

@kopr12
Copy link
Author

kopr12 commented Sep 28, 2016

Thanks, that seems to be the right way to solve this, after commenting out few lines I'm now left with only two problematic, they are not under PCM section in alsa.conf, I'll play with this and hopefully manage to solve it.

./conswebstream 
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM dmix:0
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm_route.c:867:(find_matching_chmap) Found no matching channel map
===> Libraries are loaded.
===> uos_CreatePlayer => ok
===> uos_AddFromURL => ok
===> uos_AddIntoDevOut => ok
===> All ready to play.
Press a key to play...

@kopr12
Copy link
Author

kopr12 commented Sep 28, 2016

Right, I've managed to make it work without error messages, however I can't hear the sound from conswebstream program and other GUI programs are just saying that libs are loaded and that window just stays like that, there are no other windows, only that load library one. Here's what deviceinfos program looks like after I press "Load that library" button :

screenshot at 2016-09-28 13-49-23

As for conswebstream, the url is valid (theurl := 'http://broadcast.infomaniak.net/start-latina-high.mp3' ;) , I can hear it when I open that url in browser, there are no error messages anymore, but still I can't hear anything, sound is working fine in other apps (it's not like I've disabled something in alsa.conf I shouldn't have and there's no sound at all)

$ ./conswebstream 
===> Libraries are loaded.
===> uos_CreatePlayer => ok
===> uos_AddFromURL => ok
===> uos_AddIntoDevOut => ok
===> All ready to play.
Press a key to play...

Press a key to exit...

@kopr12
Copy link
Author

kopr12 commented Sep 28, 2016

More information :

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC662 rev1 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
$ speaker-test -c 2 -D default

speaker-test 1.1.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 10.966561
$ speaker-test -c 6 -D default

speaker-test 1.1.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 349525
Period size range from 10 to 116509
Using max buffer size 349524
Periods = 4
was set period_size = 87381
was set buffer_size = 349524
 0 - Front Left
 4 - Center
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
 5 - LFE
Time per period = 11.190175

I can hear the sound from both speaker tests.
If you have any ideas please do tell, thanks.

@kopr12
Copy link
Author

kopr12 commented Sep 29, 2016

Never mind, I tried BASS and it's working fine.

@kopr12 kopr12 closed this as completed Sep 29, 2016
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