1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[PC-BSD] Cannot use microphone

Discussion in 'Multimedia' started by Peter2121, Dec 25, 2011.

  1. Peter2121

    Peter2121 New Member

    Messages:
    41
    Thanks Received:
    6
    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.

    Code:
    [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
     
    sg1efc thanks for this.
  2. mav@

    mav@ Member Developer

    Messages:
    618
    Thanks Received:
    165
    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.
     
    sg1efc and Peter2121 thanked for this.
  3. Peter2121

    Peter2121 New Member

    Messages:
    41
    Thanks Received:
    6
    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.
     
    sg1efc thanks for this.
  4. mav@

    mav@ Member Developer

    Messages:
    618
    Thanks Received:
    165
    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.
     
    sg1efc thanks for this.
  5. Peter2121

    Peter2121 New Member

    Messages:
    41
    Thanks Received:
    6
    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...
     
    sg1efc thanks for this.
  6. mav@

    mav@ Member Developer

    Messages:
    618
    Thanks Received:
    165
    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.
     
    sg1efc thanks for this.
  7. mav@

    mav@ Member Developer

    Messages:
    618
    Thanks Received:
    165
    All OSS applications I use have options to choose device. Even XMMS has GUI to choose it.
     
    sg1efc thanks for this.
  8. Peter2121

    Peter2121 New Member

    Messages:
    41
    Thanks Received:
    6
    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:

    Code:
    # 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?
     
    sg1efc thanks for this.
  9. mav@

    mav@ Member Developer

    Messages:
    618
    Thanks Received:
    165
    This config works for me:
    Code:
    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"
            }
    }
    
     
    sg1efc and Peter2121 thanked for this.
  10. Peter2121

    Peter2121 New Member

    Messages:
    41
    Thanks Received:
    6
    Thank you, it works now :)
    There was just a syntax error in my pcm-oss.conf file.
     
    sg1efc thanks for this.
  11. sg1efc

    sg1efc New Member

    Messages:
    16
    Thanks Received:
    2
    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:

    Code:
    [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! :)
     
    izotov thanks for this.