Lines Matching refs:vol
375 uint16_t vol = 0; in SGTL_SetVolume() local
385 vol = (uint16_t)(volume | (volume << 4U)); in SGTL_SetVolume()
387 … SGTL5000_ADC_VOL_LEFT_CLR_MASK & SGTL5000_ADC_VOL_RIGHT_CLR_MASK, vol); in SGTL_SetVolume()
394 vol = (uint16_t)(volume | (volume << 8U)); in SGTL_SetVolume()
395 ret = SGTL_WriteReg(handle, CHIP_DAC_VOL, vol); in SGTL_SetVolume()
402 vol = (uint16_t)(volume | (volume << 8U)); in SGTL_SetVolume()
403 ret = SGTL_WriteReg(handle, CHIP_ANA_HP_CTRL, vol); in SGTL_SetVolume()
410 vol = (uint16_t)(volume | (volume << 8U)); in SGTL_SetVolume()
411 ret = SGTL_WriteReg(handle, CHIP_LINE_OUT_VOL, vol); in SGTL_SetVolume()
422 uint16_t vol = 0; in SGTL_GetVolume() local
428 ret = SGTL_ReadReg(handle, CHIP_ANA_ADC_CTRL, &vol); in SGTL_GetVolume()
429 vol = (vol & (uint16_t)SGTL5000_ADC_VOL_LEFT_GET_MASK) >> SGTL5000_ADC_VOL_LEFT_SHIFT; in SGTL_GetVolume()
432 ret = SGTL_ReadReg(handle, CHIP_DAC_VOL, &vol); in SGTL_GetVolume()
433 vol = (vol & (uint16_t)SGTL5000_DAC_VOL_LEFT_GET_MASK) >> SGTL5000_DAC_VOL_LEFT_SHIFT; in SGTL_GetVolume()
436 ret = SGTL_ReadReg(handle, CHIP_ANA_HP_CTRL, &vol); in SGTL_GetVolume()
437 vol = (vol & (uint16_t)SGTL5000_HP_VOL_LEFT_GET_MASK) >> SGTL5000_HP_VOL_LEFT_SHIFT; in SGTL_GetVolume()
440 ret = SGTL_ReadReg(handle, CHIP_LINE_OUT_VOL, &vol); in SGTL_GetVolume()
441 … vol = (vol & (uint16_t)SGTL5000_LINE_OUT_VOL_LEFT_GET_MASK) >> SGTL5000_LINE_OUT_VOL_LEFT_SHIFT; in SGTL_GetVolume()
444 vol = 0; in SGTL_GetVolume()
447 return ret == kStatus_Success ? vol : 0U; in SGTL_GetVolume()