Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rt1308 and rt711 support #4

Closed
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
4 changes: 2 additions & 2 deletions drivers/soundwire/algo_dynamic_allocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,
ch = sdw_ch_mask_to_ch(p_rt->ch_mask);

sdw_fill_xport_params(&p_rt->transport_params,
p_rt->num, true,
p_rt->num, false,
SDW_BLK_GRP_CNT_1,
sample_int, port_bo, port_bo >> 8,
t_data->hstart,
Expand Down Expand Up @@ -97,7 +97,7 @@ static void sdw_compute_master_ports(struct sdw_master_runtime *m_rt,
no_ch = sdw_ch_mask_to_ch(p_rt->ch_mask);

sdw_fill_xport_params(&p_rt->transport_params, p_rt->num,
true, SDW_BLK_GRP_CNT_1, sample_int,
false, SDW_BLK_GRP_CNT_1, sample_int,
port_bo, port_bo >> 8, hstart, hstop,
(SDW_BLK_GRP_CNT_1 * no_ch), 0x0);

Expand Down
17 changes: 0 additions & 17 deletions drivers/soundwire/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,30 +929,13 @@ static int intel_create_dai(struct sdw_cdns *cdns,
return -ENOMEM;

if (type == INTEL_PDI_BD || type == INTEL_PDI_OUT) {
dais[i].playback.stream_name =
kasprintf(GFP_KERNEL, "SDW%d Tx%d",
cdns->instance, i);
if (!dais[i].playback.stream_name) {
kfree(dais[i].name);
return -ENOMEM;
}

dais[i].playback.channels_min = 1;
dais[i].playback.channels_max = max_ch;
dais[i].playback.rates = SNDRV_PCM_RATE_48000;
dais[i].playback.formats = SNDRV_PCM_FMTBIT_S16_LE;
}

if (type == INTEL_PDI_BD || type == INTEL_PDI_IN) {
dais[i].capture.stream_name =
kasprintf(GFP_KERNEL, "SDW%d Rx%d",
cdns->instance, i);
if (!dais[i].capture.stream_name) {
kfree(dais[i].name);
kfree(dais[i].playback.stream_name);
return -ENOMEM;
}

dais[i].capture.channels_min = 1;
dais[i].capture.channels_max = max_ch;
dais[i].capture.rates = SNDRV_PCM_RATE_48000;
Expand Down
15 changes: 15 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,21 @@ config SND_SOC_RT700_SDW
select SND_SOC_RT700
select REGMAP_SOUNDWIRE

config SND_SOC_RT1308_SDW
tristate "Realtek RT1308 Codec - SDW"
depends on SOUNDWIRE
select SND_SOC_RT1308
select REGMAP_SOUNDWIRE

config SND_SOC_RT711
tristate

config SND_SOC_RT711_SDW
tristate "Realtek RT711 Codec - SDW"
depends on SOUNDWIRE
select SND_SOC_RT711
select REGMAP_SOUNDWIRE

#Freescale sgtl5000 codec
config SND_SOC_SGTL5000
tristate "Freescale SGTL5000 CODEC"
Expand Down
4 changes: 4 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ snd-soc-wm9713-objs := wm9713.o
snd-soc-wm-hubs-objs := wm_hubs.o
snd-soc-zx-aud96p22-objs := zx_aud96p22.o
snd-soc-rt700-objs := rt700.o rt700-sdw.o
snd-soc-rt1308-sdw-objs := rt1308-sdw.o
snd-soc-rt711-objs := rt711.o rt711-sdw.o

# Amp
snd-soc-max9877-objs := max9877.o
Expand Down Expand Up @@ -562,6 +564,8 @@ obj-$(CONFIG_SND_SOC_WM_ADSP) += snd-soc-wm-adsp.o
obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o
obj-$(CONFIG_SND_SOC_ZX_AUD96P22) += snd-soc-zx-aud96p22.o
obj-$(CONFIG_SND_SOC_RT700) += snd-soc-rt700.o
obj-$(CONFIG_SND_SOC_RT1308_SDW) += snd-soc-rt1308-sdw.o
obj-$(CONFIG_SND_SOC_RT711) += snd-soc-rt711.o

# Amp
obj-$(CONFIG_SND_SOC_MAX9877) += snd-soc-max9877.o
Expand Down
Loading