All of lore.kernel.org
 help / color / mirror / Atom feed
* Copy hw out to loop problem when recording started before playing
@ 2021-07-28  6:51 Anton Nikolaev
  0 siblings, 0 replies; only message in thread
From: Anton Nikolaev @ 2021-07-28  6:51 UTC (permalink / raw)
  To: alsa-devel

Hello everyone. Please help. Do not understand what is wrong

Chains is :
Plug asym1 -
  Out= Plug with multi (Copy hardware dmix output to dmix loopout)
  IN= Dsnoop with hardware dev

Plug asym2 -
  Out= plug dmix loop
  IN= plug dsnoop loop

Work good if playing to plug asym1 started before recording from asym2.
Not working play to asym1 if recording from asym2 started before playing to
asym1.

/Etc/asound.conf is:

pcm.hwcard0 { type hw; card 0; device 0; }

pcm.!default {
  type plug;
  slave.pcm { type asym; playback.pcm "devhwcopy"; capture.pcm "devhwin"; }
}

pcm.devhwcopy {
  type plug;
  route_policy "duplicate";
  slave.pcm {
    type multi; slaves {
      a { channels 2; pcm "devhwout"; }
      b { channels 2; pcm "devloopout"; }
    }
    bindings { 0 { slave a channel 0 } 1 { slave a channel 1 } 2 { slave b
channel 0 } 3 { slave b channel 1 } }
  }
  ttable [ [ 1 0 1 0 ] [ 0 1 0 1 ] ]
}

pcm.devhwout {
  type dmix; ipc_key 1024001; ipc_perm 0666; hw_ptr_alignment roundup;
  slave { pcm "hwcard0"; channels 2; period_size 1024; buffer_size 8192; }
  bindings { 0 0 1 1 }
}

pcm.devhwin {
  type dsnoop; ipc_key 1024002; ipc_perm 0666;
  slave { pcm "hwcard0"; channels 2; rate 44100; period_size 1024;
buffer_size 8192; }
  bindings { 0 0 1 1 }
}

pcm.devloopout {
  type dmix; ipc_key 1024011; ipc_perm 0666;
  slave { pcm "hw:LOOPCARD,0,0"; channels 2; period_size 1024; buffer_size
8192; }
  bindings { 0 0 1 1 }
}

pcm.devloopin {
  type dsnoop; ipc_key 1024012; ipc_perm 0666;
  slave { pcm "hw:LOOPCARD,1,0"; channels 2; rate 44100; period_size 1024;
buffer_size 8192; }
  bindings { 0 0 1 1 }
}

pcm.devloop {
  type plug;
  slave.pcm { type asym; playback.pcm "devloopout"; capture.pcm
"devloopin"; }
}

(English is not native for me, sorry)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-28  6:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28  6:51 Copy hw out to loop problem when recording started before playing Anton Nikolaev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.