Lines Matching refs:rmh
239 struct pcxhr_rmh rmh; in pcxhr_get_clock_reg() local
267 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); in pcxhr_get_clock_reg()
268 rmh.cmd[0] |= IO_NUM_REG_GENCLK; in pcxhr_get_clock_reg()
269 rmh.cmd[1] = pllreg & MASK_DSP_WORD; in pcxhr_get_clock_reg()
270 rmh.cmd[2] = pllreg >> 24; in pcxhr_get_clock_reg()
271 rmh.cmd_len = 3; in pcxhr_get_clock_reg()
272 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_get_clock_reg()
313 struct pcxhr_rmh rmh; in pcxhr_sub_set_clock() local
328 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); /* mute outputs */ in pcxhr_sub_set_clock()
329 rmh.cmd[0] |= IO_NUM_REG_MUTE_OUT; in pcxhr_sub_set_clock()
331 rmh.cmd[1] = 1; in pcxhr_sub_set_clock()
332 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
334 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
338 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); /* set speed ratio */ in pcxhr_sub_set_clock()
339 rmh.cmd[0] |= IO_NUM_SPEED_RATIO; in pcxhr_sub_set_clock()
340 rmh.cmd[1] = speed; in pcxhr_sub_set_clock()
341 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
342 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
358 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_READ); /* unmute outputs */ in pcxhr_sub_set_clock()
359 rmh.cmd[0] |= IO_NUM_REG_MUTE_OUT; in pcxhr_sub_set_clock()
361 rmh.cmd[1] = 1; in pcxhr_sub_set_clock()
362 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
364 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
382 struct pcxhr_rmh rmh; in pcxhr_set_clock() local
397 pcxhr_init_rmh(&rmh, CMD_MODIFY_CLOCK); in pcxhr_set_clock()
398 rmh.cmd[0] |= PCXHR_MODIFY_CLOCK_S_BIT; /* resync fifos */ in pcxhr_set_clock()
400 rmh.cmd[1] = PCXHR_IRQ_TIMER_PERIOD; in pcxhr_set_clock()
402 rmh.cmd[1] = PCXHR_IRQ_TIMER_PERIOD * 2; in pcxhr_set_clock()
403 rmh.cmd[2] = rate; in pcxhr_set_clock()
404 rmh.cmd_len = 3; in pcxhr_set_clock()
405 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_set_clock()
417 struct pcxhr_rmh rmh; in pcxhr_sub_get_external_clock() local
443 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_READ); in pcxhr_sub_get_external_clock()
444 rmh.cmd_len = 2; in pcxhr_sub_get_external_clock()
445 rmh.cmd[0] |= IO_NUM_REG_STATUS; in pcxhr_sub_get_external_clock()
447 rmh.cmd[1] = reg; in pcxhr_sub_get_external_clock()
448 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_get_external_clock()
454 rmh.cmd[1] = REG_STATUS_CURRENT; in pcxhr_sub_get_external_clock()
455 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_get_external_clock()
458 switch (rmh.stat[1] & 0x0f) { in pcxhr_sub_get_external_clock()
495 struct pcxhr_rmh rmh; in pcxhr_set_stream_state() local
519 pcxhr_init_rmh(&rmh, start ? CMD_START_STREAM : CMD_STOP_STREAM); in pcxhr_set_stream_state()
520 pcxhr_set_pipe_cmd_params(&rmh, stream->pipe->is_capture, in pcxhr_set_stream_state()
525 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_set_stream_state()
547 struct pcxhr_rmh rmh; in pcxhr_set_format() local
591 pcxhr_init_rmh(&rmh, is_capture ? in pcxhr_set_format()
593 pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, in pcxhr_set_format()
599 rmh.cmd[0] |= 1<<10; in pcxhr_set_format()
601 rmh.cmd[0] |= 1<<12; in pcxhr_set_format()
603 rmh.cmd[1] = 0; in pcxhr_set_format()
604 rmh.cmd_len = 2; in pcxhr_set_format()
607 rmh.cmd[1] = stream->channels; in pcxhr_set_format()
610 rmh.cmd[2] = (stream->channels == 1) ? 0x01 : 0x03; in pcxhr_set_format()
611 rmh.cmd_len = 3; in pcxhr_set_format()
614 rmh.cmd[rmh.cmd_len++] = header >> 8; in pcxhr_set_format()
615 rmh.cmd[rmh.cmd_len++] = (header & 0xff) << 16; in pcxhr_set_format()
616 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_set_format()
626 struct pcxhr_rmh rmh; in pcxhr_update_r_buffer() local
639 pcxhr_init_rmh(&rmh, CMD_UPDATE_R_BUFFERS); in pcxhr_update_r_buffer()
640 pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, in pcxhr_update_r_buffer()
646 rmh.cmd[1] = subs->runtime->dma_bytes * 8; in pcxhr_update_r_buffer()
648 rmh.cmd[2] = subs->runtime->dma_addr >> 24; in pcxhr_update_r_buffer()
650 rmh.cmd[2] |= 1<<19; in pcxhr_update_r_buffer()
652 rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD; in pcxhr_update_r_buffer()
653 rmh.cmd_len = 4; in pcxhr_update_r_buffer()
654 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_update_r_buffer()
666 struct pcxhr_rmh rmh;
669 pcxhr_init_rmh(&rmh, CMD_PIPE_SAMPLE_COUNT);
670 pcxhr_set_pipe_cmd_params(&rmh, stream->pipe->is_capture, 0, 0,
672 err = pcxhr_send_msg(chip->mgr, &rmh);
674 *sample_count = ((snd_pcm_uframes_t)rmh.stat[0]) << 24;
675 *sample_count += (snd_pcm_uframes_t)rmh.stat[1];
882 struct pcxhr_rmh rmh; in pcxhr_hardware_timer() local
885 pcxhr_init_rmh(&rmh, CMD_SET_TIMER_INTERRUPT); in pcxhr_hardware_timer()
889 rmh.cmd[0] |= mgr->granularity; in pcxhr_hardware_timer()
891 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_hardware_timer()
1244 struct pcxhr_rmh rmh; in pcxhr_proc_info() local
1258 pcxhr_init_rmh(&rmh, CMD_GET_DSP_RESOURCES); in pcxhr_proc_info()
1259 if( ! pcxhr_send_msg(mgr, &rmh) ) { in pcxhr_proc_info()
1260 int cur = rmh.stat[0]; in pcxhr_proc_info()
1261 int ref = rmh.stat[1]; in pcxhr_proc_info()
1274 rmh.stat[2], rmh.stat[3]); in pcxhr_proc_info()
1288 rmh.cmd[0] = 0x4200 + PCXHR_SIZE_MAX_STATUS; in pcxhr_proc_info()
1289 rmh.cmd_len = 1; in pcxhr_proc_info()
1290 rmh.stat_len = PCXHR_SIZE_MAX_STATUS; in pcxhr_proc_info()
1291 rmh.dsp_stat = 0; in pcxhr_proc_info()
1292 rmh.cmd_idx = CMD_LAST_INDEX; in pcxhr_proc_info()
1293 if( ! pcxhr_send_msg(mgr, &rmh) ) { in pcxhr_proc_info()
1295 if (rmh.stat_len > 8) in pcxhr_proc_info()
1296 rmh.stat_len = 8; in pcxhr_proc_info()
1297 for (i = 0; i < rmh.stat_len; i++) in pcxhr_proc_info()
1299 i, rmh.stat[i]); in pcxhr_proc_info()
1397 struct pcxhr_rmh rmh; in pcxhr_proc_ltc() local
1406 pcxhr_init_rmh(&rmh, CMD_MANAGE_SIGNAL); in pcxhr_proc_ltc()
1407 rmh.cmd[0] |= MANAGE_SIGNAL_TIME_CODE; in pcxhr_proc_ltc()
1408 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_proc_ltc()
1420 pcxhr_init_rmh(&rmh, CMD_GET_TIME_CODE); in pcxhr_proc_ltc()
1421 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_proc_ltc()
1426 ltcHrs = 10*((rmh.stat[0] >> 8) & 0x3) + (rmh.stat[0] & 0xf); in pcxhr_proc_ltc()
1427 ltcMin = 10*((rmh.stat[1] >> 16) & 0x7) + ((rmh.stat[1] >> 8) & 0xf); in pcxhr_proc_ltc()
1428 ltcSec = 10*(rmh.stat[1] & 0x7) + ((rmh.stat[2] >> 16) & 0xf); in pcxhr_proc_ltc()
1429 ltcFrm = 10*((rmh.stat[2] >> 8) & 0x3) + (rmh.stat[2] & 0xf); in pcxhr_proc_ltc()
1433 snd_iprintf(buffer, "raw: 0x%04x%06x%06x\n", rmh.stat[0] & 0x00ffff, in pcxhr_proc_ltc()
1434 rmh.stat[1] & 0xffffff, rmh.stat[2] & 0xffffff); in pcxhr_proc_ltc()
1437 if (!(rmh.stat[0] & TIME_CODE_VALID_MASK)) { in pcxhr_proc_ltc()