Lines Matching refs:diga
1574 static unsigned int encode_spdif_bits(struct snd_aes_iec958 *diga) in encode_spdif_bits() argument
1578 val = diga->status[0] & 0x03; /* professional, non-audio */ in encode_spdif_bits()
1581 if ((diga->status[0] & IEC958_AES0_PRO_EMPHASIS) == in encode_spdif_bits()
1584 rbits = (diga->status[4] >> 3) & 0x0f; in encode_spdif_bits()
1593 switch (diga->status[0] & IEC958_AES0_PRO_FS) { in encode_spdif_bits()
1606 val |= diga->status[1] & 0x04; /* copyright */ in encode_spdif_bits()
1607 if ((diga->status[0] & IEC958_AES0_CON_EMPHASIS) == in encode_spdif_bits()
1610 val |= (unsigned int)(diga->status[1] & 0x3f) << 4; /* category */ in encode_spdif_bits()
1611 val |= (unsigned int)(diga->status[3] & IEC958_AES3_CON_FS) << 12; /* fs */ in encode_spdif_bits()
1616 static void decode_spdif_bits(struct snd_aes_iec958 *diga, unsigned int val) in decode_spdif_bits() argument
1618 memset(diga->status, 0, sizeof(diga->status)); in decode_spdif_bits()
1619 diga->status[0] = val & 0x03; /* professional, non-audio */ in decode_spdif_bits()
1623 diga->status[0] |= IEC958_AES0_PRO_EMPHASIS_5015; in decode_spdif_bits()
1628 diga->status[0] |= IEC958_AES0_PRO_FS_32000; in decode_spdif_bits()
1631 diga->status[0] |= IEC958_AES0_PRO_FS_48000; in decode_spdif_bits()
1636 diga->status[0] |= val & (1U << 2); /* copyright */ in decode_spdif_bits()
1638 diga->status[0] |= IEC958_AES0_CON_EMPHASIS_5015; in decode_spdif_bits()
1639 diga->status[1] |= (val >> 4) & 0x3f; /* category */ in decode_spdif_bits()
1640 diga->status[3] |= (val >> 12) & 0x07; /* fs */ in decode_spdif_bits()