Skip to content

Commit cf92496

Browse files
bardliaovinodkoul
authored andcommitted
soundwire: intel: fix intel_register_dai PDI offsets and numbers
There are two issues, likely copy/paste: 1. Use cdns->pcm.num_in instead of stream_num_in for consistency with the rest of the code. This was not detected earlier since platforms did not have input-only PDIs. 2. use the correct offset for bi-dir PDM, based on IN and OUT PDIs. Again this was not detected since PDM was not supported earlier. Reported-by: Ranjani Sridharan <[email protected]> Signed-off-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 0f8c0f8 commit cf92496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/soundwire/intel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ static int intel_register_dai(struct sdw_intel *sdw)
900900
/* Create PCM DAIs */
901901
stream = &cdns->pcm;
902902

903-
ret = intel_create_dai(cdns, dais, INTEL_PDI_IN, stream->num_in,
903+
ret = intel_create_dai(cdns, dais, INTEL_PDI_IN, cdns->pcm.num_in,
904904
off, stream->num_ch_in, true);
905905
if (ret)
906906
return ret;
@@ -931,7 +931,7 @@ static int intel_register_dai(struct sdw_intel *sdw)
931931
if (ret)
932932
return ret;
933933

934-
off += cdns->pdm.num_bd;
934+
off += cdns->pdm.num_out;
935935
ret = intel_create_dai(cdns, dais, INTEL_PDI_BD, cdns->pdm.num_bd,
936936
off, stream->num_ch_bd, false);
937937
if (ret)

0 commit comments

Comments
 (0)