DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default Supported sound cards

I use Intel Corporation Comet Lake PCH cAVS as my sound device, but I can't make it work on OpenBSD, on FreeBSD works well. On Linux it use sof driver.
Reply With Quote
  #2   (View Single Post)  
Old 30th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

From your previously posted dmesg(8) (pastebin link in your boot-loop thread), I can see you have TWO sound cards configured:
Code:
azalia0 at pci1 dev 0 function 1 vendor "NVIDIA", unknown product 0x2291 rev 0xa1: msi
azalia0: codecs: NVIDIA/0x00a0
audio0 at azalia0
.
.
azalia1 at pci0 dev 31 function 3 "Intel 400 Series cAVS" rev 0x00: msi
azalia1: codecs: Realtek ALC3254, Intel/0x280b, using Realtek ALC3254
audio1 at azalia1
Reply With Quote
  #3   (View Single Post)  
Old 30th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
From your previously posted dmesg(8) (pastebin link in your boot-loop thread), I can see you have TWO sound cards configured
If these sound cards are configured, can I use them bc they're supported? Where to select the default sound unit? In FreeBSD it was set to 0 that was invalid for me, maybe at OpenBSD it also was invalid.
Reply With Quote
  #4   (View Single Post)  
Old 30th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

The NVIDIA /dev/audio0 device is your default sound card. Your Intel sound card is at /dev/audio1, and is not default. You should be able to provision the use of /dev/audio1 through sndio(7)-aware applications.

The sndio(7) man page states that the raw device descriptor for /dev/audio1 is "rsnd/1". It is implied that the block device descriptor is "snd/1". As described in the sndio(7) man page, applications will look for the environment variable AUDIODEVICE and if not provisioned, will attempt to connect with "snd/default" then "rsnd/0". So try setting this environment variable to "snd/1" and see if aucat(1) will output sound, or, use aucat with "-f snd/1" without the environment variable..

The mixerctl(8) application is for settings outside of sndio(8), and you can review settings and make changes if you use the -F option with /dev/audioctl1.

---

I have used a USB attached sound device for recording, and it attached as /dev/audio1. After connecting the device I would configure the device to my preferred 60% input level with $ sndioctl -f snd/1 input.level=0.6.
Reply With Quote
  #5   (View Single Post)  
Old 1st December 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
So try setting this environment variable to "snd/1"
It works, but how do I automatically set AUDIODEVICE to "snd/1" for every user and any shell?
Reply With Quote
  #6   (View Single Post)  
Old 1st December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

It's an environment variable.
  • For X Windows users, this can be exported from their $HOME/.xsession script.
  • For other users, "system-wide" environment variable settings are dependent upon the shell. As one example, the default ksh(1) shell will use /etc/profile if the shell is a login shell. Your favorite shell may differ from this -- the popular bash shell will run /etc/profile when the shell is either login or interactive.
Reply With Quote
  #7   (View Single Post)  
Old 1st December 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
For X Windows users, this can be exported from their $HOME/.xsession script.
I have added `export AUDIODEVICE="snd/1"` to the ~/.xsession, but output of `echo $AUDIODEVICE` executed from a terminal emulator in my X11 session is blank.
Reply With Quote
  #8   (View Single Post)  
Old 1st December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

It works for me:
Code:
$ grep export .xsession
export LC_CTYPE="en_US.UTF-8"
x220-josh:~> echo $LC_CTYPE
en_US.UTF-8
$
Try something new -- post enough information to replicate your problem, instead of telling us things aren't working.
  1. Post the contents of $HOME/.xsession.
  2. Post the name of your terminal emulator application, then describe how it is started and what options it is started with.
This is very, very old, now. But still I think can be helpful for new forum members: http://daemonforums.org/showthread.php?p=3924#post3924
Reply With Quote
  #9   (View Single Post)  
Old 1st December 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
Post the contents of $HOME/.xsession.
Code:
export AUDIODEVICE=snd/1 &
picom --daemon &
i3
Quote:
Originally Posted by jggimi View Post
Post the name of your terminal emulator application, then describe how it is started and what options it is started with.
My terminal emulator is terminator. I started it by pressing meta key + enter, it executes command "terminator", I also ran terminator from terminator but still won't work.
Reply With Quote
Old 1st December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I use i3wm also. But my last line in my .xsession script uses exec:
Code:
exec i3
From the sh(1) man page, highlight mine:
Code:
     exec [command [arg ...]]
         Replace the shell with command (and any optional arguments), without
         creating a new process....
I've installed and run terminator from a shell, and it picks up the exports. See if this simple change to your .xsession file solves this latest problem for you.
Reply With Quote
Old 1st December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Oh, also, remove the ampersand from the end of the export line. That creates a subshell, which you don't want.
Reply With Quote
Old 1st December 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
I use i3wm also. But my last line in my .xsession script uses exec:
Code:
exec i3
I've changed my ~/.xsession to
Code:
export AUDIODEVICE="snd/1" &
exec i3
but still won't work
Reply With Quote
Old 1st December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Please remove the trailing ampersand as noted in my follow up post above. An ampersand is the "&" character. This creates a subshell for your export, so it isn't executed in the shell that runs i3.
Reply With Quote
Old 1st December 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
Please remove the trailing ampersand
Removed. The variable is now "snd/1", thank you.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UBS WI-FI CARDS for OpenBSD. Any recomendations? Nureo OpenBSD General 9 25th June 2016 07:37 PM
AMD Radeon cards supported by the Radeon driver for Current/5.5 guitarfreak OpenBSD General 3 4th April 2014 12:33 PM
compatible video cards? xxERICxx OpenBSD Installation and Upgrading 9 14th November 2013 10:53 AM
Recording sound with external sound card backrow OpenBSD General 5 21st August 2009 08:17 PM
OpenBSD and ATI cards h5n1 OpenBSD General 3 29th October 2008 12:46 PM


All times are GMT. The time now is 02:22 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick