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

Dynamic HDMI device selection #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gkdeepa
Copy link
Contributor

@gkdeepa gkdeepa commented Aug 12, 2021

Check for the HDMI device status
and assign the device id

Tracked-On:

@gkdeepa gkdeepa force-pushed the audio_hdmi_dynamic branch 2 times, most recently from 2b0e5b4 to 772ee74 Compare August 12, 2021 17:42
hdmi/tinyaudio_hw.c Show resolved Hide resolved
}
}
ALOGV("%s exit",__func__);
return DEFAULT_DEVICE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to return -1 from here, and hardcode the default from the caller ?

ALOGV("ctl_name %s",ctl_name);
ctl = mixer_get_ctl_by_name(mixer, ctl_name);
if(ctl) {
mixer_type = mixer_ctl_get_type(ctl);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these variables are unused, should we remove these ?

return -1;
}
for(i=0; i < MAX_HDMI_DEVICES; i++ ) {
char ctl_name[100] = "HDMI/DP,pcm=";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do this instead :

sprintf(ctl_name, "HDMI/DP,pcm=%d Jack", i);

@gkdeepa gkdeepa force-pushed the audio_hdmi_dynamic branch 2 times, most recently from 39df263 to 87ca340 Compare August 24, 2021 14:27
@gkdeepa gkdeepa force-pushed the audio_hdmi_dynamic branch 7 times, most recently from 34c29b8 to 680dbf9 Compare September 1, 2021 13:34
@gkdeepa gkdeepa force-pushed the audio_hdmi_dynamic branch 2 times, most recently from 3866bf7 to fc55db6 Compare September 3, 2021 09:38
Check for the HDMI device status
and assign the device id

Tracked-On: OAM-98156
@sysopenci sysopenci added the Stale Stale label for inactive open prs label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Stale label for inactive open prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants