# [PC-BSD] Cannot use microphone



## Peter2121 (Dec 25, 2011)

I installed PCBSD 9 at my notebook DELL and I cannot use microphone.
OSS system seems to work well - I can use my sound card to playback in any app.


```
[peter@peter-pcbsd /usr/home/peter]$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA NVidia (Unknown) PCM #0 DisplayPort> (play)
pcm1: <HDA NVidia (Unknown) PCM #1 DisplayPort> (play)
pcm2: <HDA IDT (Unknown) PCM #0 Analog> (play/rec) default
pcm3: <HDA IDT (Unknown) PCM #1 Analog> (play/rec)
[peter@peter-pcbsd /usr/home/peter]$ mixer
Mixer vol      is currently set to  96:96
Mixer pcm      is currently set to  88:98
Mixer speaker  is currently set to  75:75
Mixer line     is currently set to  75:75
Mixer mic      is currently set to  98:98
Mixer mix      is currently set to 100:100
Mixer rec      is currently set to 100:100
Mixer ogain    is currently set to 100:100
Recording source: mic
```

I tried to change rec source and default card - no result.
Please, help


----------



## mav@ (Jan 3, 2012)

What other record sources do you have? "mic" can be external microphone. Internal microphone can be named as "monitor". Also you have another sound device pcm3 that also supports recording, but there is not enough information to tell what it is.


----------



## Peter2121 (Jan 6, 2012)

Thank you for your answer, that is!

So, I have 3 mixers. With the mixer by default (sysctl hw.snd.default_unit=2) I can playback correctly but I cannot use microphone. With the third mixer (sysctl hw.snd.default_unit=3) I can use microphone for recording but I cannot playback. 

So, the question IS - how to use the second mixer to playback and the third mixer for recording?
For example, neither Skype nor Jokosher do not give me to choose a mixer to use.


----------



## mav@ (Jan 10, 2012)

Skype and most of other applications are able to choose which device to use. Problem with the latest Skype could be in ALSA wrapper configuration that exports only one dsp device. On my FreeBSD machine after tuning that config I am successfully using Skype playing sound to default /dev/dsp device that varies depending on whether I am at home or not, but recording always from /dev/dsp0. Unluckily I have no idea how to do it properly on PC-BSD.


----------



## Peter2121 (Jan 10, 2012)

Your FreeBSD approach should work for PC-BSD - it's just FreeBSD 9 with some pre-installed packages and new PBI package management system. I'm using ALSA wrapper for Skype too. Please give me some information about your ALSA wrapper tuning.

What about native OSS applications? Lot of them use default mixer and cannot "separate" playback and recording sources to two different mixers...


----------



## mav@ (Jan 12, 2012)

On my FreeBSD I went into /compat/linux/etc/alsa/pcm/, copied pcm-oss.conf-dist into pcm-oss.conf and added there few more sections for additional dsp and mixer devices. But on my PC-BSD I see no such file there.


----------



## mav@ (Jan 12, 2012)

All OSS applications I use have options to choose device. Even XMMS has GUI to choose it.


----------



## Peter2121 (Jan 14, 2012)

The ports/audio/linux-f10-alsa-plugins-oss is needed in PC-PSD. It was not included in RC, it will be added in RELEASE.
When I add the package manually - /compat/linux/etc/alsa/pcm/pcm-oss.conf is present.
I've modifier it:


```
# pcm-oss plugin configuration

pcm.oss {
	type oss
	device /dev/dsp
	hint {
		description "Open Sound System"
	}
}

ctl.oss {
	type oss
	device /dev/mixer
	hint {
		description "Open Sound System"
	}

pcm.oss3 {
	type oss
	device /dev/dsp3.0
	hint {
		description "Open Sound System dsp3.0"
	}
}

ctl.oss3 {
	type oss
	device /dev/mixer3
	hint {
		description "Open Sound System mixer3"
	}

}
```

...but i still have no choice in Skype - the only _oss (oss)_ line is present.
What am I doing wrong?


----------



## mav@ (Jan 15, 2012)

This config works for me:

```
pcm.oss {
        type oss
        device /dev/dsp
        hint {
                description "Open Sound System"
        }
}

pcm.oss0 {
        type oss
        device /dev/dsp0
        hint {
                description "Open Sound System 0"
        }
}

pcm.oss1 {
        type oss
        device /dev/dsp1
        hint {
                description "Open Sound System 1"
        }
}

ctl.oss {
        type oss
        device /dev/mixer
        hint {
                description "Open Sound System"
        }
}

ctl.oss0 {
        type oss
        device /dev/mixer0
        hint {
                description "Open Sound System 0"
        }
}

ctl.oss1 {
        type oss
        device /dev/mixer1
        hint {
                description "Open Sound System 1"
        }
}
```


----------



## Peter2121 (Jan 15, 2012)

Thank you, it works now 
There was just a syntax error in my pcm-oss.conf file.


----------



## sg1efc (May 16, 2012)

*Thank you!  *

Thank you both so much mav@ and Peter2121!    I never would have figured this out without you.   :stud

My info looks like this, maybe it might help someone else a bit:


```
[meow@pcbsd-220] ~> cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Realtek ALC888 PCM #0 Analog> (play/rec) default
pcm1: <HDA Realtek ALC888 PCM #1 Analog> (play/rec)
pcm2: <HDA Realtek ALC888 PCM #2 Digital> (play)
pcm3: <USB audio> (play/rec)
pcm4: <USB audio> (rec) 

# PCBSD pcm-oss plugin configuration

pcm.oss {
        type oss
        device /dev/dsp
        hint {
                description "Open Sound System"
        }
}

pcm.oss0 {
        type oss
        device /dev/dsp0
        hint {
                description "Open Sound System 0"
        }
}

pcm.oss1 {
        type oss
        device /dev/dsp1
        hint {
                description "Open Sound System 1"
        }
}

pcm.oss2 {
        type oss
        device /dev/dsp2
        hint {
                description "Open Sound System 2"
        }
}

pcm.oss3 {
        type oss
        device /dev/dsp3
        hint {
                description "Open Sound System 3"
        }
}

pcm.oss4 {
        type oss
        device /dev/dsp4
        hint {
                description "Open Sound System 4"
        }
}

ctl.oss {
        type oss
        device /dev/mixer
        hint {
                description "Open Sound System"
        }
}

ctl.oss0 {
        type oss
        device /dev/mixer0
        hint {
                description "Open Sound System 0"
        }
}

ctl.oss1 {
        type oss
        device /dev/mixer1
        hint {
                description "Open Sound System 1"
        }
}

ctl.oss2 {
        type oss
        device /dev/mixer2
        hint {
                description "Open Sound System 2"
        }
}

ctl.oss3 {
        type oss
        device /dev/mixer3
        hint {
                description "Open Sound System 3"
        }
}

ctl.oss4 {
        type oss
        device /dev/mixer4
        hint {
                description "Open Sound System 4"
        }
}
```
Now I can use audio in Skype, just have to get webcam working.  :stud :e


Thanks again!


----------

