aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652/hdspm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/rme9652/hdspm.c')
-rw-r--r--sound/pci/rme9652/hdspm.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 38c931c480d9..ab423bc82342 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -540,7 +540,8 @@ static void hdspm_set_sgbuf(struct hdspm * hdspm, struct snd_sg_buf *sgbuf,
540 540
541static inline int HDSPM_bit2freq(int n) 541static inline int HDSPM_bit2freq(int n)
542{ 542{
543 static int bit2freq_tab[] = { 0, 32000, 44100, 48000, 64000, 88200, 543 static const int bit2freq_tab[] = {
544 0, 32000, 44100, 48000, 64000, 88200,
544 96000, 128000, 176400, 192000 }; 545 96000, 128000, 176400, 192000 };
545 if (n < 1 || n > 9) 546 if (n < 1 || n > 9)
546 return 0; 547 return 0;
@@ -582,7 +583,7 @@ static inline int hdspm_read_pb_gain(struct hdspm * hdspm, unsigned int chan,
582 return hdspm->mixer->ch[chan].pb[pb]; 583 return hdspm->mixer->ch[chan].pb[pb];
583} 584}
584 585
585static inline int hdspm_write_in_gain(struct hdspm * hdspm, unsigned int chan, 586static int hdspm_write_in_gain(struct hdspm *hdspm, unsigned int chan,
586 unsigned int in, unsigned short data) 587 unsigned int in, unsigned short data)
587{ 588{
588 if (chan >= HDSPM_MIXER_CHANNELS || in >= HDSPM_MIXER_CHANNELS) 589 if (chan >= HDSPM_MIXER_CHANNELS || in >= HDSPM_MIXER_CHANNELS)
@@ -595,7 +596,7 @@ static inline int hdspm_write_in_gain(struct hdspm * hdspm, unsigned int chan,
595 return 0; 596 return 0;
596} 597}
597 598
598static inline int hdspm_write_pb_gain(struct hdspm * hdspm, unsigned int chan, 599static int hdspm_write_pb_gain(struct hdspm *hdspm, unsigned int chan,
599 unsigned int pb, unsigned short data) 600 unsigned int pb, unsigned short data)
600{ 601{
601 if (chan >= HDSPM_MIXER_CHANNELS || pb >= HDSPM_MIXER_CHANNELS) 602 if (chan >= HDSPM_MIXER_CHANNELS || pb >= HDSPM_MIXER_CHANNELS)
@@ -621,7 +622,7 @@ static inline void snd_hdspm_enable_out(struct hdspm * hdspm, int i, int v)
621} 622}
622 623
623/* check if same process is writing and reading */ 624/* check if same process is writing and reading */
624static inline int snd_hdspm_use_is_exclusive(struct hdspm * hdspm) 625static int snd_hdspm_use_is_exclusive(struct hdspm *hdspm)
625{ 626{
626 unsigned long flags; 627 unsigned long flags;
627 int ret = 1; 628 int ret = 1;
@@ -636,7 +637,7 @@ static inline int snd_hdspm_use_is_exclusive(struct hdspm * hdspm)
636} 637}
637 638
638/* check for external sample rate */ 639/* check for external sample rate */
639static inline int hdspm_external_sample_rate(struct hdspm * hdspm) 640static int hdspm_external_sample_rate(struct hdspm *hdspm)
640{ 641{
641 if (hdspm->is_aes32) { 642 if (hdspm->is_aes32) {
642 unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2); 643 unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
@@ -787,7 +788,7 @@ static inline void hdspm_stop_audio(struct hdspm * s)
787} 788}
788 789
789/* should I silence all or only opened ones ? doit all for first even is 4MB*/ 790/* should I silence all or only opened ones ? doit all for first even is 4MB*/
790static inline void hdspm_silence_playback(struct hdspm * hdspm) 791static void hdspm_silence_playback(struct hdspm *hdspm)
791{ 792{
792 int i; 793 int i;
793 int n = hdspm->period_bytes; 794 int n = hdspm->period_bytes;
@@ -1057,7 +1058,7 @@ static inline int snd_hdspm_midi_output_possible (struct hdspm *hdspm, int id)
1057 return 0; 1058 return 0;
1058} 1059}
1059 1060
1060static inline void snd_hdspm_flush_midi_input (struct hdspm *hdspm, int id) 1061static void snd_hdspm_flush_midi_input(struct hdspm *hdspm, int id)
1061{ 1062{
1062 while (snd_hdspm_midi_input_available (hdspm, id)) 1063 while (snd_hdspm_midi_input_available (hdspm, id))
1063 snd_hdspm_midi_read_byte (hdspm, id); 1064 snd_hdspm_midi_read_byte (hdspm, id);