• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/pci/pcxhr/

Lines Matching defs:rmh

540 static int pcxhr_read_rmh_status(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh)
549 if (rmh->stat_len < PCXHR_SIZE_MAX_STATUS)
551 else max_stat_len = rmh->stat_len;
553 for (i = 0; i < rmh->stat_len; i++) {
570 /* need to update rmh->stat_len on the fly ?? */
572 if (rmh->dsp_stat != RMH_SSIZE_FIXED) {
573 if (rmh->dsp_stat == RMH_SSIZE_ARG) {
574 rmh->stat_len = (data & 0x0000ff) + 1;
577 /* rmh->dsp_stat == RMH_SSIZE_MASK */
578 rmh->stat_len = 1;
582 rmh->stat_len++;
589 if (rmh->cmd_idx < CMD_LAST_INDEX)
593 rmh->stat[i] = data;
595 if (rmh->stat_len > max_stat_len) {
596 snd_printdd("PCXHR : rmh->stat_len=%x too big\n",
597 rmh->stat_len);
598 rmh->stat_len = max_stat_len;
603 static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh)
610 if (snd_BUG_ON(rmh->cmd_len >= PCXHR_SIZE_MAX_CMD))
632 data = rmh->cmd[0];
634 if (rmh->cmd_len > 1)
639 if (rmh->cmd_idx < CMD_LAST_INDEX)
641 data, cmd_names[rmh->cmd_idx]);
652 if (rmh->cmd_len > 1) {
654 data = rmh->cmd_len - 1;
665 for (i=1; i < rmh->cmd_len; i++) {
667 data = rmh->cmd[i];
669 if (rmh->cmd_idx < CMD_LAST_INDEX)
704 rmh->cmd_idx, data);
708 err = pcxhr_read_rmh_status(mgr, rmh);
719 * @rmh: the rmh pointer to be initialized
720 * @cmd: the rmh command to be set
722 void pcxhr_init_rmh(struct pcxhr_rmh *rmh, int cmd)
726 rmh->cmd[0] = pcxhr_dsp_cmds[cmd].opcode;
727 rmh->cmd_len = 1;
728 rmh->stat_len = pcxhr_dsp_cmds[cmd].st_length;
729 rmh->dsp_stat = pcxhr_dsp_cmds[cmd].st_type;
730 rmh->cmd_idx = cmd;
734 void pcxhr_set_pipe_cmd_params(struct pcxhr_rmh *rmh, int capture,
740 rmh->cmd[0] |= 0x800; /* COMMAND_RECORD_MASK */
742 rmh->cmd[0] |= (param1 << FIELD_SIZE);
745 rmh->cmd[0] |= param2;
749 rmh->cmd[1] = param3;
750 rmh->cmd_len = 2;
756 * @rmh: the rmh record to send and receive
760 int pcxhr_send_msg(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh)
765 err = pcxhr_send_msg_nolock(mgr, rmh);
789 struct pcxhr_rmh rmh;
796 pcxhr_init_rmh(&rmh, CMD_CAN_START_PIPE);
799 pcxhr_set_pipe_cmd_params(&rmh, 0, audio, 0, 0);
802 pcxhr_set_pipe_cmd_params(&rmh, 1, audio -
806 err = pcxhr_send_msg(mgr, &rmh);
817 if (rmh.stat[0] == 0)
828 struct pcxhr_rmh rmh;
834 pcxhr_init_rmh(&rmh, CMD_STOP_PIPE);
837 pcxhr_set_pipe_cmd_params(&rmh, 0, audio, 0, 0);
840 pcxhr_set_pipe_cmd_params(&rmh, 1, audio -
844 err = pcxhr_send_msg(mgr, &rmh);
860 struct pcxhr_rmh rmh;
866 pcxhr_init_rmh(&rmh, CMD_CONF_PIPE);
868 pcxhr_set_pipe_cmd_params(&rmh, 0, 0, 0,
871 pcxhr_set_pipe_cmd_params(&rmh, 1, 0, 0,
873 err = pcxhr_send_msg(mgr, &rmh);
885 pcxhr_init_rmh(&rmh, CMD_SEND_IRQA);
886 err = pcxhr_send_msg(mgr, &rmh);
964 struct pcxhr_rmh rmh;
977 pcxhr_init_rmh(&rmh, CMD_ACCESS_IO_WRITE);
978 rmh.cmd[0] |= IO_NUM_REG_CONT;
979 rmh.cmd[1] = mask;
980 rmh.cmd[2] = value;
981 rmh.cmd_len = 3;
982 err = pcxhr_send_msg_nolock(mgr, &rmh);
1118 struct pcxhr_rmh rmh;
1124 pcxhr_init_rmh(&rmh, CMD_STREAM_SAMPLE_COUNT);
1125 pcxhr_set_pipe_cmd_params(&rmh, stream->pipe->is_capture,
1127 /* rmh.stat_len = 2; */ /* 2 resp data for each stream of the pipe */
1129 err = pcxhr_send_msg(mgr, &rmh);
1133 hw_sample_count = ((u_int64_t)rmh.stat[0]) << 24;
1134 hw_sample_count += (u_int64_t)rmh.stat[1];