* Staying synced after underrun
@ 2012-05-15 7:45 Paul D. DeRocco
2012-05-15 8:46 ` Clemens Ladisch
2012-05-15 8:49 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Paul D. DeRocco @ 2012-05-15 7:45 UTC (permalink / raw)
To: Alsa-devel
I'm writing 48KHz stereo to Intel HD audio on my mobo, and I'd like to send
it in parallel to both the analog and S/PDIF outputs, which share a clock
source. If I open both devices, configure them with the same buffer space,
and write the same data with snd_pcm_writei, how should I handle an
underrun? Call snd_pcm_prepare on both device handles? If so, and the first
device underruns, should I bother writing the buffer to the second device?
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Staying synced after underrun
2012-05-15 7:45 Staying synced after underrun Paul D. DeRocco
@ 2012-05-15 8:46 ` Clemens Ladisch
2012-05-15 8:49 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2012-05-15 8:46 UTC (permalink / raw)
To: Paul D. DeRocco; +Cc: Alsa-devel
Paul D. DeRocco wrote:
> I'm writing 48KHz stereo to Intel HD audio on my mobo, and I'd like to send
> it in parallel to both the analog and S/PDIF outputs, which share a clock
> source.
Use snd_pcm_link() to ensure that the stream start happens at the same time.
All linked streams are automatically started/stopped when one of them starts/
stops.
Regards,
Clemens
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Staying synced after underrun
2012-05-15 7:45 Staying synced after underrun Paul D. DeRocco
2012-05-15 8:46 ` Clemens Ladisch
@ 2012-05-15 8:49 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2012-05-15 8:49 UTC (permalink / raw)
To: Paul D. DeRocco; +Cc: Alsa-devel
At Tue, 15 May 2012 00:45:54 -0700,
Paul D. DeRocco wrote:
>
> I'm writing 48KHz stereo to Intel HD audio on my mobo, and I'd like to send
> it in parallel to both the analog and S/PDIF outputs, which share a clock
> source. If I open both devices, configure them with the same buffer space,
> and write the same data with snd_pcm_writei, how should I handle an
> underrun? Call snd_pcm_prepare on both device handles? If so, and the first
> device underruns, should I bother writing the buffer to the second device?
It's no direct answer to your question, but:
Isn't the SPDIF device sent from the same codec as the analog, or it's
over a different codec? In the former case, turning on "IEC958
Default PCM Playback Switch" mixer will send the stream both to analog
and SPDIF outs. (When an SPDIF device was opened beforehand, this
will keep the device thus the multiplex won't happen, though.)
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-15 8:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 7:45 Staying synced after underrun Paul D. DeRocco
2012-05-15 8:46 ` Clemens Ladisch
2012-05-15 8:49 ` Takashi Iwai
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.