Broken Pipe when adjusting mic volume

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium, kodachi

Broken Pipe when adjusting mic volume

Postby mytharak » Fri Oct 02, 2009 5:45 am

my USB webcam's microphone isn't working. I'm not sure it's supported or even supposed to work since I'm not sure what kind it is to check in the list. OSS detects it just fine though...

All I get is this output to the terminal when trying to change the volume in ossxmix: "SNDCTL_MIX_WRITE: Broken pipe"

Can anyone shed some light on why this might be?
mytharak
 
Posts: 12
Joined: Thu Sep 24, 2009 3:12 am

Re: Broken Pipe when adjusting mic volume

Postby cesium » Wed Oct 07, 2009 9:18 pm

If you could paste the output of "ossinfo -v3" and of "ossmix" this might help..
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: Broken Pipe when adjusting mic volume

Postby mytharak » Fri Oct 09, 2009 5:21 am

Version info: OSS 4.2 (b 2000/200909292259) (0x00040100) GPL
Platform: Linux/x86_64 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:48:52 UTC 2009 (oreomaster2)

Number of audio devices: 2
Number of audio engines: 7
Number of MIDI devices: 0
Number of mixer devices: 2


Device objects
0: osscore0 OSS core services
1: oss_s3vibes0 S3 Sonic Vibes interrupts=22778009 (22778009)
2: oss_usb0 USB audio core services
3: usb046d08dd-0 USB sound device
4: usb046d08dd-1 USB sound device

MIDI devices (/dev/midi*)

Mixer devices
0: S3 SonicVibes (Mixer 0 of device object 1)
Device file /dev/oss/oss_s3vibes0/mix0, Legacy device /dev/mixer0
Priority: 0
Caps:
Device handle: PCI80008000-0000:01:0a.0-mx01
Device priority: 0

1: (USB sound device )(Mixer 0 of device object 3)
Device file /dev/oss/usb046d08dd-0/mix0, Legacy device /dev/mixer1
******* DEVICE NOT PLUGGED IN *******
Priority: 0
Caps:
Device handle: USB-usb046d08dd-0-mx01
Device priority: 0


Audio devices
S3 SonicVibes /dev/oss/oss_s3vibes0/pcm0 (device index 0)
Legacy device /dev/dsp0
Caps: DUPLEX TRIGGER MMAP
Modes: IN/OUT
Engine 1: 0/S3 SonicVibes
Available for use
Engine 2: 1/S3 SonicVibes (vmix)
Available for use
Engine 3: 2/S3 SonicVibes (vmix)
Available for use
Engine 4: 3/S3 SonicVibes (vmix)
Available for use
Engine 5: 4/S3 SonicVibes (vmix)
Available for use
Engine 6: 5/S3 SonicVibes
Available for use
Input formats (0x00000018):
AFMT_U8 - 8 bit unsigned
AFMT_S16_LE - 16 bit signed little endian
Output formats (0x00000018):
AFMT_U8 - 8 bit unsigned
AFMT_S16_LE - 16 bit signed little endian
Device handle: PCI80008000-0000:01:0a.0-au01
Related mixer dev: 0
Sample rate source: 0
Preferred channel configuration: Not indicated
Supported number of channels (min - max): 1 - 2
Native sample rates (min - max): 8000 - 44100
HW Type: Not indicated.
Minimum latency: Not indicated

(USB sound device rec /dev/oss/usb046d08dd-1/pcmin0 ) (device index 1)
Legacy device /dev/dsp1
Caps: TRIGGER MMAP
Modes: INPUT
******* DEVICE NOT PLUGGED IN *******
Input formats (0x00000010):
AFMT_S16_LE - 16 bit signed little endian
Output formats (0x00000010):
AFMT_S16_LE - 16 bit signed little endian
Device handle: USB-usb046d08dd-1-au01
Related mixer dev: 1
Sample rate source: 6
Preferred channel configuration: MONO
Supported number of channels (min - max): 1 - 1
Native sample rates (min - max): 8000 - 8000 (8000)
HW Type: Not indicated.
Minimum latency: Not indicated


Nodes
/dev/dsp -> /dev/oss/oss_s3vibes0/pcm0
/dev/dsp_in -> /dev/oss/oss_s3vibes0/pcm0
/dev/dsp_out -> /dev/oss/oss_s3vibes0/pcm0
/dev/dsp_mmap -> /dev/oss/oss_s3vibes0/pcm0



Selected mixer 0/S3 SonicVibes
Known controls are:
vol [<leftvol>:<rightvol>] (currently 73:73)
synth <monovol> (currently 0)
pcm [<leftvol>:<rightvol>] (currently 86:86)
line [<leftvol>:<rightvol>] (currently 65:65)
line.rec ON|OFF (currently OFF)
mic <monovol> (currently 40)
mic.rec ON|OFF (currently ON)
cd [<leftvol>:<rightvol>] (currently 0:0)
cd.rec ON|OFF (currently OFF)
rec [<leftvol>:<rightvol>] (currently 64:64)
aux1 [<leftvol>:<rightvol>] (currently 0:0)
aux1.rec ON|OFF (currently OFF)
aux2 <monovol> (currently 0)
aux2.rec ON|OFF (currently OFF)
depth <monovol> (currently 0)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-src <Fast|High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 2.9 dB)
vmix0-invol <monovol> (currently 12.8 dB)
vmix0.pcm1 [<leftvol>:<rightvol>] (currently 16.3:16.3 dB)
vmix0.pcm2 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm3 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm4 [<leftvol>:<rightvol>] (currently 11.7:11.7 dB)




Yes, I had it unplugged when I ran those commands.
Last edited by mytharak on Fri Oct 09, 2009 5:50 am, edited 1 time in total.
mytharak
 
Posts: 12
Joined: Thu Sep 24, 2009 3:12 am

Re: Broken Pipe when adjusting mic volume

Postby mytharak » Fri Oct 09, 2009 5:38 am

I think that USB Mic doesn't have a driver... I also can't seem to get any microphone to work even using my sound card's mic port.

When I run the command: "ossrecord - | ossplay -" I get ossplay on pcm2 and ossrecord on pcm1 in ossxmix which I believe are both output devices. This doesn't seem right to me. Also, Audacity detects the mic as /dev/dsp which is the same as the output. I'm confused.

Output works just fine. Still no recording...
mytharak
 
Posts: 12
Joined: Thu Sep 24, 2009 3:12 am

Re: Broken Pipe when adjusting mic volume

Postby cesium » Fri Oct 09, 2009 11:25 pm

I think ossrecord tries to record from the s3vibes.. You should use the '-d' switch to have it try using the USB driver. Also, if the USB device has an "altsetting" option in the mixer, you should try it...
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: Broken Pipe when adjusting mic volume

Postby mytharak » Mon Oct 12, 2009 5:23 am

I can't get recording from either the s3vibes or the usb mic.

There's no altsetting that I can find.
mytharak
 
Posts: 12
Joined: Thu Sep 24, 2009 3:12 am

Re: Broken Pipe when adjusting mic volume

Postby mytharak » Mon Oct 12, 2009 6:18 am

I decided to abandon hope of getting the USB mic to work. I'd be happy with just some kind of input. I enabled my built in HD Audio ALC888 to try the Mic port on that one. Now I'm even more thoroughly confused.

In the output of ossinfo I have this:

Nodes
/dev/dsp -> /dev/oss/oss_s3vibes0/pcm0
/dev/dsp_in -> /dev/oss/oss_s3vibes0/pcm0

Does this mean that it's trying to use the s3vibes for input? How do I change it?

ossinfo lists the following:
Audio devices
HD Audio play front /dev/oss/oss_hdaudio0/pcm0 (device index 0)
HD Audio play rear /dev/oss/oss_hdaudio0/pcm1 (device index 1)
HD Audio play center/LFE /dev/oss/oss_hdaudio0/pcm2 (device index 2)
HD Audio play side /dev/oss/oss_hdaudio0/pcm3 (device index 3)
HD Audio play pcm4 /dev/oss/oss_hdaudio0/pcm4 (device index 4)
HD Audio play spdif-out /dev/oss/oss_hdaudio0/spdout0 (device index 5)
HD Audio rec mix /dev/oss/oss_hdaudio0/pcmin0 (device index 6)
HD Audio rec mix /dev/oss/oss_hdaudio0/pcmin1 (device index 7)
S3 SonicVibes /dev/oss/oss_s3vibes0/pcm0 (device index 8)

I'm not quite sure what these are... so I tried both of those "in" devices with something like "ossrecord -d /dev/oss/oss_hdaudio0/pcmin0 - | ossplay -"

When doing this I get ossrecord on pcm8/vmix0 under the hdaudio tab in ossxmix. It seems to be recording only static and plays it back through the s3vibes. All output works just fine including mixing.

I made sure nothing's muted and adjusted the volume sliders. The volume of the static matches the level of vmix0-invol.
Am I don't something wrong? What's the real input device? When using OSS4 with multiple cards how do you specify which card to use in other recording programs such as audacity?


Here's the new output of ossmix
Selected mixer 0/High Definition Audio ALC888
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 front)
jack.pink [<leftvol>:<rightvol>] (currently 29.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 OFF)
record.mix.mute.fp-mic1 ON|OFF (currently OFF)
record.mix.mute.linein1 ON|OFF (currently OFF)
record.mix.mute.fp-headphone1 ON|OFF (currently OFF)
record.mix.mute.green1 ON|OFF (currently OFF)
record.mix.mute.black1 ON|OFF (currently OFF)
record.mix.mute.orange1 ON|OFF (currently OFF)
record.mix.mute.gray1 ON|OFF (currently OFF)
record.mix.mute.input-mix1 ON|OFF (currently OFF)
record.mix1 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
record.mix.mute.mic2 ON|OFF (currently OFF)
record.mix.mute.fp-mic2 ON|OFF (currently OFF)
record.mix.mute.linein2 ON|OFF (currently OFF)
record.mix.mute.fp-headphone2 ON|OFF (currently OFF)
record.mix.mute.green2 ON|OFF (currently OFF)
record.mix.mute.black2 ON|OFF (currently OFF)
record.mix.mute.orange2 ON|OFF (currently OFF)
record.mix.mute.gray2 ON|OFF (currently OFF)
record.mix.mute.input-mix2 ON|OFF (currently OFF)
record.mix2 [<leftvol>:<rightvol>] (currently 34.4:34.4 dB)
misc.mic [<leftvol>:<rightvol>] (currently 29.9:29.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 46.4:46.4 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 9.7 dB)
vmix0-invol <monovol> (currently 4.3 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
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)
mytharak
 
Posts: 12
Joined: Thu Sep 24, 2009 3:12 am

Re: Broken Pipe when adjusting mic volume

Postby mytharak » Fri Oct 16, 2009 2:54 am

Ok, so I got recording to work by removing the usb mic and disabling the onboard HD Audio card and then specifying /dev/dsp_in as the recording device. The only thing is, no matter the volume setting it's not usable. Maybe the mic I'm using sux. I'll try it with alsa and see.
mytharak
 
Posts: 12
Joined: Thu Sep 24, 2009 3:12 am

Re: Broken Pipe when adjusting mic volume

Postby cesium » Mon Oct 19, 2009 9:40 am

Sorry for not replying sooner... The input device in OSS is decided by one of two things:

A. The device node used. e.g. if /dev/oss/oss_ich0/pcm0 is used and it has INPUT support it will be used. e.g. ossrecord '-d' switch.
B. If the device node doesn't have input support, and vmix is attached, vmix can relay it to another node. e.g. /dev/dsp on oss_hdaudio is typically a symlink to /dev/oss/oss_hdaudio0/pcm0 which doesn't have input support, so vmix by default relays it to pcmin0. vmixctl program can change the input node used (by redirecting from /dev/dsp), or you can just specifiy '-d' etc. directly or by changing /dev/dsp symlink (but make sure vmix is attached to new link).

In general, by using a different node or using vmixctl should allow you to use any desired input if OSS driver works, and there's no need to disable onboard hdaudio etc.
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am


Return to Linux

Who is online

Users browsing this forum: No registered users and 4 guests