Skip to content

ASoC: codec: hdac_hdmi: fix pin connections at cvt enable#1024

Merged
ranj063 merged 1 commit intothesofproject:topic/sof-devfrom
kv2019i:fix/hdmibug878
Jun 14, 2019
Merged

ASoC: codec: hdac_hdmi: fix pin connections at cvt enable#1024
ranj063 merged 1 commit intothesofproject:topic/sof-devfrom
kv2019i:fix/hdmibug878

Conversation

@kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Jun 11, 2019

Fixes #878

In display codecs supported by hdac_hdmi, the connection indices are
shared by all converters. At boot and resume from suspend,
the connection state may be reset to default values.

In case of multiple connected pins (multiple monitors connected
with audio capability), routing and mute status of pins that
are not connected to any PCM, may interfere with other pins.
E.g. after resume from S3 with multiple monitors, unless
all converters are in active use, playback to some PCMs may
be muted due to the default settings of unrelated converters.

Avoid this by ensuring all pin:cvt selections are correct
in codec whenever a converter is enabled for playback.

@kv2019i kv2019i requested a review from lgirdwood as a code owner June 11, 2019 15:42
@kv2019i
Copy link
Collaborator Author

kv2019i commented Jun 11, 2019

@libinyang Please review, you've been doing many patches in this area. This is a clear bug and the fix works on all hw I have.

@plbossart I want to get initial review from Libin, CI results and have a patch to share to @mengdonglin . But, but, I assume this should be reviewed and merged via alsa-devel, right?

@plbossart
Copy link
Member

@kv2019i the port/pin/cvt issues should be identical with the legacy HDAudio driver, no? What's specific about hdac_hdmi?

@kv2019i
Copy link
Collaborator Author

kv2019i commented Jun 12, 2019

@plbossart wrote:

@kv2019i the port/pin/cvt issues should be identical with the legacy HDAudio driver, no? What's specific about hdac_hdmi?

Yes, HDaudio driver handles this case, but the two codebases (patch_hdmi.c for legacy driver) and hdac_hdmi in asoc are completely different. The issue needs to be tackled in hdac_hdmi separately.

There is a lot of delicate logic duplicated now, so longer term some kind of refactoring is needed to share the logic between the drivers. But as they are now, we need to port critical bugfixes to hdac_hdmi, and as in this case, this requires some rework due to different design and data structures used.

@kv2019i kv2019i added the upstream Patch has been sent to upstream (e.g. alsa-devel) label Jun 12, 2019
@kv2019i
Copy link
Collaborator Author

kv2019i commented Jun 12, 2019

@YvonneYang2
Copy link

As #878 (comment) commented, the PR has fixed the #878 issue.

In display codecs supported by hdac_hdmi, the connection indices are
shared by all converters. At boot and resume from suspend,
the connection state may be reset to default values.

In case of multiple connected pins (multiple monitors connected
with audio capability), routing and mute status of pins that
are not connected to any PCM, may interfere with other pins.
E.g. after resume from S3 with multiple monitors, unless
all converters are in active use, playback to some PCMs may
be muted due to the default settings of unrelated converters.

Avoid this by ensuring all pin:cvt selections are correct
in codec whenever a converter is enabled for playback.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@ranj063
Copy link
Collaborator

ranj063 commented Jun 13, 2019

@kv2019i could you please update this one with the same version as the one applied upstream?

@kv2019i
Copy link
Collaborator Author

kv2019i commented Jun 14, 2019

@kv2019i could you please update this one with the same version as the one applied upstream?

@ranj063 Ack, reuploaded the version that was accepted upstream as:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?h=for-5.2&id=489f231e0f4c44d4d019aa5c26e1c3f147875f13

@kv2019i kv2019i requested a review from ranj063 June 14, 2019 08:31
Copy link
Collaborator

@ranj063 ranj063 left a comment

Choose a reason for hiding this comment

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

already upstream. need another approval to merge

Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

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

blindly approving since the same as reviewed upstream
@ranj063 I will let you merge.

@ranj063 ranj063 merged commit 2712289 into thesofproject:topic/sof-dev Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream Patch has been sent to upstream (e.g. alsa-devel)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][CML] HDMI aplay no output if HDMI and DP are both connected and DP aplay is not used before.

4 participants