intel/skylake: nhlt: Add support for rt5514 NHLT blob
Add support for describing the NHLT blob for the rt5514 DSP. Currently this only supports 4 channel capture. BUG=b:35585307 BRANCH=none TEST=build and boot on Eve P1 Change-Id: Ib59b56222f9aa65370fdcf9ddf25145c571b1b2e Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://review.coreboot.org/18816 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
7273e18399
commit
4a75a66d67
|
@ -237,6 +237,12 @@ config NHLT_SSM4567
|
|||
help
|
||||
Include DSP firmware settings for ssm4567 smart amplifier.
|
||||
|
||||
config NHLT_RT5514
|
||||
bool
|
||||
default n
|
||||
help
|
||||
Include DSP firmware settings for rt5514 DSP.
|
||||
|
||||
config NHLT_RT5663
|
||||
bool
|
||||
default n
|
||||
|
|
|
@ -60,6 +60,11 @@ int nhlt_soc_add_ssm4567(struct nhlt *nhlt, int hwlink);
|
|||
*/
|
||||
int nhlt_soc_add_max98357(struct nhlt *nhlt, int hwlink);
|
||||
|
||||
/*
|
||||
* Add rt5514 DSP on provided SSP link. Return 0 on success, < 0 on error.
|
||||
*/
|
||||
int nhlt_soc_add_rt5514(struct nhlt *nhlt, int hwlink, int num_channels);
|
||||
|
||||
/*
|
||||
* Add rt5663 headset codec on provided SSP link. Return 0 on success, < 0
|
||||
* on error.
|
||||
|
|
|
@ -2,6 +2,7 @@ ramstage-y += dmic.c
|
|||
ramstage-y += nau88l25.c
|
||||
ramstage-y += max98357.c
|
||||
ramstage-y += ssm4567.c
|
||||
ramstage-y += rt5514.c
|
||||
ramstage-y += rt5663.c
|
||||
ramstage-y += max98927.c
|
||||
|
||||
|
@ -19,6 +20,7 @@ DMIC_4CH_48KHZ_32B = dmic-4ch-48khz-32b.bin
|
|||
NAU88L25 = nau88l25-2ch-48khz-24b.bin
|
||||
MAX98357_RENDER = max98357-render-2ch-48khz-24b.bin
|
||||
MAX98927_RENDER = max98927-render-2ch-48khz-24b.bin
|
||||
RT5514_CAPTURE = rt5514-capture-4ch-48khz-16b.bin
|
||||
RT5663 = rt5663-2ch-48khz-24b.bin
|
||||
SSM4567_RENDER = ssm4567-render-2ch-48khz-24b.bin
|
||||
SSM4567_CAPTURE = ssm4567-capture-4ch-48khz-32b.bin
|
||||
|
@ -55,6 +57,10 @@ cbfs-files-$(CONFIG_NHLT_SSM4567) += $(SSM4567_CAPTURE)
|
|||
$(SSM4567_CAPTURE)-file := $(NHLT_BLOB_PATH)/$(SSM4567_CAPTURE)
|
||||
$(SSM4567_CAPTURE)-type := raw
|
||||
|
||||
cbfs-files-$(CONFIG_NHLT_RT5514) += $(RT5514_CAPTURE)
|
||||
$(RT5514_CAPTURE)-file := $(NHLT_BLOB_PATH)/$(RT5514_CAPTURE)
|
||||
$(RT5514_CAPTURE)-type := raw
|
||||
|
||||
cbfs-files-$(CONFIG_NHLT_RT5663) += $(RT5663)
|
||||
$(RT5663)-file := $(NHLT_BLOB_PATH)/$(RT5663)
|
||||
$(RT5663)-type := raw
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <soc/nhlt.h>
|
||||
|
||||
static const struct nhlt_format_config rt5514_4ch_formats[] = {
|
||||
/* 48 KHz 16-bits per sample. */
|
||||
{
|
||||
.num_channels = 4,
|
||||
.sample_freq_khz = 48,
|
||||
.container_bits_per_sample = 16,
|
||||
.valid_bits_per_sample = 16,
|
||||
.speaker_mask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT |
|
||||
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT,
|
||||
.settings_file = "rt5514-capture-4ch-48khz-16b.bin",
|
||||
},
|
||||
};
|
||||
|
||||
static const struct nhlt_dmic_array_config rt5514_4ch_mic_config = {
|
||||
.tdm_config = {
|
||||
.config_type = NHLT_TDM_MIC_ARRAY,
|
||||
},
|
||||
.array_type = NHLT_MIC_ARRAY_4CH_L_SHAPED,
|
||||
};
|
||||
|
||||
static const struct nhlt_endp_descriptor rt5514_4ch_descriptors[] = {
|
||||
{
|
||||
.link = NHLT_LINK_SSP,
|
||||
.device = NHLT_SSP_DEV_I2S,
|
||||
.direction = NHLT_DIR_CAPTURE,
|
||||
.vid = NHLT_VID,
|
||||
.did = NHLT_DID_SSP,
|
||||
.cfg = &rt5514_4ch_mic_config,
|
||||
.cfg_size = sizeof(rt5514_4ch_mic_config),
|
||||
.formats = rt5514_4ch_formats,
|
||||
.num_formats = ARRAY_SIZE(rt5514_4ch_formats),
|
||||
},
|
||||
};
|
||||
|
||||
int nhlt_soc_add_rt5514(struct nhlt *nhlt, int hwlink, int num_channels)
|
||||
{
|
||||
switch (num_channels) {
|
||||
case 4:
|
||||
return nhlt_add_ssp_endpoints(nhlt, hwlink,
|
||||
rt5514_4ch_descriptors,
|
||||
ARRAY_SIZE(rt5514_4ch_descriptors));
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue