Repository navigation
ASoC: rt715: add main capture switch and main capture volume control - #2615
Conversation
plbossart
left a comment
There was a problem hiding this comment.
LGTM, only cosmetic comments below. Thanks @jack-cy-yu
|
|
||
| addr_h = mc->reg; | ||
| addr_l = mc->rreg; | ||
|
|
| break; | ||
| } | ||
| } | ||
|
|
This sounds good @GoPerry but we will have to deal with previous versions of the kernel which did not include this Capture control, so this has to be done conditionally - we first test if this 'Main Capture Switch' is available and if yes we use it, else we fall back on the previous solution with PGA. @libinyang @bardliao can you help @GoPerry with UCM trickery? I am running out of time here. |
plbossart
left a comment
There was a problem hiding this comment.
LGTM, thanks @jack-cy-yu
@bardliao I will let you review and merge, thanks!
| /* R Channel */ | ||
| if (mc->invert) { | ||
| regmap_write(rt715->regmap, | ||
| RT715_SET_AUDIO_POWER_STATE, AC_PWRST_D0); |
There was a problem hiding this comment.
@jack-cy-yu Is the power control right place? Why do we need it only if mc->invert? The other question is what will happen if we don't handle power state in this function? These registers are not volatile, and regmap will cache them when codec is suspended. And they will be restored when codec is resumed. Can we move the power control to the resume function? @shumingfan The same question for #2620
There was a problem hiding this comment.
@bardliao I move the power control to outside of the mc-invert, since some of the registers need to be set under power state D0, I'll still keep power control in rt715_set_amp_gain_put but move it to proper place. Thanks.
Add main capture switch and main capture volume for callback to be in single operation. Signed-off-by: Jack Yu <jack.yu@realtek.com>
bardliao
left a comment
There was a problem hiding this comment.
LGTM now thanks @jack-cy-yu Could you send it to upstream?
plbossart
left a comment
There was a problem hiding this comment.
@bardliao I will let you merge
@GoPerry @libinyang @mengdonglin this patch is needed for the required TGL privacy feature, the UCM file needs to use the new control conditionally.
Thanks @plbossart |
@GoPerry Please send out the PR of the UCM2 when it is ready. I can help to review. |
|
|
@GoPerry Bard told me that the patch may be changed from "rt715 Main Capture Switch" to "rt715 Capture Switch". Could you please confirm. And do you have plan to do the same change to rt711, rt715 sdca and rt711 sdca codec drivers? |
@libinyang @bardliao numid=14,iface=MIXER,name='rt715 Main Capture Switch' |
|
@libinyang @GoPerry, The patch is still under discussion on mailing list. See https://www.spinics.net/lists/alsa-devel/msg119863.html |
Add main capture switch and main capture volume for callback to be in
single operation.
Signed-off-by: Jack Yu jack.yu@realtek.com