Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b46be727286a93056db851ababc85c0ac3f2f91c
Commit:     b46be727286a93056db851ababc85c0ac3f2f91c
Parent:     feb77712b0e780f04507cdda0529088ff0f3286f
Author:     Timofei Bondarenko <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 7 15:50:52 2007 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Thu Jan 31 17:29:19 2008 +0100

    [ALSA] cmipci - allow capture of raw spdif subframes
    
    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.
    
    Signed-off-by: Timofei Bondarenko <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/cmipci.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index d1f23eb..187203e 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -1407,6 +1407,11 @@ static int snd_cmipci_capture_spdif_prepare(struct 
snd_pcm_substream *substream)
                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);
@@ -1418,6 +1423,7 @@ static int snd_cmipci_capture_spdif_hw_free(struct 
snd_pcm_substream *subs)
 
        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);
@@ -1569,7 +1575,8 @@ static struct snd_pcm_hardware snd_cmipci_capture_spdif =
        .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,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to