Lines Matching refs:rmh
252 struct pcxhr_rmh rmh; in pcxhr_get_clock_reg() local
280 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); in pcxhr_get_clock_reg()
281 rmh.cmd[0] |= IO_NUM_REG_GENCLK; in pcxhr_get_clock_reg()
282 rmh.cmd[1] = pllreg & MASK_DSP_WORD; in pcxhr_get_clock_reg()
283 rmh.cmd[2] = pllreg >> 24; in pcxhr_get_clock_reg()
284 rmh.cmd_len = 3; in pcxhr_get_clock_reg()
285 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_get_clock_reg()
326 struct pcxhr_rmh rmh; in pcxhr_sub_set_clock() local
341 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); /* mute outputs */ in pcxhr_sub_set_clock()
342 rmh.cmd[0] |= IO_NUM_REG_MUTE_OUT; in pcxhr_sub_set_clock()
344 rmh.cmd[1] = 1; in pcxhr_sub_set_clock()
345 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
347 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
351 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); /* set speed ratio */ in pcxhr_sub_set_clock()
352 rmh.cmd[0] |= IO_NUM_SPEED_RATIO; in pcxhr_sub_set_clock()
353 rmh.cmd[1] = speed; in pcxhr_sub_set_clock()
354 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
355 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
371 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_READ); /* unmute outputs */ in pcxhr_sub_set_clock()
372 rmh.cmd[0] |= IO_NUM_REG_MUTE_OUT; in pcxhr_sub_set_clock()
374 rmh.cmd[1] = 1; in pcxhr_sub_set_clock()
375 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
377 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
395 struct pcxhr_rmh rmh; in pcxhr_set_clock() local
410 pcxhr_init_rmh(&rmh, CMD_MODIFY_CLOCK); in pcxhr_set_clock()
411 rmh.cmd[0] |= PCXHR_MODIFY_CLOCK_S_BIT; /* resync fifos */ in pcxhr_set_clock()
413 rmh.cmd[1] = PCXHR_IRQ_TIMER_PERIOD; in pcxhr_set_clock()
415 rmh.cmd[1] = PCXHR_IRQ_TIMER_PERIOD * 2; in pcxhr_set_clock()
416 rmh.cmd[2] = rate; in pcxhr_set_clock()
417 rmh.cmd_len = 3; in pcxhr_set_clock()
418 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_set_clock()
430 struct pcxhr_rmh rmh; in pcxhr_sub_get_external_clock() local
456 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_READ); in pcxhr_sub_get_external_clock()
457 rmh.cmd_len = 2; in pcxhr_sub_get_external_clock()
458 rmh.cmd[0] |= IO_NUM_REG_STATUS; in pcxhr_sub_get_external_clock()
460 rmh.cmd[1] = reg; in pcxhr_sub_get_external_clock()
461 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_get_external_clock()
467 rmh.cmd[1] = REG_STATUS_CURRENT; in pcxhr_sub_get_external_clock()
468 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_get_external_clock()
471 switch (rmh.stat[1] & 0x0f) { in pcxhr_sub_get_external_clock()
508 struct pcxhr_rmh rmh; in pcxhr_set_stream_state() local
532 pcxhr_init_rmh(&rmh, start ? CMD_START_STREAM : CMD_STOP_STREAM); in pcxhr_set_stream_state()
533 pcxhr_set_pipe_cmd_params(&rmh, stream->pipe->is_capture, in pcxhr_set_stream_state()
538 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_set_stream_state()
560 struct pcxhr_rmh rmh; in pcxhr_set_format() local
604 pcxhr_init_rmh(&rmh, is_capture ? in pcxhr_set_format()
606 pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, in pcxhr_set_format()
612 rmh.cmd[0] |= 1<<10; in pcxhr_set_format()
614 rmh.cmd[0] |= 1<<12; in pcxhr_set_format()
616 rmh.cmd[1] = 0; in pcxhr_set_format()
617 rmh.cmd_len = 2; in pcxhr_set_format()
620 rmh.cmd[1] = stream->channels; in pcxhr_set_format()
623 rmh.cmd[2] = (stream->channels == 1) ? 0x01 : 0x03; in pcxhr_set_format()
624 rmh.cmd_len = 3; in pcxhr_set_format()
627 rmh.cmd[rmh.cmd_len++] = header >> 8; in pcxhr_set_format()
628 rmh.cmd[rmh.cmd_len++] = (header & 0xff) << 16; in pcxhr_set_format()
629 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_set_format()
639 struct pcxhr_rmh rmh; in pcxhr_update_r_buffer() local
652 pcxhr_init_rmh(&rmh, CMD_UPDATE_R_BUFFERS); in pcxhr_update_r_buffer()
653 pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, in pcxhr_update_r_buffer()
659 rmh.cmd[1] = subs->runtime->dma_bytes * 8; in pcxhr_update_r_buffer()
661 rmh.cmd[2] = subs->runtime->dma_addr >> 24; in pcxhr_update_r_buffer()
663 rmh.cmd[2] |= 1<<19; in pcxhr_update_r_buffer()
665 rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD; in pcxhr_update_r_buffer()
666 rmh.cmd_len = 4; in pcxhr_update_r_buffer()
667 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_update_r_buffer()
679 struct pcxhr_rmh rmh;
682 pcxhr_init_rmh(&rmh, CMD_PIPE_SAMPLE_COUNT);
683 pcxhr_set_pipe_cmd_params(&rmh, stream->pipe->is_capture, 0, 0,
685 err = pcxhr_send_msg(chip->mgr, &rmh);
687 *sample_count = ((snd_pcm_uframes_t)rmh.stat[0]) << 24;
688 *sample_count += (snd_pcm_uframes_t)rmh.stat[1];
895 struct pcxhr_rmh rmh; in pcxhr_hardware_timer() local
898 pcxhr_init_rmh(&rmh, CMD_SET_TIMER_INTERRUPT); in pcxhr_hardware_timer()
902 rmh.cmd[0] |= mgr->granularity; in pcxhr_hardware_timer()
904 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_hardware_timer()
1259 struct pcxhr_rmh rmh; in pcxhr_proc_info() local
1273 pcxhr_init_rmh(&rmh, CMD_GET_DSP_RESOURCES); in pcxhr_proc_info()
1274 if( ! pcxhr_send_msg(mgr, &rmh) ) { in pcxhr_proc_info()
1275 int cur = rmh.stat[0]; in pcxhr_proc_info()
1276 int ref = rmh.stat[1]; in pcxhr_proc_info()
1289 rmh.stat[2], rmh.stat[3]); in pcxhr_proc_info()
1303 rmh.cmd[0] = 0x4200 + PCXHR_SIZE_MAX_STATUS; in pcxhr_proc_info()
1304 rmh.cmd_len = 1; in pcxhr_proc_info()
1305 rmh.stat_len = PCXHR_SIZE_MAX_STATUS; in pcxhr_proc_info()
1306 rmh.dsp_stat = 0; in pcxhr_proc_info()
1307 rmh.cmd_idx = CMD_LAST_INDEX; in pcxhr_proc_info()
1308 if( ! pcxhr_send_msg(mgr, &rmh) ) { in pcxhr_proc_info()
1310 if (rmh.stat_len > 8) in pcxhr_proc_info()
1311 rmh.stat_len = 8; in pcxhr_proc_info()
1312 for (i = 0; i < rmh.stat_len; i++) in pcxhr_proc_info()
1314 i, rmh.stat[i]); in pcxhr_proc_info()
1412 struct pcxhr_rmh rmh; in pcxhr_proc_ltc() local
1421 pcxhr_init_rmh(&rmh, CMD_MANAGE_SIGNAL); in pcxhr_proc_ltc()
1422 rmh.cmd[0] |= MANAGE_SIGNAL_TIME_CODE; in pcxhr_proc_ltc()
1423 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_proc_ltc()
1435 pcxhr_init_rmh(&rmh, CMD_GET_TIME_CODE); in pcxhr_proc_ltc()
1436 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_proc_ltc()
1441 ltcHrs = 10*((rmh.stat[0] >> 8) & 0x3) + (rmh.stat[0] & 0xf); in pcxhr_proc_ltc()
1442 ltcMin = 10*((rmh.stat[1] >> 16) & 0x7) + ((rmh.stat[1] >> 8) & 0xf); in pcxhr_proc_ltc()
1443 ltcSec = 10*(rmh.stat[1] & 0x7) + ((rmh.stat[2] >> 16) & 0xf); in pcxhr_proc_ltc()
1444 ltcFrm = 10*((rmh.stat[2] >> 8) & 0x3) + (rmh.stat[2] & 0xf); in pcxhr_proc_ltc()
1448 snd_iprintf(buffer, "raw: 0x%04x%06x%06x\n", rmh.stat[0] & 0x00ffff, in pcxhr_proc_ltc()
1449 rmh.stat[1] & 0xffffff, rmh.stat[2] & 0xffffff); in pcxhr_proc_ltc()
1452 if (!(rmh.stat[0] & TIME_CODE_VALID_MASK)) { in pcxhr_proc_ltc()