This series parses ELD to identify multichannel capability of the sync, and uses HDA framework to programs codec's channel map registers.
Channel map controls are registered in patch 8, with which user can specify a specific channel order. chmap controls are registered inside jack_init callback. As PCMs need to be registered before registering chmap controls, jack_init call in the machine driver is moved to late_probe instead of init callback.
Skylake driver is modified and buffer size calculation is fixed for multichannel support.
Please note, patch 2 and 4 adds small macros to read speaker allocation from ELD and channel counts from cap bits respectively in DRM and HDA headers. We have CCed DRM folks here. Please ack patch 1, so that we can have this series merged through sound trees. Patch 3 needs Takashi's ack, so that it can be merged through ASoC.
Patch 9 has dependency on commit#44fde3b ("ALSA: hda - Update chmap tlv to report sink's capability) which is merged in Takashi's tree.
So this may be merged in ASoC with Takashi's Ack and pulling in changes from Takashi's tree or alternatively it can be directly merged in Takashi's with Mark's Ack
Takashi/Mark, please decide how you guys want this to be merged.
Cc: Jani Nikula jani.nikula@intel.com Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@intel.com
Subhransu S. Prusty (11): ASoC: Intel: Skylake: Fix ibs/obs calc for non-integral sampling rates drm/edid: Add API to get speaker allocation ASoC: hdac_hdmi: parse eld for channel map capability ALSA: hda - add helper to get channels from cap bits ASoC: hdac_hdmi: Add multichannel support ASoC: skl_rt286: Fix to support hdmi channel map support ASoC: Intel: boards: Update skl_nau88l25_max98357a driver to support chmap ASoC: Intel: boards: Update skl_nau88l25_ssm4567 driver to support chmap ASoC: hdac_hdmi: Register chmap controls and ops ASoC: Intel: Skylake: Add multichannel support for HDMI ASoC: Intel: Skylake: Update channel map based on runtime params
include/drm/drm_edid.h | 9 ++ sound/hda/local.h | 10 ++ sound/soc/codecs/hdac_hdmi.c | 165 ++++++++++++++++++++++-- sound/soc/intel/boards/skl_nau88l25_max98357a.c | 74 ++++++++++- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 73 ++++++++++- sound/soc/intel/boards/skl_rt286.c | 48 ++++++- sound/soc/intel/skylake/skl-pcm.c | 14 +- sound/soc/intel/skylake/skl-topology.c | 49 +++++-- 8 files changed, 409 insertions(+), 33 deletions(-)
Signed-off-by: Subhransu S. Prusty subhransu.s.prusty@intel.com Signed-off-by: Vinod Koul vinod.koul@intel.com Cc: Jani Nikula jani.nikula@intel.com Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@intel.com --- include/drm/drm_edid.h | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index dec6221..99142d1 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -415,6 +415,15 @@ static inline u8 drm_eld_get_conn_type(const uint8_t *eld) return eld[DRM_ELD_SAD_COUNT_CONN_TYPE] & DRM_ELD_CONN_TYPE_MASK; }
+/** + * drm_eld_get_spk_alloc - Get ELD speaker allocation + * @eld: pointer to an eld memory structure + */ +static inline const u8 drm_eld_get_spk_alloc(const uint8_t *eld) +{ + return eld[DRM_ELD_SPEAKER]; +} + struct edid *drm_do_get_edid(struct drm_connector *connector, int (*get_edid_block)(void *data, u8 *buf, unsigned int block, size_t len),
On Tue, 12 Apr 2016 07:01:22 +0200, Subhransu S. Prusty wrote:
This series parses ELD to identify multichannel capability of the sync, and uses HDA framework to programs codec's channel map registers.
Channel map controls are registered in patch 8, with which user can specify a specific channel order. chmap controls are registered inside jack_init callback. As PCMs need to be registered before registering chmap controls, jack_init call in the machine driver is moved to late_probe instead of init callback.
Skylake driver is modified and buffer size calculation is fixed for multichannel support.
Please note, patch 2 and 4 adds small macros to read speaker allocation from ELD and channel counts from cap bits respectively in DRM and HDA headers. We have CCed DRM folks here. Please ack patch 1, so that we can have this series merged through sound trees. Patch 3 needs Takashi's ack, so that it can be merged through ASoC.
Patch 9 has dependency on commit#44fde3b ("ALSA: hda - Update chmap tlv to report sink's capability) which is merged in Takashi's tree.
So this may be merged in ASoC with Takashi's Ack and pulling in changes from Takashi's tree or alternatively it can be directly merged in Takashi's with Mark's Ack
Takashi/Mark, please decide how you guys want this to be merged.
Mark needs to pull my for-next branch beforehand. Or, Mark needs to send a pull request so that I pull Mark's tree, then sync both before applying yours.
But the problem is more complicated because you're changing drm stuff, too. This is usually managed in drm tree. So this cross over three different trees.
And, the change in drm is only this:
--- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -415,6 +415,15 @@ static inline u8 drm_eld_get_conn_type(const uint8_t *eld) return eld[DRM_ELD_SAD_COUNT_CONN_TYPE] & DRM_ELD_CONN_TYPE_MASK; }
+/**
- drm_eld_get_spk_alloc - Get ELD speaker allocation
- @eld: pointer to an eld memory structure
- */
+static inline const u8 drm_eld_get_spk_alloc(const uint8_t *eld) +{
- return eld[DRM_ELD_SPEAKER];
+}
Do we really need this? Even the direct reference is pretty much obvious. e.g. I see no big difference between two lines below: spk_alloc = drm_eld_get_spk_alloc(some_eld); spk_alloc = some_eld[DRM_ELD_SPAEKER];
thanks,
Takashi
On Tue, Apr 12, 2016 at 07:43:59AM +0200, Takashi Iwai wrote:
But the problem is more complicated because you're changing drm stuff, too. This is usually managed in drm tree. So this cross over three different trees.
The DRM folks tend to leave this up to us, or at least review on any of these crossover patches has been extremely light.
Do we really need this? Even the direct reference is pretty much obvious. e.g. I see no big difference between two lines below: spk_alloc = drm_eld_get_spk_alloc(some_eld); spk_alloc = some_eld[DRM_ELD_SPAEKER];
That'd make things even easier of course.
On Tue, Apr 12, 2016 at 06:54:35AM +0100, Mark Brown wrote:
On Tue, Apr 12, 2016 at 07:43:59AM +0200, Takashi Iwai wrote:
But the problem is more complicated because you're changing drm stuff, too. This is usually managed in drm tree. So this cross over three different trees.
The DRM folks tend to leave this up to us, or at least review on any of these crossover patches has been extremely light.
Do we really need this? Even the direct reference is pretty much obvious. e.g. I see no big difference between two lines below: spk_alloc = drm_eld_get_spk_alloc(some_eld); spk_alloc = some_eld[DRM_ELD_SPAEKER];
That'd make things even easier of course.
Takashi/Mark, Thanks for the review. Agree, accomodating in the driver is easier and the inline function doesn't make much difference. I will accomodate the change in the driver itself.
Shall I repost the series with these changes, which can be reviewed further or wait for more review comments before reposting?
Regards, Subhransu
--
dri-devel@lists.freedesktop.org