Lines Matching defs:dsp
14 #include "dsp.h"
369 dsp_bf_encrypt(struct dsp *dsp, u8 *data, int len)
371 int i = 0, j = dsp->bf_crypt_pos;
372 u8 *bf_data_in = dsp->bf_data_in;
373 u8 *bf_crypt_out = dsp->bf_crypt_out;
374 u32 *P = dsp->bf_p;
375 u32 *S = dsp->bf_s;
448 dsp->bf_crypt_pos = j;
458 dsp_bf_decrypt(struct dsp *dsp, u8 *data, int len)
461 u8 j = dsp->bf_decrypt_in_pos;
462 u8 k = dsp->bf_decrypt_out_pos;
463 u8 *bf_crypt_inring = dsp->bf_crypt_inring;
464 u8 *bf_data_out = dsp->bf_data_out;
465 u16 sync = dsp->bf_sync;
466 u32 *P = dsp->bf_p;
467 u32 *S = dsp->bf_s;
555 dsp->bf_decrypt_in_pos = j;
556 dsp->bf_decrypt_out_pos = k;
557 dsp->bf_sync = sync;
593 * initialize the dsp for encryption and decryption using the same key
599 dsp_bf_init(struct dsp *dsp, const u8 *key, uint keylen)
603 u32 *P = (u32 *)dsp->bf_p;
604 u32 *S = (u32 *)dsp->bf_s;
609 /* Set dsp states */
612 dsp->bf_crypt_out[i] = 0xff;
613 dsp->bf_data_out[i] = dsp_silence;
616 dsp->bf_crypt_pos = 0;
617 dsp->bf_decrypt_in_pos = 0;
618 dsp->bf_decrypt_out_pos = 0;
619 dsp->bf_sync = 0x1ff;
620 dsp->bf_enable = 1;
669 dsp_bf_cleanup(struct dsp *dsp)
671 dsp->bf_enable = 0;