| .. | .. |
|---|
| 635 | 635 | Meters is an array [3][16][2] of long. */ |
|---|
| 636 | 636 | static void get_audio_meters(struct echoaudio *chip, long *meters) |
|---|
| 637 | 637 | { |
|---|
| 638 | | - int i, m, n; |
|---|
| 638 | + unsigned int i, m, n; |
|---|
| 639 | 639 | |
|---|
| 640 | | - m = 0; |
|---|
| 641 | | - n = 0; |
|---|
| 642 | | - for (i = 0; i < num_busses_out(chip); i++, m++) { |
|---|
| 640 | + for (i = 0 ; i < 96; i++) |
|---|
| 641 | + meters[i] = 0; |
|---|
| 642 | + |
|---|
| 643 | + for (m = 0, n = 0, i = 0; i < num_busses_out(chip); i++, m++) { |
|---|
| 643 | 644 | meters[n++] = chip->comm_page->vu_meter[m]; |
|---|
| 644 | 645 | meters[n++] = chip->comm_page->peak_meter[m]; |
|---|
| 645 | 646 | } |
|---|
| 646 | | - for (; n < 32; n++) |
|---|
| 647 | | - meters[n] = 0; |
|---|
| 648 | 647 | |
|---|
| 649 | 648 | #ifdef ECHOCARD_ECHO3G |
|---|
| 650 | 649 | m = E3G_MAX_OUTPUTS; /* Skip unused meters */ |
|---|
| 651 | 650 | #endif |
|---|
| 652 | 651 | |
|---|
| 653 | | - for (i = 0; i < num_busses_in(chip); i++, m++) { |
|---|
| 652 | + for (n = 32, i = 0; i < num_busses_in(chip); i++, m++) { |
|---|
| 654 | 653 | meters[n++] = chip->comm_page->vu_meter[m]; |
|---|
| 655 | 654 | meters[n++] = chip->comm_page->peak_meter[m]; |
|---|
| 656 | 655 | } |
|---|
| 657 | | - for (; n < 64; n++) |
|---|
| 658 | | - meters[n] = 0; |
|---|
| 659 | | - |
|---|
| 660 | 656 | #ifdef ECHOCARD_HAS_VMIXER |
|---|
| 661 | | - for (i = 0; i < num_pipes_out(chip); i++, m++) { |
|---|
| 657 | + for (n = 64, i = 0; i < num_pipes_out(chip); i++, m++) { |
|---|
| 662 | 658 | meters[n++] = chip->comm_page->vu_meter[m]; |
|---|
| 663 | 659 | meters[n++] = chip->comm_page->peak_meter[m]; |
|---|
| 664 | 660 | } |
|---|
| 665 | 661 | #endif |
|---|
| 666 | | - for (; n < 96; n++) |
|---|
| 667 | | - meters[n] = 0; |
|---|
| 668 | 662 | } |
|---|
| 669 | 663 | |
|---|
| 670 | 664 | |
|---|
| .. | .. |
|---|
| 904 | 898 | return 0; |
|---|
| 905 | 899 | } |
|---|
| 906 | 900 | |
|---|
| 907 | | - dev_warn(chip->card->dev, "pause_transport: No pipes to stop!\n"); |
|---|
| 901 | + dev_dbg(chip->card->dev, "pause_transport: No pipes to stop!\n"); |
|---|
| 908 | 902 | return 0; |
|---|
| 909 | 903 | } |
|---|
| 910 | 904 | |
|---|
| .. | .. |
|---|
| 930 | 924 | return 0; |
|---|
| 931 | 925 | } |
|---|
| 932 | 926 | |
|---|
| 933 | | - dev_warn(chip->card->dev, "stop_transport: No pipes to stop!\n"); |
|---|
| 927 | + dev_dbg(chip->card->dev, "stop_transport: No pipes to stop!\n"); |
|---|
| 934 | 928 | return 0; |
|---|
| 935 | 929 | } |
|---|
| 936 | 930 | |
|---|
| .. | .. |
|---|
| 1058 | 1052 | { |
|---|
| 1059 | 1053 | int i; |
|---|
| 1060 | 1054 | u32 channel_mask; |
|---|
| 1061 | | - char is_cyclic; |
|---|
| 1062 | 1055 | |
|---|
| 1063 | 1056 | dev_dbg(chip->card->dev, |
|---|
| 1064 | 1057 | "allocate_pipes: ch=%d int=%d\n", pipe_index, interleave); |
|---|
| 1065 | 1058 | |
|---|
| 1066 | 1059 | if (chip->bad_board) |
|---|
| 1067 | 1060 | return -EIO; |
|---|
| 1068 | | - |
|---|
| 1069 | | - is_cyclic = 1; /* This driver uses cyclic buffers only */ |
|---|
| 1070 | 1061 | |
|---|
| 1071 | 1062 | for (channel_mask = i = 0; i < interleave; i++) |
|---|
| 1072 | 1063 | channel_mask |= 1 << (pipe_index + i); |
|---|
| .. | .. |
|---|
| 1078 | 1069 | |
|---|
| 1079 | 1070 | chip->comm_page->position[pipe_index] = 0; |
|---|
| 1080 | 1071 | chip->pipe_alloc_mask |= channel_mask; |
|---|
| 1081 | | - if (is_cyclic) |
|---|
| 1082 | | - chip->pipe_cyclic_mask |= channel_mask; |
|---|
| 1072 | + /* This driver uses cyclic buffers only */ |
|---|
| 1073 | + chip->pipe_cyclic_mask |= channel_mask; |
|---|
| 1083 | 1074 | pipe->index = pipe_index; |
|---|
| 1084 | 1075 | pipe->interleave = interleave; |
|---|
| 1085 | 1076 | pipe->state = PIPE_STATE_STOPPED; |
|---|