Lines Matching defs:val
636 static void hdsp_write(struct hdsp *hdsp, int reg, int val)
638 writel(val, hdsp->iobase + reg);
1267 static void snd_hdsp_midi_write_byte (struct hdsp *hdsp, int id, int val)
1271 hdsp_write(hdsp, HDSP_midiDataOut1, val);
1273 hdsp_write(hdsp, HDSP_midiDataOut0, val);
1538 u32 val = 0;
1539 val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? HDSP_SPDIFProfessional : 0;
1540 val |= (aes->status[0] & IEC958_AES0_NONAUDIO) ? HDSP_SPDIFNonAudio : 0;
1541 if (val & HDSP_SPDIFProfessional)
1542 val |= (aes->status[0] & IEC958_AES0_PRO_EMPHASIS_5015) ? HDSP_SPDIFEmphasis : 0;
1544 val |= (aes->status[0] & IEC958_AES0_CON_EMPHASIS_5015) ? HDSP_SPDIFEmphasis : 0;
1545 return val;
1548 static void snd_hdsp_convert_to_aes(struct snd_aes_iec958 *aes, u32 val)
1550 aes->status[0] = ((val & HDSP_SPDIFProfessional) ? IEC958_AES0_PROFESSIONAL : 0) |
1551 ((val & HDSP_SPDIFNonAudio) ? IEC958_AES0_NONAUDIO : 0);
1552 if (val & HDSP_SPDIFProfessional)
1553 aes->status[0] |= (val & HDSP_SPDIFEmphasis) ? IEC958_AES0_PRO_EMPHASIS_5015 : 0;
1555 aes->status[0] |= (val & HDSP_SPDIFEmphasis) ? IEC958_AES0_CON_EMPHASIS_5015 : 0;
1577 u32 val;
1579 val = snd_hdsp_convert_from_aes(&ucontrol->value.iec958);
1581 change = val != hdsp->creg_spdif;
1582 hdsp->creg_spdif = val;
1606 u32 val;
1608 val = snd_hdsp_convert_from_aes(&ucontrol->value.iec958);
1610 change = val != hdsp->creg_spdif_stream;
1611 hdsp->creg_spdif_stream = val;
1613 hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register |= val);
1675 unsigned int val;
1679 val = ucontrol->value.enumerated.item[0] % ((hdsp->io_type == H9632) ? 4 : 3);
1681 change = val != hdsp_spdif_in(hdsp);
1683 hdsp_set_spdif_input(hdsp, val);
1733 unsigned int val;
1737 val = ucontrol->value.integer.value[0] & 1;
1739 change = (int) val != hdsp_toggle_setting(hdsp, regmask);
1741 hdsp_set_toggle_setting(hdsp, regmask, val);
2035 int val;
2039 val = ucontrol->value.enumerated.item[0];
2040 if (val < 0) val = 0;
2042 if (val > 9)
2043 val = 9;
2045 if (val > 6)
2046 val = 6;
2049 if (val != hdsp_clock_source(hdsp))
2050 change = (hdsp_set_clock_source(hdsp, val) == 0) ? 1 : 0;
2141 int val;
2145 val = ucontrol->value.enumerated.item[0];
2146 if (val < 0) val = 0;
2147 if (val > 2) val = 2;
2149 if (val != hdsp_da_gain(hdsp))
2150 change = (hdsp_set_da_gain(hdsp, val) == 0) ? 1 : 0;
2220 int val;
2224 val = ucontrol->value.enumerated.item[0];
2225 if (val < 0) val = 0;
2226 if (val > 2) val = 2;
2228 if (val != hdsp_ad_gain(hdsp))
2229 change = (hdsp_set_ad_gain(hdsp, val) == 0) ? 1 : 0;
2299 int val;
2303 val = ucontrol->value.enumerated.item[0];
2304 if (val < 0) val = 0;
2305 if (val > 2) val = 2;
2307 if (val != hdsp_phone_gain(hdsp))
2308 change = (hdsp_set_phone_gain(hdsp, val) == 0) ? 1 : 0;
2416 unsigned int val;
2436 val = ucontrol->value.enumerated.item[0] % max;
2438 change = (int)val != hdsp_pref_sync_ref(hdsp);
2439 hdsp_set_pref_sync_ref(hdsp, val);
2530 unsigned int val;
2534 val = ucontrol->value.integer.value[0] & 1;
2536 change = (int)val != hdsp->precise_ptr;
2537 hdsp_set_precise_pointer(hdsp, val);
2576 unsigned int val;
2580 val = ucontrol->value.integer.value[0] & 1;
2582 change = (int)val != hdsp->use_midi_work;
2583 hdsp_set_use_midi_work(hdsp, val);
2865 int val;
2869 val = ucontrol->value.integer.value[0];
2871 if (val != hdsp_dds_offset(hdsp))
2872 change = (hdsp_set_dds_offset(hdsp, val) == 0) ? 1 : 0;
3010 int val;
3014 val = ucontrol->value.enumerated.item[0];
3015 if (val < 0)
3016 val = 0;
3017 if (val > 4)
3018 val = 4;
3020 if (val != hdsp_rpm_input12(hdsp))
3021 change = (hdsp_set_rpm_input12(hdsp, val) == 0) ? 1 : 0;
3095 int val;
3099 val = ucontrol->value.enumerated.item[0];
3100 if (val < 0)
3101 val = 0;
3102 if (val > 4)
3103 val = 4;
3105 if (val != hdsp_rpm_input34(hdsp))
3106 change = (hdsp_set_rpm_input34(hdsp, val) == 0) ? 1 : 0;
3145 unsigned int val;
3149 val = ucontrol->value.integer.value[0] & 1;
3151 change = (int)val != hdsp_rpm_bypass(hdsp);
3152 hdsp_set_rpm_bypass(hdsp, val);
3197 unsigned int val;
3201 val = ucontrol->value.integer.value[0] & 1;
3203 change = (int)val != hdsp_rpm_disconnect(hdsp);
3204 hdsp_set_rpm_disconnect(hdsp, val);
4607 u32 val = readl(src);
4608 return copy_to_user(dest, &val, 4);