jinxiuxu commented on code in PR #13107:
URL: https://github.com/apache/nuttx/pull/13107#discussion_r1730493325
##########
drivers/audio/es8311.c:
##########
@@ -865,11 +863,11 @@ static int es8311_getcaps(FAR struct audio_lowerhalf_s
*dev, int type,
{
/* Report supported input sample rates */
- ptr = (uint16_t *)caps->ac_controls.b;
- *ptr =
+ caps->ac_controls.hw[0] =
AUDIO_SAMP_RATE_11K | AUDIO_SAMP_RATE_16K |
AUDIO_SAMP_RATE_22K | AUDIO_SAMP_RATE_32K |
AUDIO_SAMP_RATE_44K | AUDIO_SAMP_RATE_48K;
+ caps->ac_controls.hw[1] = 0;
Review Comment:
Previously removed when adding 12K support, now added back.
##########
drivers/audio/es8311.c:
##########
@@ -847,11 +845,11 @@ static int es8311_getcaps(FAR struct audio_lowerhalf_s
*dev, int type,
/* 8kHz is hardware dependent */
- ptr = (uint16_t *)caps->ac_controls.b;
- *ptr =
+ caps->ac_controls.hw[0] =
AUDIO_SAMP_RATE_11K | AUDIO_SAMP_RATE_16K |
AUDIO_SAMP_RATE_22K | AUDIO_SAMP_RATE_32K |
AUDIO_SAMP_RATE_44K | AUDIO_SAMP_RATE_48K;
+ caps->ac_controls.hw[1] = 0;
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]