Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/platform/apollolake/include/platform/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ struct sof;
/* number of SSP ports in platform */
#define PLATFORM_NUM_SSP 6

/* number of SSP ports in platform */
#define PLATFORM_NUM_DMIC 2

/* DSP default delay in cycles */
#define PLATFORM_DEFAULT_DELAY 12

Expand Down
13 changes: 7 additions & 6 deletions src/platform/apollolake/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static void platform_memory_windows_init(void)
int platform_init(struct sof *sof)
{
struct dai *ssp;
struct dai *dmic0;
struct dai *dmic;
int i, ret;

platform_interrupt_init();
Expand Down Expand Up @@ -271,11 +271,12 @@ int platform_init(struct sof *sof)
* supported max. those are available in platform are handled by dmic0.
*/
trace_point(TRACE_BOOT_PLATFORM_DMIC);
dmic0 = dai_get(SOF_DAI_INTEL_DMIC, 0);
if (!dmic0)
return -ENODEV;

dai_probe(dmic0);
for (i = 0; i < PLATFORM_NUM_DMIC; i++) {
dmic = dai_get(SOF_DAI_INTEL_DMIC, i);
if (!dmic)
return -ENODEV;
dai_probe(dmic);
}

/* Initialize DMA for Trace*/
dma_trace_init_complete(sof->dmat);
Expand Down
7 changes: 6 additions & 1 deletion src/platform/cannonlake/include/platform/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ struct sof;

#define PLATFORM_WAITI_DELAY 1

#define PLATFORM_SSP_COUNT 3
/* number of SSP ports in platform */
#define PLATFORM_NUM_SSP 3

/* number of SSP ports in platform */
#define PLATFORM_NUM_DMIC 2

#define MAX_GPDMA_COUNT 2

/* Host page size */
Expand Down
15 changes: 8 additions & 7 deletions src/platform/cannonlake/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static struct timer platform_ext_timer = {
int platform_init(struct sof *sof)
{
struct dai *ssp;
struct dai *dmic0;
struct dai *dmic;
int i, ret;

trace_point(TRACE_BOOT_PLATFORM_ENTRY);
Expand Down Expand Up @@ -276,7 +276,7 @@ int platform_init(struct sof *sof)

/* init SSP ports */
trace_point(TRACE_BOOT_PLATFORM_SSP);
for(i = 0; i < PLATFORM_SSP_COUNT; i++) {
for (i = 0; i < PLATFORM_NUM_SSP; i++) {
ssp = dai_get(SOF_DAI_INTEL_SSP, i);
if (ssp == NULL)
return -ENODEV;
Expand All @@ -287,11 +287,12 @@ int platform_init(struct sof *sof)
* supported max. those are available in platform are handled by dmic0.
*/
trace_point(TRACE_BOOT_PLATFORM_DMIC);
dmic0 = dai_get(SOF_DAI_INTEL_DMIC, 0);
if (!dmic0)
return -ENODEV;

dai_probe(dmic0);
for (i = 0; i < PLATFORM_NUM_DMIC; i++) {
dmic = dai_get(SOF_DAI_INTEL_DMIC, i);
if (!dmic)
return -ENODEV;
dai_probe(dmic);
}

/* Initialize DMA for Trace*/
dma_trace_init_complete(sof->dmat);
Expand Down