OSS-4.2.2005: cannot output to loudspeaker only

OSS related discussion in general (i.e. not limited to Linux/Solaris/BSD)

Moderators: hannu, dev, cesium, kodachi

OSS-4.2.2005: cannot output to loudspeaker only

Postby noctuorare » Sun Jan 01, 2012 2:21 pm

No matter how I set Jack Mode, it cannot output to loudspeaker only (both loudspeaker and earplug make sound).

Machine: Lenovo ThinkPad Edge E31
Using KDE 4.7.4

$ emerge --info
Portage 2.1.10.44 (hardened/linux/amd64/desktop, gcc-4.5.3, glibc-2.14.1-r1, 3.1.6-hardened x86_64)
=================================================================
System uname: Linux-3.1.6-hardened-x86_64-AMD_Athlon-tm-_II_Neo_K345_Dual-Core_Processor-with-gentoo-2.1
Timestamp of tree: Sun, 01 Jan 2012 10:30:01 +0000
app-shells/bash: 4.2_p20
dev-lang/python: 2.7.2-r3, 3.2.2
dev-util/cmake: 2.8.6-r4
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.1
sys-apps/openrc: 0.9.7
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.68
sys-devel/automake: 1.11.1-r1
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.5.3-r2
sys-devel/gcc-config: 1.5-r2
sys-devel/libtool: 2.4.2
sys-devel/make: 3.82-r3
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc: 2.14.1-r1
Repositories: gentoo science sunrise gentoo-zh gentoo-haskell oss-overlay local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA google-talkplugin skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -ggdb"
DISTDIR="/var/pkg/dist"
EMERGE_DEFAULT_OPTS="--keep-going y --with-bdeps y --quiet-build y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en zh_TW zh af ak am ar as as_IN ast az be be_BY bg bn bn_BD bn_IN bo br brx bs ca ca_XV ca@valencia crh cs csb cy da de de_FR dgo dz ee el en_CA en_US en_ZA eo es es_AR es_CL es_CR es_ES es_LA es_MX et et_EE eu fa fi fil fo fr fr_CA fy fy_NL ga ga_IE gd gl gu gu_IN ha he hi hi_IN hne hr hsb hu hy hy_AM ia id is it ja ka kk km kn kn_IN ko ko_KR kok ks ku ky la lb lg lo lt lv mai me mi mk ml ml_IN mn mni mr mr_IN ms mt my nb nb_NO nds ne nl nn nn_NO no nr ns nso oc om or or_IN pa pa_IN pap pl ps pt pt_BR pt_PT rm ro ru rw sa_IN sat sd se sh sh_YU son si sk sl sq sr sr@ijekavian sr@ijekavianlatin sr@latin sr@Latn sr_CS ss st sv sv_SE sw sw_TZ ta ta_IN ta_LK te te_IN tg th ti ti_ER tk tl tn tr ts tt ug uk ur_IN ur_PK uz uz@cyrillic ve ven vi wa xh zh_CN zh_HK zu"
MAKEOPTS="-j2"
PKGDIR="/var/pkg/bin"
PORTAGE_COMPRESS="/usr/bin/xz"
PORTAGE_COMPRESS_FLAGS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/pkg/portage"
PORTDIR_OVERLAY="/var/pkg/science /var/pkg/sunrise /var/pkg/gentoo-zh /var/pkg/haskell /var/pkg/oss-overlay /var/pkg/usr"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi amd64 avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cjk cli consolekit cracklib crypt cups cxx dbus djvu dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac gdbm gdu gif gpm gstreamer hardened iconv introspection ipv6 jpeg jpeg2k justify kde lame lcms ldap libnotify mad mms mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nptl nptlonly ogg opengl openmp oss pam pango pax_kernel pcre pdf png policykit ppds pppd qt3support qt4 readline samba sdl semantic-desktop session spell sqlite sse sse2 ssl startup-notification svg sysfs taglib tcpd theora threads tiff truetype udev unicode upnp urandom usb v4l vaapi vim-syntax vorbis wifi x264 xcb xcomposite xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2 adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a jl2005c kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z template topfield toshiba_pdrm11" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="crypt" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev joystick synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en zh_TW zh af ak am ar as as_IN ast az be be_BY bg bn bn_BD bn_IN bo br brx bs ca ca_XV ca@valencia crh cs csb cy da de de_FR dgo dz ee el en_CA en_US en_ZA eo es es_AR es_CL es_CR es_ES es_LA es_MX et et_EE eu fa fi fil fo fr fr_CA fy fy_NL ga ga_IE gd gl gu gu_IN ha he hi hi_IN hne hr hsb hu hy hy_AM ia id is it ja ka kk km kn kn_IN ko ko_KR kok ks ku ky la lb lg lo lt lv mai me mi mk ml ml_IN mn mni mr mr_IN ms mt my nb nb_NO nds ne nl nn nn_NO no nr ns nso oc om or or_IN pa pa_IN pap pl ps pt pt_BR pt_PT rm ro ru rw sa_IN sat sd se sh sh_YU son si sk sl sq sr sr@ijekavian sr@ijekavianlatin sr@latin sr@Latn sr_CS ss st sv sv_SE sw sw_TZ ta ta_IN ta_LK te te_IN tg th ti ti_ER tk tl tn tr ts tt ug uk ur_IN ur_PK uz uz@cyrillic ve ven vi wa xh zh_CN zh_HK zu" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS

$ ossinfo
Version info: OSS 4.2 (b 2005/201201011136) (0x00040100) GPL
Platform: Linux/x86_64 3.1.6-hardened #1 SMP PREEMPT Sun Jan 1 19:28:25 CST 2012

Number of audio devices: 5
Number of audio engines: 9
Number of MIDI devices: 0
Number of mixer devices: 1


Device objects
0: osscore0 OSS core services
1: oss_hdaudio0 ATI HD Audio interrupts=3208032 (3208032)
HD Audio controller ATI HD Audio
Vendor ID 0x10024383
Subvendor ID 0x17aa21c6
Codec 0: Unknown (0x14f15066/0x17aa21c6)
2: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)

Mixer devices
0: High Definition Audio 0x14f1506 (Mixer 0 of device object 1)

Audio devices
HD Audio play pcm1 /dev/oss/oss_hdaudio0/pcm0 (device index 0)
HD Audio play pcm2 /dev/oss/oss_hdaudio0/pcm1 (device index 1)
HD Audio rec rec1 /dev/oss/oss_hdaudio0/pcmin0 (device index 2)
HD Audio rec rec2 /dev/oss/oss_hdaudio0/pcmin1 (device index 3)
HD Audio rec rec3 /dev/oss/oss_hdaudio0/pcmin2 (device index 4)

Nodes
/dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0
$ ossmix
Selected mixer 0/High Definition Audio 0x14f15066
Known controls are:
jack.black.mode1 <pcm1|pcm2> (currently pcm1)
jack.black.mode2 <pcm1|pcm2|input> (currently pcm1)
jack.int-speaker.mode <pcm1|pcm2> (currently pcm2)
record.rec1 [<leftvol>:<rightvol>] (currently 64.9:64.9 dB)
record.rec1.rec1 <select1|select2|mix> (currently select1)
record.rec2 [<leftvol>:<rightvol>] (currently 64.9:64.9 dB)
record.rec2.rec2 <select1|select2|mix> (currently select1)
record.rec3 [<leftvol>:<rightvol>] (currently 64.9:64.9 dB)
record.rec3.rec3 <select1|select2|mix> (currently select1)
misc.pcm11 [<leftvol>:<rightvol>] (currently 73.9:73.9 dB)
misc.pcm21 [<leftvol>:<rightvol>] (currently 60.9:60.9 dB)
misc.beep <monovol> (currently 23.9 dB)
misc.select11 [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
misc.select12 <int-mic|mic> (currently lineout)
misc.select21 [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
misc.select22 <int-mic|mic> (currently lineout)
misc.pcm12 [<leftvol>:<rightvol>] (currently 59.9:59.9 dB)
misc.pcm22 [<leftvol>:<rightvol>] (currently 59.9:59.9 dB)
misc.mix <pcm1|pcm2> (currently pcm1)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 9.6 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm5 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB) ("multiqueue36:sr")
vmix0.pcm6 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB) ("operapluginwrap")
vmix0.pcm7 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)

$ /usr/sbin/lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS880 Host Bridge
00:01.0 PCI bridge: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (int gfx)
00:04.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0)
00:05.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 1)
00:11.0 SATA controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
00:12.0 USB controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.2 USB controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.2 USB controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 42)
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)
00:14.3 ISA bridge: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:05.0 VGA compatible controller: ATI Technologies Inc M880G [Mobility Radeon HD 4200]
01:05.1 Audio device: ATI Technologies Inc RS880 Audio Device [Radeon HD 4200]
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
08:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
noctuorare
 
Posts: 4
Joined: Wed Dec 28, 2011 2:51 pm

Re: OSS-4.2.2005: cannot output to loudspeaker only

Postby noctuorare » Sun Jan 01, 2012 2:24 pm

BTW, I don't know whether this patch help you. OSS-4.2.2005 does not compile against GrSecurity kernel. It is about file_operations.

--- oss-v4.2-build2005-src-gpl.orig/setup/Linux/oss/build/osscore.c 2011-12-29 10:30:56.071144892 +0800
+++ oss-v4.2-build2005-src-gpl/setup/Linux/oss/build/osscore.c 2011-12-29 10:36:19.735147341 +0800
@@ -911,7 +911,7 @@
* are replaced by wrapper handles.
*/

-static struct file_operations *
+static file_operations_no_const *
alloc_fop (oss_device_t * osdev, struct oss_file_operation_handle *op)
{
/*
@@ -927,7 +927,7 @@
* and WRAPPER_VERSION must be incremented.
*/

- struct file_operations *fop;
+ file_operations_no_const *fop;

poll_t tmp_poll = (poll_t) op->poll;
read_t tmp_read = (read_t) op->read;
@@ -942,10 +942,10 @@
new_ioctl_t tmp_unlocked_ioctl = (new_ioctl_t) op->unlocked_ioctl;
new_ioctl_t tmp_compat_ioctl = (new_ioctl_t) op->compat_ioctl;

- fop = (struct file_operations *)
- oss_kmem_alloc (sizeof (struct file_operations));
+ fop = (file_operations_no_const *)
+ oss_kmem_alloc (sizeof (file_operations_no_const));

- memset ((char *) fop, 0, sizeof (struct file_operations));
+ memset ((char *) fop, 0, sizeof (file_operations_no_const));

/*
* Now the assignment


That's all. Thank you for your help.
noctuorare
 
Posts: 4
Joined: Wed Dec 28, 2011 2:51 pm

Re: OSS-4.2.2005: cannot output to loudspeaker only

Postby cesium » Sun Jan 01, 2012 3:41 pm

Ideas:
1) Play with the mixer. Try changing jack.black.mode1 or mode2 for example and test again.
2) Does /dev/oss/oss_hdaudio0/pcm1 output anywhere?
3) You can add "hdaudio_noskip=7" argument to /usr/lib/oss/conf/oss_hdaudio.conf and this should give you a few more settings in the mixer to play with (after OSS restart via "soundoff/soundon").
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: OSS-4.2.2005: cannot output to loudspeaker only

Postby noctuorare » Sun Jan 01, 2012 8:01 pm

Thank you for your help.

cat > pcm0: cat 1.wav > /dev/oss/oss_hdaudio0/pcm0
cat > pcm1: cat 1.wav > /dev/oss/oss_hdaudio0/pcm1
ossplay: ossplay 1.wav
L: Loudspeaker
E: Earplug

Code: Select all
Jack Black    Jack Black    Jack Int        Earplug plugged in                     Earplug not plugged in
Mode 1        Mode 2        Speaker Mode    cat > pcm0    cat > pcm1    ossplay    cat > pcm0    cat > pcm1    ossplay
=============Expected to be=============                                E                                      L

Jack Black    Jack Black    Jack Int        Earplug plugged in                     Earplug not plugged in
Mode 1        Mode 2        Speaker Mode    cat > pcm0    cat > pcm1    ossplay    cat > pcm0    cat > pcm1    ossplay
pcm1          any           pcm1            LE            (nothing)     LE         L             (nothing)     L
pcm2          any           pcm1            L             E             L          L             (nothing)     L
pcm1          any           pcm2            E             L             E          (nothing)     L             (nothing)
pcm2          any           pcm2            (nothing)     LE            (nothing)  (nothing)     L             (nothing)


Jack Black Mode 2 has got no any effect. For hdaudio_noskip=7, I got a lot of settings with different colors, but none of them have got any effect on this.
noctuorare
 
Posts: 4
Joined: Wed Dec 28, 2011 2:51 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests