Commit 3d56c8e6 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hdspm - Fix uninitialized compile warnings

Put the exception checks for io_type switch() for possible mistakes in
future.  Also this shuts up annoying compile warnings.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 02651d1a
...@@ -1339,6 +1339,10 @@ static u64 hdspm_calc_dds_value(struct hdspm *hdspm, u64 period) ...@@ -1339,6 +1339,10 @@ static u64 hdspm_calc_dds_value(struct hdspm *hdspm, u64 period)
break; break;
case MADIface: case MADIface:
freq_const = 131072000000000ULL; freq_const = 131072000000000ULL;
break;
default:
snd_BUG();
return 0;
} }
return div_u64(freq_const, period); return div_u64(freq_const, period);
...@@ -1356,16 +1360,19 @@ static void hdspm_set_dds_value(struct hdspm *hdspm, int rate) ...@@ -1356,16 +1360,19 @@ static void hdspm_set_dds_value(struct hdspm *hdspm, int rate)
switch (hdspm->io_type) { switch (hdspm->io_type) {
case MADIface: case MADIface:
n = 131072000000000ULL; /* 125 MHz */ n = 131072000000000ULL; /* 125 MHz */
break; break;
case MADI: case MADI:
case AES32: case AES32:
n = 110069313433624ULL; /* 105 MHz */ n = 110069313433624ULL; /* 105 MHz */
break; break;
case RayDAT: case RayDAT:
case AIO: case AIO:
n = 104857600000000ULL; /* 100 MHz */ n = 104857600000000ULL; /* 100 MHz */
break; break;
default:
snd_BUG();
return;
} }
n = div_u64(n, rate); n = div_u64(n, rate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment