Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/audio/cxd56: Workaround for HW issue of CXD56 #6164

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions drivers/audio/cxd56.c
Expand Up @@ -62,8 +62,8 @@
#define CXD56_IRQ1_BIT_MIC (1 << 6) /* AU0 */
#define CXD56_IRQ1_BIT_I2S1 (1 << 7) /* AU1 */

#define CXD56_VOL_MIN -1020
#define CXD56_VOL_MAX 120
#define CXD56_VOL_MIN (-1020)
#define CXD56_VOL_MAX (-30)
#define CXD56_VOL_MUTE (CXD56_VOL_MIN - 1)
#define CXD56_VOL_RANGE ((CXD56_VOL_MAX - CXD56_VOL_MIN) / 2)
#define CXD56_VOL_NX_TO_CXD56(v) ((int)((float)((v) / 1000.0) * CXD56_VOL_RANGE) \
Expand Down Expand Up @@ -2733,8 +2733,8 @@ static int cxd56_configure(FAR struct audio_lowerhalf_s *lower,
priv->volume = CXD56_VOL_NX_TO_CXD56(volume);

cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_OUT, priv->volume);
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_IN1, priv->volume);
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_IN2, priv->volume);
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_IN1, 0);
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_IN2, 0);
}
else
{
Expand Down Expand Up @@ -2762,8 +2762,8 @@ static int cxd56_configure(FAR struct audio_lowerhalf_s *lower,
else
{
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_OUT, priv->volume);
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_IN1, priv->volume);
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_IN2, priv->volume);
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_IN1, 0);
cxd56_set_volume(CXD56_AUDIO_VOLID_MIXER_IN2, 0);
}

if (CXD56_AUDIO_ECODE_OK != ret)
Expand Down