FreeBSD Bugzilla – Attachment 181422 Details for
Bug 218326
[snd_hda] OSS ioctl() reports low sample rate for HDMI with Nvidia GeForce
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
oss_info.cc
oss_info.cc (text/plain), 1.23 KB, created by
Mikael Simonsson
on 2017-04-03 11:46:50 UTC
(
hide
)
Description:
oss_info.cc
Filename:
MIME Type:
Creator:
Mikael Simonsson
Created:
2017-04-03 11:46:50 UTC
Size:
1.23 KB
patch
obsolete
>#include <iostream> >#include <sys/soundcard.h> >#include <fcntl.h> >#include <unistd.h> > >int main() >{ > int mixerfd; > const char* mixerdev = "/dev/mixer"; > > if ((mixerfd = open(mixerdev, O_RDWR, 0)) == -1) > { > return 1; > } > > oss_sysinfo sysinfo; > if (ioctl(mixerfd, SNDCTL_SYSINFO, &sysinfo) == -1) > { > close(mixerfd); > return 1; > } > > std::cout << std::endl; > > for (int i = 0; i < sysinfo.numcards; ++i) > { > oss_card_info cardinfo; > memset(&cardinfo, 0, sizeof(cardinfo)); > > cardinfo.card = i; > if (ioctl(mixerfd, SNDCTL_CARDINFO, &cardinfo) == -1) > { > break; > } > > std::cout << "oss_card_info.shortname: " << cardinfo.shortname << std::endl; > std::cout << "oss_card_info.longname: " << cardinfo.longname << std::endl; > > oss_audioinfo ainfo; > memset(&ainfo, 0, sizeof(ainfo)); > ainfo.dev = i; > if (ioctl(mixerfd, SNDCTL_AUDIOINFO, &ainfo) != -1) > { > std::cout << "oss_audioinfo.min_rate: " << ainfo.min_rate << std::endl; > std::cout << "oss_audioinfo.max_rate: " << ainfo.max_rate << std::endl; > } > > std::cout << std::endl; > } > > close(mixerfd); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 218326
: 181422