Lines Matching refs:diga
1593 static unsigned int encode_spdif_bits(struct snd_aes_iec958 *diga) in encode_spdif_bits() argument
1597 val = diga->status[0] & 0x03; /* professional, non-audio */ in encode_spdif_bits()
1600 if ((diga->status[0] & IEC958_AES0_PRO_EMPHASIS) == in encode_spdif_bits()
1603 rbits = (diga->status[4] >> 3) & 0x0f; in encode_spdif_bits()
1612 switch (diga->status[0] & IEC958_AES0_PRO_FS) { in encode_spdif_bits()
1625 val |= diga->status[1] & 0x04; /* copyright */ in encode_spdif_bits()
1626 if ((diga->status[0] & IEC958_AES0_CON_EMPHASIS) == in encode_spdif_bits()
1629 val |= (unsigned int)(diga->status[1] & 0x3f) << 4; /* category */ in encode_spdif_bits()
1630 val |= (unsigned int)(diga->status[3] & IEC958_AES3_CON_FS) << 12; /* fs */ in encode_spdif_bits()
1635 static void decode_spdif_bits(struct snd_aes_iec958 *diga, unsigned int val) in decode_spdif_bits() argument
1637 memset(diga->status, 0, sizeof(diga->status)); in decode_spdif_bits()
1638 diga->status[0] = val & 0x03; /* professional, non-audio */ in decode_spdif_bits()
1642 diga->status[0] |= IEC958_AES0_PRO_EMPHASIS_5015; in decode_spdif_bits()
1647 diga->status[0] |= IEC958_AES0_PRO_FS_32000; in decode_spdif_bits()
1650 diga->status[0] |= IEC958_AES0_PRO_FS_48000; in decode_spdif_bits()
1655 diga->status[0] |= val & (1U << 2); /* copyright */ in decode_spdif_bits()
1657 diga->status[0] |= IEC958_AES0_CON_EMPHASIS_5015; in decode_spdif_bits()
1658 diga->status[1] |= (val >> 4) & 0x3f; /* category */ in decode_spdif_bits()
1659 diga->status[3] |= (val >> 12) & 0x07; /* fs */ in decode_spdif_bits()