No announcement yet.

Multichannel capture with ALSA?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Multichannel capture with ALSA?

    Does dmix only manage software multichannel mixing or can it do capture too?

    Heres the issue, I need to capture my mic on one device exclusively for skype and then capture the "analog mix" of everything on the other for a recording app such as Audacity. Am I better off just using two sound cards or is this possible via software, jack or anything.

    Please, anyone with experience help!

  • #2
    So long the applications in question are ALSA-aware it should be possible indeed with dmix, and in mos cases you shouldn't do anything. However, since Skype is OSS based, it highjacks the capture channel and dmix doesn't bode well with OSS apps or the aoss OSS compatibility layer. Now, if your sound card supports several capture channels in hardware, you can do that without much of an issue, for example, using the analog capture for one and the digital for the other. It all boils down to what soundcard do you have. Cheap onboard solutions usually lack much functionality in this regard, and the great majority even lack hardware playback hardware mixing, let alone analog/digital captures (some cards do feature analog and digital captures, though). The way I see it, in your case, you are better off using two cards, simply because you depend on one application jamming the capture channel, Skype.


    • #3
      While I have never used Skype, Thetargos is correct on issues that arise from mixing the two APIs (ALSA and OSS).

      If you want to capture both sides of the Skype conversation, then there are a few options. If you want to capture both of those separately, that is a bit more complex

      So basically yes, as Thetargos suggests it would be easier if you had two sound devices, and technically it can be done with dmix + dsnoop properly setup.

      You can setup software mixing yourself using this guide:

      That should work for sharing both playback and capture between apps on one audio device. If the ALSA driver you use allows one application to lock your driver and prevent software mixing, then it's an ALSA bug and needs to be reported.

      If there are OSS drivers available for your device, then you could try that too (if it's that imperative).

      Unfortunately, there are not many ALSA drivers that support hardware mixing in their driver:

      You could buy a cheapo USB audio device, if it comes down to it.


      • #4

        I have a Sound Blaster Audigy Value Soundcard, using the CA0106 Alsa driver. Unfortunatly it does not have a master volume control in the mixer panel, is there a way to enable it or emulate it?


        • #5
          Divan, could you please post the output of

          cat /proc/asound/pcm

          I thought the CA0106 was used for Audigy LS and Live! 24-bit (i.e, no TURE Audigy or Live! products)


          • #6
             0 [CA0106         ]: CA0106 - CA0106
                                  Audigy SE [SB0570] at 0xa800 irq 20
             1 [default        ]: USB-Audio - PnP Audio Device        
                                  PnP Audio Device         at usb-0000:00:02.0-7, full speed
            Distro: openSuSE 10.2

            What driver should it use?


            • #7
              The driver is snd-ca0106, I'm a little disoriented by your output, you using USB headphones or is the "card" USB? I had never seen the content of /proc/asound/pcm like that, I'm more used to my:

              01-01: VIA 8237 : VIA 8237 : playback 1 : capture 1
              01-00: VIA 8237 : VIA 8237 : playback 4 : capture 1
              00-03: emu10k1 : Multichannel Playback : playback 1
              00-02: emu10k1 efx : Multichannel Capture/PT Playback : playback 8 : capture 1
              00-01: emu10k1 mic : Mic Capture : capture 1
              00-00: emu10k1 : ADC Capture/Standard PCM Playback : playback 32 : capture 1


              • #8
                Sorry that was /proc/asound/cards. My motherboard audio is usb based.

                /proc/asound/pcm >
                00-03: ca0106 : CA0106 : playback 1 : capture 1
                00-02: ca0106 : CA0106 : playback 1 : capture 1
                00-01: ca0106 : CA0106 : playback 1 : capture 1
                00-00: ca0106 : CA0106 : playback 1 : capture 1
                01-00: USB Audio : USB Audio : playback 1 : capture 1


                • #9
                  I believe that is a /proc/asound/cards divan posted [EDIT: I must be a slow poster, you beat me there lol]

                  The Audigy 'Value' series does not use an emu10k1 either IIRC, Thetargos.

                  It sounds like the audio mixer program divan is using is grabbing onto the USB audio device. Either that or there's something missing from the ALSA modules config.

                  divan, could you post your /proc/asound/devices and please tell us what program you are using to access controls (audio mixer app).

                  Last edited by edged; 10-23-2007, 06:15 AM.


                  • #10
                      2:        : timer
                      3: [ 0- 0]: raw midi
                      4: [ 0- 3]: digital audio playback
                      5: [ 0- 3]: digital audio capture
                      6: [ 0- 2]: digital audio playback
                      7: [ 0- 2]: digital audio capture
                      8: [ 0- 1]: digital audio playback
                      9: [ 0- 1]: digital audio capture
                     10: [ 0- 0]: digital audio playback
                     11: [ 0- 0]: digital audio capture
                     12: [ 0]   : control
                     13: [ 1- 0]: digital audio playback
                     14: [ 1- 0]: digital audio capture
                     15: [ 1]   : control
                     16:        : sequencer
                    I am using alsamixer and the gnome mixer control. Both have no PCM or Main Volume control. To change volume I have to lower all the Analog channels manualy (analog front, analog rear etc.)