Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Im currently working on an small application which runs on a cubieboard (ARMv7, rasp-pi-like).

What I really need to do is, accessing and recording the line-in audio-signal from two different applications.

The first is PyAudio and the second an Darkice Media Streamer. The Soundcard uses the kernel driver sun4i-CODEC from the developers of the cubieboard. The Audio Layer is currently provided by ALSA Audio.

Currently both applications record from hw:0,0 and they intefere. So if I start the Darkice Client, my Python Script has no access and vice verca.

The Ouput from my arecord -L:

null
Discard all samples (playback) or generate zero samples (capture)
default
sysdefault:CARD=sun4icodec
    sun4i-CODEC, sun4i PCM
    Default Audio Device
dmix:CARD=sun4icodec,DEV=0
    sun4i-CODEC, sun4i PCM
    Direct sample mixing device
dsnoop:CARD=sun4icodec,DEV=0
    sun4i-CODEC, sun4i PCM
    Direct sample snooping device
hw:CARD=sun4icodec,DEV=0
    sun4i-CODEC, sun4i PCM
    Direct hardware device without any conversions
plughw:CARD=sun4icodec,DEV=0
    sun4i-CODEC, sun4i PCM
    Hardware device with all software conversions

This is my amixerOutput:

imple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 63
  Mono: Playback 63 [100%]
Simple mixer control 'LineL',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'LineR',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Mic Input Mux',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 15 [100%]
Simple mixer control 'MicL',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 1 [33%]
Simple mixer control 'MicR',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 3 [100%]
Simple mixer control 'Playback',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cvolume-joined penum
  Capture channels: Mono
  Limits: Capture 0 - 7
  Mono: Capture 7 [100%]
Simple mixer control 'ADC Input Mux',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 7 [100%]
Simple mixer control 'Fm',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 7 [100%]
Simple mixer control 'FmL',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FmR',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Ldac Left Mixer',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Ldac Right Mixer',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Rdac Right Mixer',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]

So whats the best solution to solve this problem? Splitting the stereo-input in two different decices? Use another audio-layer? I don't know!

Thank you in advance,

~MxAgent

share|improve this question
    
Try dsnoop instead of hw. –  CL. Jul 12 '13 at 19:28
    
This gives me an IOError: [Errno Input overflowed] -9981 Error while starting PyAudio.. –  MxAgent Jul 13 '13 at 13:35
    
Does it work with two arecord instances or other programs? –  CL. Jul 13 '13 at 17:31
    
Is it possible, that this is caused by performance issues on that small ARM CPU? –  MxAgent Jul 13 '13 at 21:05
    
That might be possible. How much CPU load do you have when recording? –  CL. Jul 14 '13 at 9:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.