Lines Matching refs:ctrl
259 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in spdif_irq_uqrx_full() local
266 pos = &ctrl->upos; in spdif_irq_uqrx_full()
271 pos = &ctrl->qpos; in spdif_irq_uqrx_full()
290 ctrl->subcode[*pos++] = val >> 16; in spdif_irq_uqrx_full()
291 ctrl->subcode[*pos++] = val >> 8; in spdif_irq_uqrx_full()
292 ctrl->subcode[*pos++] = val; in spdif_irq_uqrx_full()
298 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in spdif_irq_uq_sync() local
304 if (ctrl->qpos == 0) in spdif_irq_uq_sync()
308 ctrl->ready_buf = (ctrl->qpos - 1) / SPDIF_QSUB_SIZE + 1; in spdif_irq_uq_sync()
314 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in spdif_irq_uq_err() local
326 ctrl->ready_buf = 0; in spdif_irq_uq_err()
327 ctrl->upos = 0; in spdif_irq_uq_err()
328 ctrl->qpos = 0; in spdif_irq_uq_err()
439 static void spdif_set_cstatus(struct spdif_mixer_control *ctrl, in spdif_set_cstatus() argument
442 ctrl->ch_status[3] &= ~mask; in spdif_set_cstatus()
443 ctrl->ch_status[3] |= cstatus & mask; in spdif_set_cstatus()
448 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in spdif_write_channel_status() local
453 ch_status = (bitrev8(ctrl->ch_status[0]) << 16) | in spdif_write_channel_status()
454 (bitrev8(ctrl->ch_status[1]) << 8) | in spdif_write_channel_status()
455 bitrev8(ctrl->ch_status[2]); in spdif_write_channel_status()
460 ch_status = bitrev8(ctrl->ch_status[3]) << 16; in spdif_write_channel_status()
466 ch_status = (bitrev8(ctrl->ch_status[0]) << 24) | in spdif_write_channel_status()
467 (bitrev8(ctrl->ch_status[1]) << 16) | in spdif_write_channel_status()
468 (bitrev8(ctrl->ch_status[2]) << 8) | in spdif_write_channel_status()
469 bitrev8(ctrl->ch_status[3]); in spdif_write_channel_status()
507 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in spdif_set_sample_rate() local
586 spdif_set_cstatus(ctrl, IEC958_AES3_CON_FS, csfs); in spdif_set_sample_rate()
702 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in fsl_spdif_hw_params() local
721 spdif_set_cstatus(ctrl, IEC958_AES3_CON_CLOCK, in fsl_spdif_hw_params()
796 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in fsl_spdif_pb_get() local
798 uvalue->value.iec958.status[0] = ctrl->ch_status[0]; in fsl_spdif_pb_get()
799 uvalue->value.iec958.status[1] = ctrl->ch_status[1]; in fsl_spdif_pb_get()
800 uvalue->value.iec958.status[2] = ctrl->ch_status[2]; in fsl_spdif_pb_get()
801 uvalue->value.iec958.status[3] = ctrl->ch_status[3]; in fsl_spdif_pb_get()
811 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in fsl_spdif_pb_put() local
813 ctrl->ch_status[0] = uvalue->value.iec958.status[0]; in fsl_spdif_pb_put()
814 ctrl->ch_status[1] = uvalue->value.iec958.status[1]; in fsl_spdif_pb_put()
815 ctrl->ch_status[2] = uvalue->value.iec958.status[2]; in fsl_spdif_pb_put()
816 ctrl->ch_status[3] = uvalue->value.iec958.status[3]; in fsl_spdif_pb_put()
861 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in fsl_spdif_subcode_get() local
865 spin_lock_irqsave(&ctrl->ctl_lock, flags); in fsl_spdif_subcode_get()
866 if (ctrl->ready_buf) { in fsl_spdif_subcode_get()
867 int idx = (ctrl->ready_buf - 1) * SPDIF_UBITS_SIZE; in fsl_spdif_subcode_get()
869 &ctrl->subcode[idx], SPDIF_UBITS_SIZE); in fsl_spdif_subcode_get()
872 spin_unlock_irqrestore(&ctrl->ctl_lock, flags); in fsl_spdif_subcode_get()
893 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; in fsl_spdif_qget() local
897 spin_lock_irqsave(&ctrl->ctl_lock, flags); in fsl_spdif_qget()
898 if (ctrl->ready_buf) { in fsl_spdif_qget()
899 int idx = (ctrl->ready_buf - 1) * SPDIF_QSUB_SIZE; in fsl_spdif_qget()
901 &ctrl->qsub[idx], SPDIF_QSUB_SIZE); in fsl_spdif_qget()
904 spin_unlock_irqrestore(&ctrl->ctl_lock, flags); in fsl_spdif_qget()
1534 struct spdif_mixer_control *ctrl; in fsl_spdif_probe() local
1617 ctrl = &spdif_priv->fsl_spdif_control; in fsl_spdif_probe()
1618 spin_lock_init(&ctrl->ctl_lock); in fsl_spdif_probe()
1621 ctrl->ch_status[0] = IEC958_AES0_CON_NOT_COPYRIGHT | in fsl_spdif_probe()
1623 ctrl->ch_status[1] = IEC958_AES1_CON_DIGDIGCONV_ID; in fsl_spdif_probe()
1624 ctrl->ch_status[2] = 0x00; in fsl_spdif_probe()
1625 ctrl->ch_status[3] = IEC958_AES3_CON_FS_44100 | in fsl_spdif_probe()