Skip to content

Commit 75c6e8c

Browse files
committed
ASoC: SOF: Intel: Add a is_amp flag to fix the wrong name prefix
According to the Intel sof design, it will create the name prefix appended with amp index for the amp codec only, such as: rt1318-1, rt1318-2, etc... But the rt1320 is a codec with amp and mic codec functions, it doesn't have the amp index in its name prefix as above. And then it will be hard to identify the codec if in multi-rt1320 case. So we add a flag to force the amp index to be appended. Signed-off-by: Derek Fang <derek.fang@realtek.com>
1 parent 3d36789 commit 75c6e8c

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

include/sound/soc_sdw_utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ struct asoc_sdw_codec_info {
8282
const int dai_num;
8383
struct asoc_sdw_aux_info auxs[SOC_SDW_MAX_AUX_NUM];
8484
const int aux_num;
85+
const bool is_amp;
8586

8687
int (*codec_card_late_probe)(struct snd_soc_card *card);
8788

sound/soc/sof/intel/hda.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,9 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
12291229
return NULL;
12301230
}
12311231

1232+
if (codec_info_list[i].is_amp)
1233+
is_amp = true;
1234+
12321235
adr_dev[index].adr = ((u64)sdw_device->id.class_id & 0xFF) |
12331236
((u64)sdw_device->id.part_id & 0xFFFF) << 8 |
12341237
((u64)sdw_device->id.mfg_id & 0xFFFF) << 24 |

0 commit comments

Comments
 (0)