Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you clarify for me how this is released? there is no matching 'release' for the 'new'.
Also should we add those controls once the hdac_hdmi_jack_init() succceds below, otherwise you may expose controls that are not functional.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart ALSA jack has a mechanism that it will release them automatically. Jack is seemed as a snd_device. So when driver is removed, the snd_deivce's dev_free() will be called by alsa core. In Jack's dev_free(), it will free all the resource. So you will see there is no free kctl code in our audio driver. You can refer jack.c: snd_jack_dev_free()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the hdac_hdmi_jack_init() function has no relationship with the HDMI Jack kctl. They are totally doing the different things. snd_jack_add_new_kctl() only depends on the "snd_soc_card_jack_new()".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@libinyang what do you mean that they are doing different things, they use the same argument and both have a jack in the function name. Can you please elaborate. This may be very clear to you but if you are not sharing the information we don't progress as a team. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart hdac_hdmi_jack_init() main task is creating hdac_hdmi_pcm instance and calling snd_hdac_add_chmap_ctls(). It is creating a normal channel map ctls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A jack kctl is a instance of struct snd_jack_kctl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you are saying the function name hdac_hdmi_jack_init is misleading, should we rename it then?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think the name is not good. However, it does do a little thing related jack init: pcm->jack = jack to assign the jack to hdac_hdmi_pcm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@libinyang your circular explanations leave me scratching my head. The function has nothing to do with jack, except that it "assigns the jack to hdac_hdmi_pcm".
I am going to approve and move on, can't keep doing this.