How to select mic jack instead of internal mic for ALC268?

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

How to select mic jack instead of internal mic for ALC268?

Postby otakuj462 » Mon Oct 19, 2009 2:32 pm

Hi all,

I'm trying to get audio recording working. I'm using OSSv4 built recently from mercurial source. Audio playback works fine, and I can record audio with the built-in microphone mounted on the screen bezel (although it's very sensitive to how you have your volume configured; too little and you only hear mumbling; too much and it breaks up into static). Unfortunately, I can't seem to record using the microphone jack instead of the internal microphone.

I've tried what seems like every possible setting in ossxmix to get it to switch inputs, with no success. Ossxmix is rather complicated for laptops (see "man oss_hdaudio", which says "Unfortunately the mixer and control panel interface (see ossmix(1)) for "generic" systems is very cryptic and difficult to understand. To solve problems with volumes or signal routing you need to start ossxmix(1) and change the controls one at time until you get the desired effect."), so I feel it's possible I'm still missing a checkbox or something somewhere which will switch the input.

I've also tried giving ossrecord different input devices, so:

Code: Select all
jbeard4@jacob-laptop:~$ ls /dev/oss/oss_hdaudio0/pcmin*
/dev/oss/oss_hdaudio0/pcmin0  /dev/oss/oss_hdaudio0/pcmin1
jbeard4@jacob-laptop:~$ rm test.wav; ossrecord -d /dev/oss/oss_hdaudio0/pcmin1 test.wav;
^Cjbeard4@jacob-laptop:~$ rm test.wav; ossrecord -d /dev/oss/oss_hdaudio0/pcmin0 test.wav;


But both inputs seem to record from the same device, the external mic. In ossxmix, there are two controls under "record", and each control seems to change the volume of pcmin1 and pcmin0, but they both correspond to the same physical device, the external mic.

Here is my system's complete information:

Code: Select all
jbeard4@jacob-laptop:~$ lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge
00:01.0 PCI bridge: Advanced Micro Devices [AMD] RS780 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:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)
00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode]
00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller
00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller
00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3a)
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 11h HyperTransport Configuration (rev 40)
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 11h Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 11h DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 11h Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 11h Link Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics]
08:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)
09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)


Code: Select all
jbeard4@jacob-laptop:~$ ossmix -v3

Selected mixer 0/High Definition Audio ALC268
Known controls are:
jack.int-speaker.mode <mix|input> (currently mix)
jack.int-speaker.mute ON|OFF (currently OFF)
jack.int-speaker.speaker [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
jack.int-speaker.speaker-mute ON|OFF (currently ON)
jack.fp-black.mode1 <mix|input> (currently mix)
jack.fp-black.mute1 ON|OFF (currently OFF)
jack.fp-black.headphone [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
jack.fp-black.mute.headphone ON|OFF (currently OFF)
jack.fp-black.mute.speaker ON|OFF (currently OFF)
jack.fp-black.mode2 <speaker|input> (currently speaker)
jack.fp-black [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
jack.fp-black.mute2 ON|OFF (currently OFF)
jack.int-mic [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
record.select.select1 [<leftvol>:<rightvol>] (currently 7.4:7.4 dB)
record.select.select2 <speaker|int-mic> (currently int-mic)
record.select.select3 [<leftvol>:<rightvol>] (currently 2.9:2.9 dB)
record.select.select4 <speaker|int-mic> (currently int-mic)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
  Sample rate currently used by virtual mixer on this device.
  Use vmixctl(1) command to change the rate
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|OFF> (currently Fast)
  Sample rate conversion quality used by the virtual mixer.
 
  Virtual mixer uses internally a fixed sampling rate that can be set
  using the 'vmixctl rate' command (usually 48 kHz by default). Applications
  that want to use different rates will be handled by performing automatic
  sample rate conversions (SRC) in software. This operation will consume
  some additional CPU time depending on the quality. The following
  alternatives are availabe:
 
  Fast:   Use fast linear interpolation algorithm (low quality).
  Low: Use slightly better linear interpolation
  Medium: Use an algorithm that provides good quality with moderate CPU load.
  High/High+/Production: Higher quality algorithms that consume more CPU resources.
  OFF: No sample rate conversions. Sample rate locked to the master rate.
 
  'Fast' will work best in most cases. Only users with high end audio
  cards and speakers should use the other settings.
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-outvu [<leftVU>:<rightVU>] (currently 0:0) (Read-only)
vmix0-invol <monovol> (currently 17.3 dB)
vmix0-invu [<leftVU>:<rightVU>] (currently 0:0) (Read-only)
vmix0.pcm7 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix01 [<leftVU>:<rightVU>] (currently 0:0) (Read-only)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix02 [<leftVU>:<rightVU>] (currently 0:0) (Read-only)
vmix0.pcm9 [<leftvol>:<rightvol>] (currently 13.4:13.4 dB)
vmix03 [<leftVU>:<rightVU>] (currently 0:0) (Read-only)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 16.1:16.1 dB)
vmix04 [<leftVU>:<rightVU>] (currently 0:0) (Read-only)


Code: Select all
jbeard4@jacob-laptop:~$ osstest
Sound subsystem and version: OSS 4.2 (b 2000/200910122257) (0x00040100)
Platform: Linux/x86_64 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:48:52 UTC 2009

*** Scanning sound adapter #-1 ***
/dev/oss/oss_hdaudio0/pcm0 (audio engine 0): HD Audio play speaker
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 47957.00 Hz (-0.09%)>
/dev/oss/oss_hdaudio0/pcm1 (audio engine 1): HD Audio play headphone
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 47984.00 Hz (-0.03%)>
/dev/oss/oss_hdaudio0/spdout0 (audio engine 2): HD Audio play spdif-out
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 47975.00 Hz (-0.05%)>
/dev/oss/oss_hdaudio0/mdmout0 (audio engine 3): HD Audio play modem
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 214268.00 Hz (346.39%)>
/dev/oss/oss_hdaudio0/pcmin0 (audio engine 4): HD Audio rec select
- Skipping input only device
/dev/oss/oss_hdaudio0/pcmin1 (audio engine 5): HD Audio rec select
- Skipping input only device
/dev/oss/oss_hdaudio0/mdmin0 (audio engine 6): HD Audio rec modem
- Skipping input only device

*** All tests completed OK ***


If anyone has any advice as to how I can instruct oss to record from the internal mic jack, I would greatly appreciate it if you would let me know.

Thanks,

Jake
otakuj462
New Member
 
Posts: 5
Joined: Mon Oct 12, 2009 10:40 pm

Re: How to select mic jack instead of internal mic for ALC268?

Postby igorzwx » Mon Oct 19, 2009 4:11 pm

The same card was here:
http://forums.linuxmint.com/viewtopic.p ... 3&start=15

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
http://forums.linuxmint.com/viewtopic.php?f=48&t=32173

The happy user reported this:

by dredgman on Tue Sep 08, 2009 2:05 am
Got my mic working in the back mic jack, here's my new ossmix results

Selected mixer 0/High Definition Audio ALC883
Known controls are:
jack.green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.green.mute ON|OFF (currently OFF)
jack.black.mode <front|rear|center/LFE|side|pcm4|input> (currently center/LFE)
jack.black [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.black.mute ON|OFF (currently OFF)
jack.orange.mode <front|rear|center/LFE|side|pcm4|input> (currently rear)
jack.orange [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.orange.mute ON|OFF (currently OFF)
jack.gray.mode <front|rear|center/LFE|side|pcm4|input> (currently pcm4)
jack.gray [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.gray.mute ON|OFF (currently OFF)
jack.pink.mode <front|rear|center/LFE|side|pcm4|input> (currently input)
jack.pink [<leftvol>:<rightvol>] (currently 19.9:29.9 dB)
jack.pink.mute ON|OFF (currently OFF)
jack.fp-pink.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.fp-pink [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.fp-pink.mute ON|OFF (currently OFF)
jack.blue.mode <front|rear|center/LFE|side|pcm4|input> (currently input)
jack.blue [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.blue.mute ON|OFF (currently OFF)
jack.fp-green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.fp-green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.fp-green.mute ON|OFF (currently OFF)
record.mix.mute.mic1 ON|OFF (currently ON)
record.mix.mute.fp-mic1 ON|OFF (currently ON)
record.mix.mute.linein1 ON|OFF (currently ON)
record.mix.mute.fp-headphone1 ON|OFF (currently ON)
record.mix.mute.green1 ON|OFF (currently ON)
record.mix.mute.black1 ON|OFF (currently ON)
record.mix.mute.orange1 ON|OFF (currently ON)
record.mix.mute.gray1 ON|OFF (currently ON)
record.mix.mute.input-mix1 ON|OFF (currently ON)
record.mix1 [<leftvol>:<rightvol>] (currently 37.4:37.4 dB)
record.mix.mute.mic2 ON|OFF (currently ON)
record.mix.mute.fp-mic2 ON|OFF (currently ON)
record.mix.mute.linein2 ON|OFF (currently ON)
record.mix.mute.fp-headphone2 ON|OFF (currently ON)
record.mix.mute.green2 ON|OFF (currently ON)
record.mix.mute.black2 ON|OFF (currently ON)
record.mix.mute.orange2 ON|OFF (currently ON)
record.mix.mute.gray2 ON|OFF (currently ON)
record.mix.mute.input-mix2 ON|OFF (currently ON)
record.mix2 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.mic [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.fp-mic [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.linein [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.fp-headphone [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.green [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.black [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.orange [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.gray [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.input-mix <mic|fp-mic|linein> (currently mic)
misc.front-mute ON|OFF (currently OFF)
misc.input-mix-mute1 ON|OFF (currently OFF)
misc.front1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.front2 <front|input-mix> (currently front)
misc.rear-mute ON|OFF (currently OFF)
misc.input-mix-mute2 ON|OFF (currently OFF)
misc.rear1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.rear2 <rear|input-mix> (currently rear)
misc.center/lfe-mute ON|OFF (currently OFF)
misc.input-mix-mute3 ON|OFF (currently OFF)
misc.center/lfe1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.center/lfe2 <center/LFE|input-mix> (currently center/LFE)
misc.side-mute ON|OFF (currently OFF)
misc.input-mix-mute4 ON|OFF (currently OFF)
misc.side1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.side2 <side|input-mix> (currently side)
misc.pcm4-mute ON|OFF (currently OFF)
misc.input-mix-mute5 ON|OFF (currently OFF)
misc.pcm41 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.pcm42 <pcm4|input-mix> (currently pcm4)
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 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB) ("firefox")
vmix0.pcm9 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB

Oh, I followed the instructions at http://wiki.archlinux.org/index.php/OSS#Comparisons and fixed the sound "feature" so that I have sound again when I wake the computer from sleep.
igorzwx
Known Member
 
Posts: 1000
Joined: Sun Jun 28, 2009 9:31 pm

Re: How to select mic jack instead of internal mic for ALC268?

Postby otakuj462 » Tue Oct 20, 2009 10:21 am

Nice link! It looks like this could solve my problem. The fact that he mentions finding a solution to having audio break on unsuspend, which I've also encountered, is encouraging as well. I'll try it out and report back whether it works.

Thanks!

Jake
otakuj462
New Member
 
Posts: 5
Joined: Mon Oct 12, 2009 10:40 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest