Lines Matching refs:rmh

238 	struct pcxhr_rmh rmh;  in pcxhr_get_clock_reg()  local
266 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); in pcxhr_get_clock_reg()
267 rmh.cmd[0] |= IO_NUM_REG_GENCLK; in pcxhr_get_clock_reg()
268 rmh.cmd[1] = pllreg & MASK_DSP_WORD; in pcxhr_get_clock_reg()
269 rmh.cmd[2] = pllreg >> 24; in pcxhr_get_clock_reg()
270 rmh.cmd_len = 3; in pcxhr_get_clock_reg()
271 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_get_clock_reg()
312 struct pcxhr_rmh rmh; in pcxhr_sub_set_clock() local
327 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); /* mute outputs */ in pcxhr_sub_set_clock()
328 rmh.cmd[0] |= IO_NUM_REG_MUTE_OUT; in pcxhr_sub_set_clock()
330 rmh.cmd[1] = 1; in pcxhr_sub_set_clock()
331 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
333 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
337 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE); /* set speed ratio */ in pcxhr_sub_set_clock()
338 rmh.cmd[0] |= IO_NUM_SPEED_RATIO; in pcxhr_sub_set_clock()
339 rmh.cmd[1] = speed; in pcxhr_sub_set_clock()
340 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
341 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
357 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_READ); /* unmute outputs */ in pcxhr_sub_set_clock()
358 rmh.cmd[0] |= IO_NUM_REG_MUTE_OUT; in pcxhr_sub_set_clock()
360 rmh.cmd[1] = 1; in pcxhr_sub_set_clock()
361 rmh.cmd_len = 2; in pcxhr_sub_set_clock()
363 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_set_clock()
381 struct pcxhr_rmh rmh; in pcxhr_set_clock() local
396 pcxhr_init_rmh(&rmh, CMD_MODIFY_CLOCK); in pcxhr_set_clock()
397 rmh.cmd[0] |= PCXHR_MODIFY_CLOCK_S_BIT; /* resync fifos */ in pcxhr_set_clock()
399 rmh.cmd[1] = PCXHR_IRQ_TIMER_PERIOD; in pcxhr_set_clock()
401 rmh.cmd[1] = PCXHR_IRQ_TIMER_PERIOD * 2; in pcxhr_set_clock()
402 rmh.cmd[2] = rate; in pcxhr_set_clock()
403 rmh.cmd_len = 3; in pcxhr_set_clock()
404 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_set_clock()
416 struct pcxhr_rmh rmh; in pcxhr_sub_get_external_clock() local
442 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_READ); in pcxhr_sub_get_external_clock()
443 rmh.cmd_len = 2; in pcxhr_sub_get_external_clock()
444 rmh.cmd[0] |= IO_NUM_REG_STATUS; in pcxhr_sub_get_external_clock()
446 rmh.cmd[1] = reg; in pcxhr_sub_get_external_clock()
447 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_get_external_clock()
453 rmh.cmd[1] = REG_STATUS_CURRENT; in pcxhr_sub_get_external_clock()
454 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_sub_get_external_clock()
457 switch (rmh.stat[1] & 0x0f) { in pcxhr_sub_get_external_clock()
494 struct pcxhr_rmh rmh; in pcxhr_set_stream_state() local
518 pcxhr_init_rmh(&rmh, start ? CMD_START_STREAM : CMD_STOP_STREAM); in pcxhr_set_stream_state()
519 pcxhr_set_pipe_cmd_params(&rmh, stream->pipe->is_capture, in pcxhr_set_stream_state()
524 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_set_stream_state()
546 struct pcxhr_rmh rmh; in pcxhr_set_format() local
590 pcxhr_init_rmh(&rmh, is_capture ? in pcxhr_set_format()
592 pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, in pcxhr_set_format()
598 rmh.cmd[0] |= 1<<10; in pcxhr_set_format()
600 rmh.cmd[0] |= 1<<12; in pcxhr_set_format()
602 rmh.cmd[1] = 0; in pcxhr_set_format()
603 rmh.cmd_len = 2; in pcxhr_set_format()
606 rmh.cmd[1] = stream->channels; in pcxhr_set_format()
609 rmh.cmd[2] = (stream->channels == 1) ? 0x01 : 0x03; in pcxhr_set_format()
610 rmh.cmd_len = 3; in pcxhr_set_format()
613 rmh.cmd[rmh.cmd_len++] = header >> 8; in pcxhr_set_format()
614 rmh.cmd[rmh.cmd_len++] = (header & 0xff) << 16; in pcxhr_set_format()
615 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_set_format()
625 struct pcxhr_rmh rmh; in pcxhr_update_r_buffer() local
638 pcxhr_init_rmh(&rmh, CMD_UPDATE_R_BUFFERS); in pcxhr_update_r_buffer()
639 pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, in pcxhr_update_r_buffer()
645 rmh.cmd[1] = subs->runtime->dma_bytes * 8; in pcxhr_update_r_buffer()
647 rmh.cmd[2] = subs->runtime->dma_addr >> 24; in pcxhr_update_r_buffer()
649 rmh.cmd[2] |= 1<<19; in pcxhr_update_r_buffer()
651 rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD; in pcxhr_update_r_buffer()
652 rmh.cmd_len = 4; in pcxhr_update_r_buffer()
653 err = pcxhr_send_msg(chip->mgr, &rmh); in pcxhr_update_r_buffer()
665 struct pcxhr_rmh rmh;
668 pcxhr_init_rmh(&rmh, CMD_PIPE_SAMPLE_COUNT);
669 pcxhr_set_pipe_cmd_params(&rmh, stream->pipe->is_capture, 0, 0,
671 err = pcxhr_send_msg(chip->mgr, &rmh);
673 *sample_count = ((snd_pcm_uframes_t)rmh.stat[0]) << 24;
674 *sample_count += (snd_pcm_uframes_t)rmh.stat[1];
880 struct pcxhr_rmh rmh; in pcxhr_hardware_timer() local
883 pcxhr_init_rmh(&rmh, CMD_SET_TIMER_INTERRUPT); in pcxhr_hardware_timer()
887 rmh.cmd[0] |= mgr->granularity; in pcxhr_hardware_timer()
889 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_hardware_timer()
1227 struct pcxhr_rmh rmh; in pcxhr_proc_info() local
1241 pcxhr_init_rmh(&rmh, CMD_GET_DSP_RESOURCES); in pcxhr_proc_info()
1242 if( ! pcxhr_send_msg(mgr, &rmh) ) { in pcxhr_proc_info()
1243 int cur = rmh.stat[0]; in pcxhr_proc_info()
1244 int ref = rmh.stat[1]; in pcxhr_proc_info()
1257 rmh.stat[2], rmh.stat[3]); in pcxhr_proc_info()
1271 rmh.cmd[0] = 0x4200 + PCXHR_SIZE_MAX_STATUS; in pcxhr_proc_info()
1272 rmh.cmd_len = 1; in pcxhr_proc_info()
1273 rmh.stat_len = PCXHR_SIZE_MAX_STATUS; in pcxhr_proc_info()
1274 rmh.dsp_stat = 0; in pcxhr_proc_info()
1275 rmh.cmd_idx = CMD_LAST_INDEX; in pcxhr_proc_info()
1276 if( ! pcxhr_send_msg(mgr, &rmh) ) { in pcxhr_proc_info()
1278 if (rmh.stat_len > 8) in pcxhr_proc_info()
1279 rmh.stat_len = 8; in pcxhr_proc_info()
1280 for (i = 0; i < rmh.stat_len; i++) in pcxhr_proc_info()
1282 i, rmh.stat[i]); in pcxhr_proc_info()
1380 struct pcxhr_rmh rmh; in pcxhr_proc_ltc() local
1389 pcxhr_init_rmh(&rmh, CMD_MANAGE_SIGNAL); in pcxhr_proc_ltc()
1390 rmh.cmd[0] |= MANAGE_SIGNAL_TIME_CODE; in pcxhr_proc_ltc()
1391 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_proc_ltc()
1403 pcxhr_init_rmh(&rmh, CMD_GET_TIME_CODE); in pcxhr_proc_ltc()
1404 err = pcxhr_send_msg(mgr, &rmh); in pcxhr_proc_ltc()
1409 ltcHrs = 10*((rmh.stat[0] >> 8) & 0x3) + (rmh.stat[0] & 0xf); in pcxhr_proc_ltc()
1410 ltcMin = 10*((rmh.stat[1] >> 16) & 0x7) + ((rmh.stat[1] >> 8) & 0xf); in pcxhr_proc_ltc()
1411 ltcSec = 10*(rmh.stat[1] & 0x7) + ((rmh.stat[2] >> 16) & 0xf); in pcxhr_proc_ltc()
1412 ltcFrm = 10*((rmh.stat[2] >> 8) & 0x3) + (rmh.stat[2] & 0xf); in pcxhr_proc_ltc()
1416 snd_iprintf(buffer, "raw: 0x%04x%06x%06x\n", rmh.stat[0] & 0x00ffff, in pcxhr_proc_ltc()
1417 rmh.stat[1] & 0xffffff, rmh.stat[2] & 0xffffff); in pcxhr_proc_ltc()
1420 if (!(rmh.stat[0] & TIME_CODE_VALID_MASK)) { in pcxhr_proc_ltc()