Lines Matching defs:val
641 static void hdsp_write(struct hdsp *hdsp, int reg, int val)
643 writel(val, hdsp->iobase + reg);
1272 static void snd_hdsp_midi_write_byte (struct hdsp *hdsp, int id, int val)
1276 hdsp_write(hdsp, HDSP_midiDataOut1, val);
1278 hdsp_write(hdsp, HDSP_midiDataOut0, val);
1540 u32 val = 0;
1541 val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? HDSP_SPDIFProfessional : 0;
1542 val |= (aes->status[0] & IEC958_AES0_NONAUDIO) ? HDSP_SPDIFNonAudio : 0;
1543 if (val & HDSP_SPDIFProfessional)
1544 val |= (aes->status[0] & IEC958_AES0_PRO_EMPHASIS_5015) ? HDSP_SPDIFEmphasis : 0;
1546 val |= (aes->status[0] & IEC958_AES0_CON_EMPHASIS_5015) ? HDSP_SPDIFEmphasis : 0;
1547 return val;
1550 static void snd_hdsp_convert_to_aes(struct snd_aes_iec958 *aes, u32 val)
1552 aes->status[0] = ((val & HDSP_SPDIFProfessional) ? IEC958_AES0_PROFESSIONAL : 0) |
1553 ((val & HDSP_SPDIFNonAudio) ? IEC958_AES0_NONAUDIO : 0);
1554 if (val & HDSP_SPDIFProfessional)
1555 aes->status[0] |= (val & HDSP_SPDIFEmphasis) ? IEC958_AES0_PRO_EMPHASIS_5015 : 0;
1557 aes->status[0] |= (val & HDSP_SPDIFEmphasis) ? IEC958_AES0_CON_EMPHASIS_5015 : 0;
1579 u32 val;
1581 val = snd_hdsp_convert_from_aes(&ucontrol->value.iec958);
1583 change = val != hdsp->creg_spdif;
1584 hdsp->creg_spdif = val;
1608 u32 val;
1610 val = snd_hdsp_convert_from_aes(&ucontrol->value.iec958);
1612 change = val != hdsp->creg_spdif_stream;
1613 hdsp->creg_spdif_stream = val;
1615 hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register |= val);
1677 unsigned int val;
1681 val = ucontrol->value.enumerated.item[0] % ((hdsp->io_type == H9632) ? 4 : 3);
1683 change = val != hdsp_spdif_in(hdsp);
1685 hdsp_set_spdif_input(hdsp, val);
1735 unsigned int val;
1739 val = ucontrol->value.integer.value[0] & 1;
1741 change = (int) val != hdsp_toggle_setting(hdsp, regmask);
1743 hdsp_set_toggle_setting(hdsp, regmask, val);
2037 int val;
2041 val = ucontrol->value.enumerated.item[0];
2042 if (val < 0) val = 0;
2044 if (val > 9)
2045 val = 9;
2047 if (val > 6)
2048 val = 6;
2051 if (val != hdsp_clock_source(hdsp))
2052 change = (hdsp_set_clock_source(hdsp, val) == 0) ? 1 : 0;
2143 int val;
2147 val = ucontrol->value.enumerated.item[0];
2148 if (val < 0) val = 0;
2149 if (val > 2) val = 2;
2151 if (val != hdsp_da_gain(hdsp))
2152 change = (hdsp_set_da_gain(hdsp, val) == 0) ? 1 : 0;
2222 int val;
2226 val = ucontrol->value.enumerated.item[0];
2227 if (val < 0) val = 0;
2228 if (val > 2) val = 2;
2230 if (val != hdsp_ad_gain(hdsp))
2231 change = (hdsp_set_ad_gain(hdsp, val) == 0) ? 1 : 0;
2301 int val;
2305 val = ucontrol->value.enumerated.item[0];
2306 if (val < 0) val = 0;
2307 if (val > 2) val = 2;
2309 if (val != hdsp_phone_gain(hdsp))
2310 change = (hdsp_set_phone_gain(hdsp, val) == 0) ? 1 : 0;
2418 unsigned int val;
2438 val = ucontrol->value.enumerated.item[0] % max;
2440 change = (int)val != hdsp_pref_sync_ref(hdsp);
2441 hdsp_set_pref_sync_ref(hdsp, val);
2532 unsigned int val;
2536 val = ucontrol->value.integer.value[0] & 1;
2538 change = (int)val != hdsp->precise_ptr;
2539 hdsp_set_precise_pointer(hdsp, val);
2578 unsigned int val;
2582 val = ucontrol->value.integer.value[0] & 1;
2584 change = (int)val != hdsp->use_midi_work;
2585 hdsp_set_use_midi_work(hdsp, val);
2867 int val;
2871 val = ucontrol->value.integer.value[0];
2873 if (val != hdsp_dds_offset(hdsp))
2874 change = (hdsp_set_dds_offset(hdsp, val) == 0) ? 1 : 0;
3012 int val;
3016 val = ucontrol->value.enumerated.item[0];
3017 if (val < 0)
3018 val = 0;
3019 if (val > 4)
3020 val = 4;
3022 if (val != hdsp_rpm_input12(hdsp))
3023 change = (hdsp_set_rpm_input12(hdsp, val) == 0) ? 1 : 0;
3097 int val;
3101 val = ucontrol->value.enumerated.item[0];
3102 if (val < 0)
3103 val = 0;
3104 if (val > 4)
3105 val = 4;
3107 if (val != hdsp_rpm_input34(hdsp))
3108 change = (hdsp_set_rpm_input34(hdsp, val) == 0) ? 1 : 0;
3147 unsigned int val;
3151 val = ucontrol->value.integer.value[0] & 1;
3153 change = (int)val != hdsp_rpm_bypass(hdsp);
3154 hdsp_set_rpm_bypass(hdsp, val);
3199 unsigned int val;
3203 val = ucontrol->value.integer.value[0] & 1;
3205 change = (int)val != hdsp_rpm_disconnect(hdsp);
3206 hdsp_set_rpm_disconnect(hdsp, val);
4564 u32 val = readl(src);
4565 return copy_to_user(dest, &val, 4);