* [PATCH] cmipci - allow capture of raw spdif subframes @ 2007-11-07 12:12 Timofei V. Bondarenko 2007-11-07 11:47 ` Takashi Iwai 2007-11-07 12:13 ` Timofei V. Bondarenko 0 siblings, 2 replies; 5+ messages in thread From: Timofei V. Bondarenko @ 2007-11-07 12:12 UTC (permalink / raw) To: alsa-devel Hi. Enable capturing of raw 32bit IEC958_SUBFRAME. The 24-bits PCM data can be obtained using iec958 plugin. Known problem: captured stream may begin with either left or right subframe. Since the iec958 plugin doesn't decode preamble it may swap the channels sometime. Regards, Tim. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cmipci - allow capture of raw spdif subframes 2007-11-07 12:12 [PATCH] cmipci - allow capture of raw spdif subframes Timofei V. Bondarenko @ 2007-11-07 11:47 ` Takashi Iwai 2007-11-13 13:47 ` Timofei V. Bondarenko 2007-11-07 12:13 ` Timofei V. Bondarenko 1 sibling, 1 reply; 5+ messages in thread From: Takashi Iwai @ 2007-11-07 11:47 UTC (permalink / raw) To: Timofei V. Bondarenko; +Cc: alsa-devel At Wed, 07 Nov 2007 15:12:46 +0300, Timofei V. Bondarenko wrote: > > Hi. > > Enable capturing of raw 32bit IEC958_SUBFRAME. > > The 24-bits PCM data can be obtained using iec958 plugin. > > Known problem: captured stream may begin with either left or right > subframe. Since the iec958 plugin doesn't decode preamble it may swap > the channels sometime. > > Regards, > Tim. Applied this one, too. (Do you happen to have a fix for iec958 plugin, too? :) Thanks, Takashi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cmipci - allow capture of raw spdif subframes 2007-11-07 11:47 ` Takashi Iwai @ 2007-11-13 13:47 ` Timofei V. Bondarenko 2007-11-13 10:15 ` Takashi Iwai 0 siblings, 1 reply; 5+ messages in thread From: Timofei V. Bondarenko @ 2007-11-13 13:47 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel Takashi Iwai wrote: > At Wed, 07 Nov 2007 15:12:46 +0300, > Timofei V. Bondarenko wrote: >> Hi. >> >> Enable capturing of raw 32bit IEC958_SUBFRAME. >> >> The 24-bits PCM data can be obtained using iec958 plugin. >> >> Known problem: captured stream may begin with either left or right >> subframe. Since the iec958 plugin doesn't decode preamble it may swap >> the channels sometime. >> >> Regards, >> Tim. > > Applied this one, too. > (Do you happen to have a fix for iec958 plugin, too? :) Not yet. I'm in doubt about a clean way to drop one subframe from the raw stream. Could you give me a hint? Regards, Tim. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cmipci - allow capture of raw spdif subframes 2007-11-13 13:47 ` Timofei V. Bondarenko @ 2007-11-13 10:15 ` Takashi Iwai 0 siblings, 0 replies; 5+ messages in thread From: Takashi Iwai @ 2007-11-13 10:15 UTC (permalink / raw) To: Timofei V. Bondarenko; +Cc: alsa-devel At Tue, 13 Nov 2007 16:47:38 +0300, Timofei V. Bondarenko wrote: > > Takashi Iwai wrote: > > At Wed, 07 Nov 2007 15:12:46 +0300, > > Timofei V. Bondarenko wrote: > >> Hi. > >> > >> Enable capturing of raw 32bit IEC958_SUBFRAME. > >> > >> The 24-bits PCM data can be obtained using iec958 plugin. > >> > >> Known problem: captured stream may begin with either left or right > >> subframe. Since the iec958 plugin doesn't decode preamble it may swap > >> the channels sometime. > >> > >> Regards, > >> Tim. > > > > Applied this one, too. > > (Do you happen to have a fix for iec958 plugin, too? :) > > Not yet. > I'm in doubt about a clean way to drop one subframe from the raw stream. > Could you give me a hint? It'll be tricky, yes. We can prepend a zero in the first shot and keep one pending channel data to shift. For example, raw: R0 L0 R1 L1 R2 L2 ... R(n-1) L(n-1) | R(n) L(n) ... dec: 0 R0 L0 R1 L1 R2 ... L(n-2) R(n-1) | L(n-1) R(n) ... Takashi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cmipci - allow capture of raw spdif subframes 2007-11-07 12:12 [PATCH] cmipci - allow capture of raw spdif subframes Timofei V. Bondarenko 2007-11-07 11:47 ` Takashi Iwai @ 2007-11-07 12:13 ` Timofei V. Bondarenko 1 sibling, 0 replies; 5+ messages in thread From: Timofei V. Bondarenko @ 2007-11-07 12:13 UTC (permalink / raw) To: alsa-devel [-- Attachment #1: Type: text/plain, Size: 364 bytes --] Timofei V. Bondarenko wrote: > Hi. > > Enable capturing of raw 32bit IEC958_SUBFRAME. > > The 24-bits PCM data can be obtained using iec958 plugin. > > Known problem: captured stream may begin with either left or right > subframe. Since the iec958 plugin doesn't decode preamble it may swap > the channels sometime. Sorry, i've forgot to attach the patch... [-- Attachment #2: cmi-capt-spdif24.patch --] [-- Type: text/x-patch, Size: 1420 bytes --] Signed-off-by: Timofei Bondarenko <tim@ipi.ac.ru> --- alsa-driver-hg20071107/alsa-kernel/pci/cmipci.c 2007-11-01 04:00:07.000000000 +0300 +++ alsa-driver/alsa-kernel/pci/cmipci.c 2007-11-07 14:55:05.000000000 +0300 @@ -1400,6 +1407,11 @@ static int snd_cmipci_capture_spdif_prep else snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_DBLSPDS); } + if (snd_pcm_format_width(substream->runtime->format) > 16) + snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL); + else + snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL); + spin_unlock_irq(&cm->reg_lock); return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_CAPT], substream); @@ -1411,6 +1423,7 @@ static int snd_cmipci_capture_spdif_hw_f spin_lock_irq(&cm->reg_lock); snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_CAPTURE_SPDF); + snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL); spin_unlock_irq(&cm->reg_lock); return snd_cmipci_hw_free(subs); @@ -1562,7 +1575,8 @@ static struct snd_pcm_hardware snd_cmipc .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID), - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE, .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, .rate_min = 44100, .rate_max = 48000, [-- Attachment #3: Type: text/plain, Size: 160 bytes --] _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-13 14:02 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-11-07 12:12 [PATCH] cmipci - allow capture of raw spdif subframes Timofei V. Bondarenko 2007-11-07 11:47 ` Takashi Iwai 2007-11-13 13:47 ` Timofei V. Bondarenko 2007-11-13 10:15 ` Takashi Iwai 2007-11-07 12:13 ` Timofei V. Bondarenko
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.