mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
sound fixes for 6.11-rc1
A collection of the fixes gathered since the previous PR. We see a bit large LOCs at a HD-audio quirk, but that's only bulk COEF data, hence it's safe to take. In addition to that, there were two minor fixes for MIDI 2.0 handling for ALSA core, and the rest are all rather random small and device-specific fixes. -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmajSFIOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE8SjBAAyynx5t5Ui/Gp9VqvyFzUAl9zpHn4hIz5T/SN +XRNcq9VN+anqu+55PqWpoX5E0WRQW36AyCeMO7yA0RLhTCvPAtH2OmLfHQhvh48 +Zpw89molMP19KdRi+nezJlrTQby8zHBGConN3jalovRrM1bqpGeiQ3bdydhqSdt dAfhCEn3ckOhNZU0PTASnZGScqTpl+OP0XKXSD3KBceT7EEsUodTcq1NqDcoHbBS V/4hJct7vDcbA64P+zo3rrhEkbeDa3s152ajcs589aElIKQVTQhZNNvxe7ygDXHe 30qXjCI6gQDUWuGHwuN0IlNiI/GkhLExvK+Wa1xBP+vjTqWtpxzuQ8rMwa+EM48Y AZ7Rk7GUsvceCzGIto6p+ZRlt1LG2dJFYbfqw9fUA6JvMDhStDcrFzSooWrmcl8Z 8EN7L9viYEDl15TzSA6FKTeFh1gSPe+/hsZ9r3XuTL611/paqPs+HTnQ3T7ua9mr EylSfEeJ3NKbcJqwnCLClSzmgClPaBkseDwnHS0OT4xMmbI5Q1/WIzjdvF+EM2RN RxgkvJyhdpp/9bxtkeojekKcK4qeuGcY4Gaqd6etBX9KgfyTh/n098dlI0BJmZrV y3cZNH9zojzzTmP7+UcTjVp+LocF5nswB3rhMJgYKJPFXJMoj5xzHIm8LyRt7qTQ 9xIYlAY= =RcQQ -----END PGP SIGNATURE----- Merge tag 'sound-fix-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of fixes gathered since the previous pull. We see a bit large LOCs at a HD-audio quirk, but that's only bulk COEF data, hence it's safe to take. In addition to that, there were two minor fixes for MIDI 2.0 handling for ALSA core, and the rest are all rather random small and device-specific fixes" * tag 'sound-fix-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: fsl-asoc-card: Dynamically allocate memory for snd_soc_dai_link_components ASoC: amd: yc: Support mic on Lenovo Thinkpad E16 Gen 2 ALSA: hda/realtek: Implement sound init sequence for Samsung Galaxy Book3 Pro 360 ALSA: hda/realtek: cs35l41: Fixup remaining asus strix models ASoC: SOF: ipc4-topology: Preserve the DMA Link ID for ChainDMA on unprepare ASoC: SOF: ipc4-topology: Only handle dai_config with HW_PARAMS for ChainDMA ALSA: ump: Force 1 Group for MIDI1 FBs ALSA: ump: Don't update FB name for static blocks ALSA: usb-audio: Add a quirk for Sonix HD USB Camera ASoC: TAS2781: Fix tasdev_load_calibrated_data() ASoC: tegra: select CONFIG_SND_SIMPLE_CARD_UTILS ASoC: Intel: use soc_intel_is_byt_cr() only when IOSF_MBI is reachable ALSA: usb-audio: Move HD Webcam quirk to the right place ALSA: hda: tas2781: mark const variables as __maybe_unused ALSA: usb-audio: Fix microphone sound on HD webcam. ASoC: sof: amd: fix for firmware reload failure in Vangogh platform ASoC: Intel: Fix RT5650 SSP lookup ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices ASoC: SOF: imx8m: Fix DSP control regmap retrieval
This commit is contained in:
commit
eb966e0c5f
@ -16,11 +16,11 @@
|
||||
#define __TAS2781_TLV_H__
|
||||
|
||||
static const __maybe_unused DECLARE_TLV_DB_SCALE(dvc_tlv, -10000, 100, 0);
|
||||
static const DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
|
||||
static const DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1);
|
||||
static const __maybe_unused DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
|
||||
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1);
|
||||
|
||||
/* pow(10, db/20) * pow(2,30) */
|
||||
static const unsigned char tas2563_dvc_table[][4] = {
|
||||
static const __maybe_unused unsigned char tas2563_dvc_table[][4] = {
|
||||
{ 0X00, 0X00, 0X00, 0X00 }, /* -121.5db */
|
||||
{ 0X00, 0X00, 0X03, 0XBC }, /* -121.0db */
|
||||
{ 0X00, 0X00, 0X03, 0XF5 }, /* -120.5db */
|
||||
|
@ -733,6 +733,12 @@ static void fill_fb_info(struct snd_ump_endpoint *ump,
|
||||
info->block_id, info->direction, info->active,
|
||||
info->first_group, info->num_groups, info->midi_ci_version,
|
||||
info->sysex8_streams, info->flags);
|
||||
|
||||
if ((info->flags & SNDRV_UMP_BLOCK_IS_MIDI1) && info->num_groups != 1) {
|
||||
info->num_groups = 1;
|
||||
ump_dbg(ump, "FB %d: corrected groups to 1 for MIDI1\n",
|
||||
info->block_id);
|
||||
}
|
||||
}
|
||||
|
||||
/* check whether the FB info gets updated by the current message */
|
||||
@ -806,6 +812,13 @@ static int ump_handle_fb_name_msg(struct snd_ump_endpoint *ump,
|
||||
if (!fb)
|
||||
return -ENODEV;
|
||||
|
||||
if (ump->parsed &&
|
||||
(ump->info.flags & SNDRV_UMP_EP_INFO_STATIC_BLOCKS)) {
|
||||
ump_dbg(ump, "Skipping static FB name update (blk#%d)\n",
|
||||
fb->info.block_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = ump_append_string(ump, fb->info.name, sizeof(fb->info.name),
|
||||
buf->raw, 3);
|
||||
/* notify the FB name update to sequencer, too */
|
||||
|
@ -4800,6 +4800,8 @@ static void alc298_fixup_samsung_amp(struct hda_codec *codec,
|
||||
}
|
||||
}
|
||||
|
||||
#include "samsung_helper.c"
|
||||
|
||||
#if IS_REACHABLE(CONFIG_INPUT)
|
||||
static void gpio2_mic_hotkey_event(struct hda_codec *codec,
|
||||
struct hda_jack_callback *event)
|
||||
@ -7429,6 +7431,7 @@ enum {
|
||||
ALC236_FIXUP_HP_MUTE_LED,
|
||||
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
|
||||
ALC298_FIXUP_SAMSUNG_AMP,
|
||||
ALC298_FIXUP_SAMSUNG_AMP2,
|
||||
ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
|
||||
ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
|
||||
ALC295_FIXUP_ASUS_MIC_NO_PRESENCE,
|
||||
@ -9055,6 +9058,10 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.chained = true,
|
||||
.chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET
|
||||
},
|
||||
[ALC298_FIXUP_SAMSUNG_AMP2] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc298_fixup_samsung_amp2
|
||||
},
|
||||
[ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
|
||||
.type = HDA_FIXUP_VERBS,
|
||||
.v.verbs = (const struct hda_verb[]) {
|
||||
@ -10359,10 +10366,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
|
||||
SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
|
||||
@ -10406,6 +10413,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
|
||||
SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
|
||||
SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
|
||||
SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG-KB1US)", ALC298_FIXUP_SAMSUNG_AMP2),
|
||||
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
|
||||
@ -10843,6 +10851,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
|
||||
{.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
|
||||
{.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
|
||||
{.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
|
||||
{.id = ALC298_FIXUP_SAMSUNG_AMP2, .name = "alc298-samsung-amp2"},
|
||||
{.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
|
||||
{.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
|
||||
{.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},
|
||||
|
310
sound/pci/hda/samsung_helper.c
Normal file
310
sound/pci/hda/samsung_helper.c
Normal file
@ -0,0 +1,310 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/* Helper functions for Samsung Galaxy Book3 audio initialization */
|
||||
|
||||
struct alc298_samsung_coeff_fixup_desc {
|
||||
unsigned char coeff_idx;
|
||||
unsigned short coeff_value;
|
||||
};
|
||||
|
||||
struct alc298_samsung_coeff_seq_desc {
|
||||
unsigned short coeff_0x23;
|
||||
unsigned short coeff_0x24;
|
||||
unsigned short coeff_0x25;
|
||||
unsigned short coeff_0x26;
|
||||
};
|
||||
|
||||
|
||||
static inline void alc298_samsung_write_coef_pack2(struct hda_codec *codec,
|
||||
const struct alc298_samsung_coeff_seq_desc *seq)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 100; i++) {
|
||||
if ((alc_read_coef_idx(codec, 0x26) & 0x0010) == 0)
|
||||
break;
|
||||
|
||||
usleep_range(500, 1000);
|
||||
}
|
||||
|
||||
alc_write_coef_idx(codec, 0x23, seq->coeff_0x23);
|
||||
alc_write_coef_idx(codec, 0x24, seq->coeff_0x24);
|
||||
alc_write_coef_idx(codec, 0x25, seq->coeff_0x25);
|
||||
alc_write_coef_idx(codec, 0x26, seq->coeff_0x26);
|
||||
}
|
||||
|
||||
static inline void alc298_samsung_write_coef_pack_seq(
|
||||
struct hda_codec *codec,
|
||||
unsigned char target,
|
||||
const struct alc298_samsung_coeff_seq_desc seq[],
|
||||
int count)
|
||||
{
|
||||
alc_write_coef_idx(codec, 0x22, target);
|
||||
for (int i = 0; i < count; i++)
|
||||
alc298_samsung_write_coef_pack2(codec, &seq[i]);
|
||||
}
|
||||
|
||||
static void alc298_fixup_samsung_amp2(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action)
|
||||
{
|
||||
int i;
|
||||
static const struct alc298_samsung_coeff_fixup_desc fixups1[] = {
|
||||
{ 0x99, 0x8000 }, { 0x82, 0x4408 }, { 0x32, 0x3f00 }, { 0x0e, 0x6f80 },
|
||||
{ 0x10, 0x0e21 }, { 0x55, 0x8000 }, { 0x08, 0x2fcf }, { 0x08, 0x2fcf },
|
||||
{ 0x2d, 0xc020 }, { 0x19, 0x0017 }, { 0x50, 0x1000 }, { 0x0e, 0x6f80 },
|
||||
{ 0x08, 0x2fcf }, { 0x80, 0x0011 }, { 0x2b, 0x0c10 }, { 0x2d, 0xc020 },
|
||||
{ 0x03, 0x0042 }, { 0x0f, 0x0062 }, { 0x08, 0x2fcf },
|
||||
};
|
||||
|
||||
static const struct alc298_samsung_coeff_seq_desc amp_0x38[] = {
|
||||
{ 0x2000, 0x0000, 0x0001, 0xb011 }, { 0x23ff, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x203a, 0x0000, 0x0080, 0xb011 }, { 0x23e1, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x2012, 0x0000, 0x006f, 0xb011 }, { 0x2014, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x201b, 0x0000, 0x0001, 0xb011 }, { 0x201d, 0x0000, 0x0001, 0xb011 },
|
||||
{ 0x201f, 0x0000, 0x00fe, 0xb011 }, { 0x2021, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x2022, 0x0000, 0x0010, 0xb011 }, { 0x203d, 0x0000, 0x0005, 0xb011 },
|
||||
{ 0x203f, 0x0000, 0x0003, 0xb011 }, { 0x2050, 0x0000, 0x002c, 0xb011 },
|
||||
{ 0x2076, 0x0000, 0x000e, 0xb011 }, { 0x207c, 0x0000, 0x004a, 0xb011 },
|
||||
{ 0x2081, 0x0000, 0x0003, 0xb011 }, { 0x2399, 0x0000, 0x0003, 0xb011 },
|
||||
{ 0x23a4, 0x0000, 0x00b5, 0xb011 }, { 0x23a5, 0x0000, 0x0001, 0xb011 },
|
||||
{ 0x23ba, 0x0000, 0x0094, 0xb011 }, { 0x2100, 0x00d0, 0x950e, 0xb017 },
|
||||
{ 0x2104, 0x0061, 0xd4e2, 0xb017 }, { 0x2108, 0x00d0, 0x950e, 0xb017 },
|
||||
{ 0x210c, 0x0075, 0xf4e2, 0xb017 }, { 0x2110, 0x00b4, 0x4b0d, 0xb017 },
|
||||
{ 0x2114, 0x000a, 0x1000, 0xb017 }, { 0x2118, 0x0015, 0x2000, 0xb017 },
|
||||
{ 0x211c, 0x000a, 0x1000, 0xb017 }, { 0x2120, 0x0075, 0xf4e2, 0xb017 },
|
||||
{ 0x2124, 0x00b4, 0x4b0d, 0xb017 }, { 0x2128, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x212c, 0x0000, 0x0000, 0xb017 }, { 0x2130, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2134, 0x0000, 0x0000, 0xb017 }, { 0x2138, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x213c, 0x0000, 0x0010, 0xb017 }, { 0x2140, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2144, 0x0000, 0x0000, 0xb017 }, { 0x2148, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x214c, 0x0000, 0x0000, 0xb017 }, { 0x2150, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x2154, 0x0000, 0x0000, 0xb017 }, { 0x2158, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x215c, 0x0000, 0x0000, 0xb017 }, { 0x2160, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2164, 0x0000, 0x0010, 0xb017 }, { 0x2168, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x216c, 0x0000, 0x0000, 0xb017 }, { 0x2170, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2174, 0x0000, 0x0000, 0xb017 }, { 0x2178, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x217c, 0x0000, 0x0000, 0xb017 }, { 0x2180, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2184, 0x0000, 0x0000, 0xb017 }, { 0x2188, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x218c, 0x0064, 0x5800, 0xb017 }, { 0x2190, 0x00c8, 0xb000, 0xb017 },
|
||||
{ 0x2194, 0x0064, 0x5800, 0xb017 }, { 0x2198, 0x003d, 0x5be7, 0xb017 },
|
||||
{ 0x219c, 0x0054, 0x060a, 0xb017 }, { 0x21a0, 0x00c8, 0xa310, 0xb017 },
|
||||
{ 0x21a4, 0x0029, 0x4de5, 0xb017 }, { 0x21a8, 0x0032, 0x420c, 0xb017 },
|
||||
{ 0x21ac, 0x0029, 0x4de5, 0xb017 }, { 0x21b0, 0x00fa, 0xe50c, 0xb017 },
|
||||
{ 0x21b4, 0x0000, 0x0010, 0xb017 }, { 0x21b8, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21bc, 0x0000, 0x0000, 0xb017 }, { 0x21c0, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21c4, 0x0000, 0x0000, 0xb017 }, { 0x21c8, 0x0056, 0xc50f, 0xb017 },
|
||||
{ 0x21cc, 0x007b, 0xd7e1, 0xb017 }, { 0x21d0, 0x0077, 0xa70e, 0xb017 },
|
||||
{ 0x21d4, 0x00e0, 0xbde1, 0xb017 }, { 0x21d8, 0x0032, 0x530e, 0xb017 },
|
||||
{ 0x2204, 0x00fb, 0x7e0f, 0xb017 }, { 0x2208, 0x000b, 0x02e1, 0xb017 },
|
||||
{ 0x220c, 0x00fb, 0x7e0f, 0xb017 }, { 0x2210, 0x00d5, 0x17e1, 0xb017 },
|
||||
{ 0x2214, 0x00c0, 0x130f, 0xb017 }, { 0x2218, 0x00e5, 0x0a00, 0xb017 },
|
||||
{ 0x221c, 0x00cb, 0x1500, 0xb017 }, { 0x2220, 0x00e5, 0x0a00, 0xb017 },
|
||||
{ 0x2224, 0x00d5, 0x17e1, 0xb017 }, { 0x2228, 0x00c0, 0x130f, 0xb017 },
|
||||
{ 0x222c, 0x00f5, 0xdb0e, 0xb017 }, { 0x2230, 0x0017, 0x48e2, 0xb017 },
|
||||
{ 0x2234, 0x00f5, 0xdb0e, 0xb017 }, { 0x2238, 0x00ef, 0x5ce2, 0xb017 },
|
||||
{ 0x223c, 0x00c1, 0xcc0d, 0xb017 }, { 0x2240, 0x00f5, 0xdb0e, 0xb017 },
|
||||
{ 0x2244, 0x0017, 0x48e2, 0xb017 }, { 0x2248, 0x00f5, 0xdb0e, 0xb017 },
|
||||
{ 0x224c, 0x00ef, 0x5ce2, 0xb017 }, { 0x2250, 0x00c1, 0xcc0d, 0xb017 },
|
||||
{ 0x2254, 0x00f5, 0xdb0e, 0xb017 }, { 0x2258, 0x0017, 0x48e2, 0xb017 },
|
||||
{ 0x225c, 0x00f5, 0xdb0e, 0xb017 }, { 0x2260, 0x00ef, 0x5ce2, 0xb017 },
|
||||
{ 0x2264, 0x00c1, 0xcc0d, 0xb017 }, { 0x2268, 0x00f5, 0xdb0e, 0xb017 },
|
||||
{ 0x226c, 0x0017, 0x48e2, 0xb017 }, { 0x2270, 0x00f5, 0xdb0e, 0xb017 },
|
||||
{ 0x2274, 0x00ef, 0x5ce2, 0xb017 }, { 0x2278, 0x00c1, 0xcc0d, 0xb017 },
|
||||
{ 0x227c, 0x00f5, 0xdb0e, 0xb017 }, { 0x2280, 0x0017, 0x48e2, 0xb017 },
|
||||
{ 0x2284, 0x00f5, 0xdb0e, 0xb017 }, { 0x2288, 0x00ef, 0x5ce2, 0xb017 },
|
||||
{ 0x228c, 0x00c1, 0xcc0d, 0xb017 }, { 0x22cc, 0x00e8, 0x8d00, 0xb017 },
|
||||
{ 0x22d0, 0x0000, 0x0000, 0xb017 }, { 0x22d4, 0x0018, 0x72ff, 0xb017 },
|
||||
{ 0x22d8, 0x00ce, 0x25e1, 0xb017 }, { 0x22dc, 0x002f, 0xe40e, 0xb017 },
|
||||
{ 0x238e, 0x0000, 0x0099, 0xb011 }, { 0x238f, 0x0000, 0x0011, 0xb011 },
|
||||
{ 0x2390, 0x0000, 0x0056, 0xb011 }, { 0x2391, 0x0000, 0x0004, 0xb011 },
|
||||
{ 0x2392, 0x0000, 0x00bb, 0xb011 }, { 0x2393, 0x0000, 0x006d, 0xb011 },
|
||||
{ 0x2394, 0x0000, 0x0010, 0xb011 }, { 0x2395, 0x0000, 0x0064, 0xb011 },
|
||||
{ 0x2396, 0x0000, 0x00b6, 0xb011 }, { 0x2397, 0x0000, 0x0028, 0xb011 },
|
||||
{ 0x2398, 0x0000, 0x000b, 0xb011 }, { 0x239a, 0x0000, 0x0099, 0xb011 },
|
||||
{ 0x239b, 0x0000, 0x000d, 0xb011 }, { 0x23a6, 0x0000, 0x0064, 0xb011 },
|
||||
{ 0x23a7, 0x0000, 0x0078, 0xb011 }, { 0x23b9, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x23e0, 0x0000, 0x0021, 0xb011 }, { 0x23e1, 0x0000, 0x0001, 0xb011 },
|
||||
};
|
||||
|
||||
static const struct alc298_samsung_coeff_seq_desc amp_0x39[] = {
|
||||
{ 0x2000, 0x0000, 0x0001, 0xb011 }, { 0x23ff, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x203a, 0x0000, 0x0080, 0xb011 }, { 0x23e1, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x2012, 0x0000, 0x006f, 0xb011 }, { 0x2014, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x201b, 0x0000, 0x0002, 0xb011 }, { 0x201d, 0x0000, 0x0002, 0xb011 },
|
||||
{ 0x201f, 0x0000, 0x00fd, 0xb011 }, { 0x2021, 0x0000, 0x0001, 0xb011 },
|
||||
{ 0x2022, 0x0000, 0x0010, 0xb011 }, { 0x203d, 0x0000, 0x0005, 0xb011 },
|
||||
{ 0x203f, 0x0000, 0x0003, 0xb011 }, { 0x2050, 0x0000, 0x002c, 0xb011 },
|
||||
{ 0x2076, 0x0000, 0x000e, 0xb011 }, { 0x207c, 0x0000, 0x004a, 0xb011 },
|
||||
{ 0x2081, 0x0000, 0x0003, 0xb011 }, { 0x2399, 0x0000, 0x0003, 0xb011 },
|
||||
{ 0x23a4, 0x0000, 0x00b5, 0xb011 }, { 0x23a5, 0x0000, 0x0001, 0xb011 },
|
||||
{ 0x23ba, 0x0000, 0x0094, 0xb011 }, { 0x2100, 0x00d0, 0x950e, 0xb017 },
|
||||
{ 0x2104, 0x0061, 0xd4e2, 0xb017 }, { 0x2108, 0x00d0, 0x950e, 0xb017 },
|
||||
{ 0x210c, 0x0075, 0xf4e2, 0xb017 }, { 0x2110, 0x00b4, 0x4b0d, 0xb017 },
|
||||
{ 0x2114, 0x000a, 0x1000, 0xb017 }, { 0x2118, 0x0015, 0x2000, 0xb017 },
|
||||
{ 0x211c, 0x000a, 0x1000, 0xb017 }, { 0x2120, 0x0075, 0xf4e2, 0xb017 },
|
||||
{ 0x2124, 0x00b4, 0x4b0d, 0xb017 }, { 0x2128, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x212c, 0x0000, 0x0000, 0xb017 }, { 0x2130, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2134, 0x0000, 0x0000, 0xb017 }, { 0x2138, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x213c, 0x0000, 0x0010, 0xb017 }, { 0x2140, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2144, 0x0000, 0x0000, 0xb017 }, { 0x2148, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x214c, 0x0000, 0x0000, 0xb017 }, { 0x2150, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x2154, 0x0000, 0x0000, 0xb017 }, { 0x2158, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x215c, 0x0000, 0x0000, 0xb017 }, { 0x2160, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2164, 0x0000, 0x0010, 0xb017 }, { 0x2168, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x216c, 0x0000, 0x0000, 0xb017 }, { 0x2170, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2174, 0x0000, 0x0000, 0xb017 }, { 0x2178, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x217c, 0x0000, 0x0000, 0xb017 }, { 0x2180, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2184, 0x0000, 0x0000, 0xb017 }, { 0x2188, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x218c, 0x0064, 0x5800, 0xb017 }, { 0x2190, 0x00c8, 0xb000, 0xb017 },
|
||||
{ 0x2194, 0x0064, 0x5800, 0xb017 }, { 0x2198, 0x003d, 0x5be7, 0xb017 },
|
||||
{ 0x219c, 0x0054, 0x060a, 0xb017 }, { 0x21a0, 0x00c8, 0xa310, 0xb017 },
|
||||
{ 0x21a4, 0x0029, 0x4de5, 0xb017 }, { 0x21a8, 0x0032, 0x420c, 0xb017 },
|
||||
{ 0x21ac, 0x0029, 0x4de5, 0xb017 }, { 0x21b0, 0x00fa, 0xe50c, 0xb017 },
|
||||
{ 0x21b4, 0x0000, 0x0010, 0xb017 }, { 0x21b8, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21bc, 0x0000, 0x0000, 0xb017 }, { 0x21c0, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21c4, 0x0000, 0x0000, 0xb017 }, { 0x21c8, 0x0056, 0xc50f, 0xb017 },
|
||||
{ 0x21cc, 0x007b, 0xd7e1, 0xb017 }, { 0x21d0, 0x0077, 0xa70e, 0xb017 },
|
||||
{ 0x21d4, 0x00e0, 0xbde1, 0xb017 }, { 0x21d8, 0x0032, 0x530e, 0xb017 },
|
||||
{ 0x2204, 0x00fb, 0x7e0f, 0xb017 }, { 0x2208, 0x000b, 0x02e1, 0xb017 },
|
||||
{ 0x220c, 0x00fb, 0x7e0f, 0xb017 }, { 0x2210, 0x00d5, 0x17e1, 0xb017 },
|
||||
{ 0x2214, 0x00c0, 0x130f, 0xb017 }, { 0x2218, 0x00e5, 0x0a00, 0xb017 },
|
||||
{ 0x221c, 0x00cb, 0x1500, 0xb017 }, { 0x2220, 0x00e5, 0x0a00, 0xb017 },
|
||||
{ 0x2224, 0x00d5, 0x17e1, 0xb017 }, { 0x2228, 0x00c0, 0x130f, 0xb017 },
|
||||
{ 0x222c, 0x00f5, 0xdb0e, 0xb017 }, { 0x2230, 0x0017, 0x48e2, 0xb017 },
|
||||
{ 0x2234, 0x00f5, 0xdb0e, 0xb017 }, { 0x2238, 0x00ef, 0x5ce2, 0xb017 },
|
||||
{ 0x223c, 0x00c1, 0xcc0d, 0xb017 }, { 0x2240, 0x00f5, 0xdb0e, 0xb017 },
|
||||
{ 0x2244, 0x0017, 0x48e2, 0xb017 }, { 0x2248, 0x00f5, 0xdb0e, 0xb017 },
|
||||
{ 0x224c, 0x00ef, 0x5ce2, 0xb017 }, { 0x2250, 0x00c1, 0xcc0d, 0xb017 },
|
||||
{ 0x2254, 0x00f5, 0xdb0e, 0xb017 }, { 0x2258, 0x0017, 0x48e2, 0xb017 },
|
||||
{ 0x225c, 0x00f5, 0xdb0e, 0xb017 }, { 0x2260, 0x00ef, 0x5ce2, 0xb017 },
|
||||
{ 0x2264, 0x00c1, 0xcc0d, 0xb017 }, { 0x2268, 0x00f5, 0xdb0e, 0xb017 },
|
||||
{ 0x226c, 0x0017, 0x48e2, 0xb017 }, { 0x2270, 0x00f5, 0xdb0e, 0xb017 },
|
||||
{ 0x2274, 0x00ef, 0x5ce2, 0xb017 }, { 0x2278, 0x00c1, 0xcc0d, 0xb017 },
|
||||
{ 0x227c, 0x00f5, 0xdb0e, 0xb017 }, { 0x2280, 0x0017, 0x48e2, 0xb017 },
|
||||
{ 0x2284, 0x00f5, 0xdb0e, 0xb017 }, { 0x2288, 0x00ef, 0x5ce2, 0xb017 },
|
||||
{ 0x228c, 0x00c1, 0xcc0d, 0xb017 }, { 0x22cc, 0x00e8, 0x8d00, 0xb017 },
|
||||
{ 0x22d0, 0x0000, 0x0000, 0xb017 }, { 0x22d4, 0x0018, 0x72ff, 0xb017 },
|
||||
{ 0x22d8, 0x00ce, 0x25e1, 0xb017 }, { 0x22dc, 0x002f, 0xe40e, 0xb017 },
|
||||
{ 0x238e, 0x0000, 0x0099, 0xb011 }, { 0x238f, 0x0000, 0x0011, 0xb011 },
|
||||
{ 0x2390, 0x0000, 0x0056, 0xb011 }, { 0x2391, 0x0000, 0x0004, 0xb011 },
|
||||
{ 0x2392, 0x0000, 0x00bb, 0xb011 }, { 0x2393, 0x0000, 0x006d, 0xb011 },
|
||||
{ 0x2394, 0x0000, 0x0010, 0xb011 }, { 0x2395, 0x0000, 0x0064, 0xb011 },
|
||||
{ 0x2396, 0x0000, 0x00b6, 0xb011 }, { 0x2397, 0x0000, 0x0028, 0xb011 },
|
||||
{ 0x2398, 0x0000, 0x000b, 0xb011 }, { 0x239a, 0x0000, 0x0099, 0xb011 },
|
||||
{ 0x239b, 0x0000, 0x000d, 0xb011 }, { 0x23a6, 0x0000, 0x0064, 0xb011 },
|
||||
{ 0x23a7, 0x0000, 0x0078, 0xb011 }, { 0x23b9, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x23e0, 0x0000, 0x0021, 0xb011 }, { 0x23e1, 0x0000, 0x0001, 0xb011 },
|
||||
};
|
||||
|
||||
static const struct alc298_samsung_coeff_seq_desc amp_0x3c[] = {
|
||||
{ 0x2000, 0x0000, 0x0001, 0xb011 }, { 0x23ff, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x203a, 0x0000, 0x0080, 0xb011 }, { 0x23e1, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x2012, 0x0000, 0x006f, 0xb011 }, { 0x2014, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x201b, 0x0000, 0x0001, 0xb011 }, { 0x201d, 0x0000, 0x0001, 0xb011 },
|
||||
{ 0x201f, 0x0000, 0x00fe, 0xb011 }, { 0x2021, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x2022, 0x0000, 0x0010, 0xb011 }, { 0x203d, 0x0000, 0x0005, 0xb011 },
|
||||
{ 0x203f, 0x0000, 0x0003, 0xb011 }, { 0x2050, 0x0000, 0x002c, 0xb011 },
|
||||
{ 0x2076, 0x0000, 0x000e, 0xb011 }, { 0x207c, 0x0000, 0x004a, 0xb011 },
|
||||
{ 0x2081, 0x0000, 0x0003, 0xb011 }, { 0x23ba, 0x0000, 0x008d, 0xb011 },
|
||||
{ 0x2128, 0x0005, 0x460d, 0xb017 }, { 0x212c, 0x00f6, 0x73e5, 0xb017 },
|
||||
{ 0x2130, 0x0005, 0x460d, 0xb017 }, { 0x2134, 0x00c0, 0xe9e5, 0xb017 },
|
||||
{ 0x2138, 0x00d5, 0x010b, 0xb017 }, { 0x213c, 0x009d, 0x7809, 0xb017 },
|
||||
{ 0x2140, 0x00c5, 0x0eed, 0xb017 }, { 0x2144, 0x009d, 0x7809, 0xb017 },
|
||||
{ 0x2148, 0x00c4, 0x4ef0, 0xb017 }, { 0x214c, 0x003a, 0x3106, 0xb017 },
|
||||
{ 0x2150, 0x00af, 0x750e, 0xb017 }, { 0x2154, 0x008c, 0x1ff1, 0xb017 },
|
||||
{ 0x2158, 0x009e, 0x360c, 0xb017 }, { 0x215c, 0x008c, 0x1ff1, 0xb017 },
|
||||
{ 0x2160, 0x004d, 0xac0a, 0xb017 }, { 0x2164, 0x007d, 0xa00f, 0xb017 },
|
||||
{ 0x2168, 0x00e1, 0x9ce3, 0xb017 }, { 0x216c, 0x00e8, 0x590e, 0xb017 },
|
||||
{ 0x2170, 0x00e1, 0x9ce3, 0xb017 }, { 0x2174, 0x0066, 0xfa0d, 0xb017 },
|
||||
{ 0x2178, 0x0000, 0x0010, 0xb017 }, { 0x217c, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2180, 0x0000, 0x0000, 0xb017 }, { 0x2184, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2188, 0x0000, 0x0000, 0xb017 }, { 0x218c, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x2190, 0x0000, 0x0000, 0xb017 }, { 0x2194, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2198, 0x0000, 0x0000, 0xb017 }, { 0x219c, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21a0, 0x0000, 0x0010, 0xb017 }, { 0x21a4, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21a8, 0x0000, 0x0000, 0xb017 }, { 0x21ac, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21b0, 0x0000, 0x0000, 0xb017 }, { 0x21b4, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x21b8, 0x0000, 0x0000, 0xb017 }, { 0x21bc, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21c0, 0x0000, 0x0000, 0xb017 }, { 0x21c4, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x23b9, 0x0000, 0x0000, 0xb011 }, { 0x23e0, 0x0000, 0x0020, 0xb011 },
|
||||
{ 0x23e1, 0x0000, 0x0001, 0xb011 },
|
||||
};
|
||||
|
||||
static const struct alc298_samsung_coeff_seq_desc amp_0x3d[] = {
|
||||
{ 0x2000, 0x0000, 0x0001, 0xb011 }, { 0x23ff, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x203a, 0x0000, 0x0080, 0xb011 }, { 0x23e1, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x2012, 0x0000, 0x006f, 0xb011 }, { 0x2014, 0x0000, 0x0000, 0xb011 },
|
||||
{ 0x201b, 0x0000, 0x0002, 0xb011 }, { 0x201d, 0x0000, 0x0002, 0xb011 },
|
||||
{ 0x201f, 0x0000, 0x00fd, 0xb011 }, { 0x2021, 0x0000, 0x0001, 0xb011 },
|
||||
{ 0x2022, 0x0000, 0x0010, 0xb011 }, { 0x203d, 0x0000, 0x0005, 0xb011 },
|
||||
{ 0x203f, 0x0000, 0x0003, 0xb011 }, { 0x2050, 0x0000, 0x002c, 0xb011 },
|
||||
{ 0x2076, 0x0000, 0x000e, 0xb011 }, { 0x207c, 0x0000, 0x004a, 0xb011 },
|
||||
{ 0x2081, 0x0000, 0x0003, 0xb011 }, { 0x23ba, 0x0000, 0x008d, 0xb011 },
|
||||
{ 0x2128, 0x0005, 0x460d, 0xb017 }, { 0x212c, 0x00f6, 0x73e5, 0xb017 },
|
||||
{ 0x2130, 0x0005, 0x460d, 0xb017 }, { 0x2134, 0x00c0, 0xe9e5, 0xb017 },
|
||||
{ 0x2138, 0x00d5, 0x010b, 0xb017 }, { 0x213c, 0x009d, 0x7809, 0xb017 },
|
||||
{ 0x2140, 0x00c5, 0x0eed, 0xb017 }, { 0x2144, 0x009d, 0x7809, 0xb017 },
|
||||
{ 0x2148, 0x00c4, 0x4ef0, 0xb017 }, { 0x214c, 0x003a, 0x3106, 0xb017 },
|
||||
{ 0x2150, 0x00af, 0x750e, 0xb017 }, { 0x2154, 0x008c, 0x1ff1, 0xb017 },
|
||||
{ 0x2158, 0x009e, 0x360c, 0xb017 }, { 0x215c, 0x008c, 0x1ff1, 0xb017 },
|
||||
{ 0x2160, 0x004d, 0xac0a, 0xb017 }, { 0x2164, 0x007d, 0xa00f, 0xb017 },
|
||||
{ 0x2168, 0x00e1, 0x9ce3, 0xb017 }, { 0x216c, 0x00e8, 0x590e, 0xb017 },
|
||||
{ 0x2170, 0x00e1, 0x9ce3, 0xb017 }, { 0x2174, 0x0066, 0xfa0d, 0xb017 },
|
||||
{ 0x2178, 0x0000, 0x0010, 0xb017 }, { 0x217c, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2180, 0x0000, 0x0000, 0xb017 }, { 0x2184, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2188, 0x0000, 0x0000, 0xb017 }, { 0x218c, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x2190, 0x0000, 0x0000, 0xb017 }, { 0x2194, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x2198, 0x0000, 0x0000, 0xb017 }, { 0x219c, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21a0, 0x0000, 0x0010, 0xb017 }, { 0x21a4, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21a8, 0x0000, 0x0000, 0xb017 }, { 0x21ac, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21b0, 0x0000, 0x0000, 0xb017 }, { 0x21b4, 0x0000, 0x0010, 0xb017 },
|
||||
{ 0x21b8, 0x0000, 0x0000, 0xb017 }, { 0x21bc, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x21c0, 0x0000, 0x0000, 0xb017 }, { 0x21c4, 0x0000, 0x0000, 0xb017 },
|
||||
{ 0x23b9, 0x0000, 0x0000, 0xb011 }, { 0x23e0, 0x0000, 0x0020, 0xb011 },
|
||||
{ 0x23e1, 0x0000, 0x0001, 0xb011 },
|
||||
};
|
||||
|
||||
static const struct alc298_samsung_coeff_seq_desc amp_seq1[] = {
|
||||
{ 0x23ff, 0x0000, 0x0000, 0xb011 }, { 0x203a, 0x0000, 0x0080, 0xb011 },
|
||||
};
|
||||
|
||||
static const struct alc298_samsung_coeff_fixup_desc fixups2[] = {
|
||||
{ 0x4f, 0xb029 }, { 0x05, 0x2be0 }, { 0x30, 0x2421 },
|
||||
};
|
||||
|
||||
|
||||
static const struct alc298_samsung_coeff_seq_desc amp_seq2[] = {
|
||||
{ 0x203a, 0x0000, 0x0081, 0xb011 }, { 0x23ff, 0x0000, 0x0001, 0xb011 },
|
||||
};
|
||||
|
||||
if (action != HDA_FIXUP_ACT_INIT)
|
||||
return;
|
||||
|
||||
// First set of fixups
|
||||
for (i = 0; i < ARRAY_SIZE(fixups1); i++)
|
||||
alc_write_coef_idx(codec, fixups1[i].coeff_idx, fixups1[i].coeff_value);
|
||||
|
||||
// First set of writes
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x38, amp_0x38, ARRAY_SIZE(amp_0x38));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x39, amp_0x39, ARRAY_SIZE(amp_0x39));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x3c, amp_0x3c, ARRAY_SIZE(amp_0x3c));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x3d, amp_0x3d, ARRAY_SIZE(amp_0x3d));
|
||||
|
||||
// Second set of writes
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x38, amp_seq1, ARRAY_SIZE(amp_seq1));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x39, amp_seq1, ARRAY_SIZE(amp_seq1));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x3c, amp_seq1, ARRAY_SIZE(amp_seq1));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x3d, amp_seq1, ARRAY_SIZE(amp_seq1));
|
||||
|
||||
// Second set of fixups
|
||||
for (i = 0; i < ARRAY_SIZE(fixups2); i++)
|
||||
alc_write_coef_idx(codec, fixups2[i].coeff_idx, fixups2[i].coeff_value);
|
||||
|
||||
// Third set of writes
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x38, amp_seq2, ARRAY_SIZE(amp_seq2));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x39, amp_seq2, ARRAY_SIZE(amp_seq2));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x3c, amp_seq2, ARRAY_SIZE(amp_seq2));
|
||||
alc298_samsung_write_coef_pack_seq(codec, 0x3d, amp_seq2, ARRAY_SIZE(amp_seq2));
|
||||
|
||||
// Final fixup
|
||||
alc_write_coef_idx(codec, 0x10, 0x0F21);
|
||||
}
|
@ -220,6 +220,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21J6"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21M5"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
|
@ -2162,7 +2162,7 @@ static void tasdev_load_calibrated_data(struct tasdevice_priv *priv, int i)
|
||||
return;
|
||||
|
||||
cal = cal_fmw->calibrations;
|
||||
if (cal)
|
||||
if (!cal)
|
||||
return;
|
||||
|
||||
load_calib_data(priv, &cal->dev_data);
|
||||
|
@ -306,27 +306,12 @@ static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
SND_SOC_DAILINK_DEFS(hifi,
|
||||
DAILINK_COMP_ARRAY(COMP_EMPTY()),
|
||||
DAILINK_COMP_ARRAY(COMP_EMPTY(), COMP_EMPTY()),
|
||||
DAILINK_COMP_ARRAY(COMP_EMPTY()));
|
||||
|
||||
SND_SOC_DAILINK_DEFS(hifi_fe,
|
||||
DAILINK_COMP_ARRAY(COMP_EMPTY()),
|
||||
DAILINK_COMP_ARRAY(COMP_DUMMY()),
|
||||
DAILINK_COMP_ARRAY(COMP_EMPTY()));
|
||||
|
||||
SND_SOC_DAILINK_DEFS(hifi_be,
|
||||
DAILINK_COMP_ARRAY(COMP_EMPTY()),
|
||||
DAILINK_COMP_ARRAY(COMP_EMPTY(), COMP_EMPTY()));
|
||||
|
||||
static const struct snd_soc_dai_link fsl_asoc_card_dai[] = {
|
||||
/* Default ASoC DAI Link*/
|
||||
{
|
||||
.name = "HiFi",
|
||||
.stream_name = "HiFi",
|
||||
.ops = &fsl_asoc_card_ops,
|
||||
SND_SOC_DAILINK_REG(hifi),
|
||||
},
|
||||
/* DPCM Link between Front-End and Back-End (Optional) */
|
||||
{
|
||||
@ -335,7 +320,6 @@ static const struct snd_soc_dai_link fsl_asoc_card_dai[] = {
|
||||
.dpcm_playback = 1,
|
||||
.dpcm_capture = 1,
|
||||
.dynamic = 1,
|
||||
SND_SOC_DAILINK_REG(hifi_fe),
|
||||
},
|
||||
{
|
||||
.name = "HiFi-ASRC-BE",
|
||||
@ -345,7 +329,6 @@ static const struct snd_soc_dai_link fsl_asoc_card_dai[] = {
|
||||
.dpcm_playback = 1,
|
||||
.dpcm_capture = 1,
|
||||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(hifi_be),
|
||||
},
|
||||
};
|
||||
|
||||
@ -637,6 +620,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
||||
struct platform_device *cpu_pdev;
|
||||
struct fsl_asoc_card_priv *priv;
|
||||
struct device *codec_dev[2] = { NULL, NULL };
|
||||
struct snd_soc_dai_link_component *dlc;
|
||||
const char *codec_dai_name[2];
|
||||
const char *codec_dev_name[2];
|
||||
u32 asrc_fmt = 0;
|
||||
@ -717,7 +701,35 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
||||
|
||||
memcpy(priv->dai_link, fsl_asoc_card_dai,
|
||||
sizeof(struct snd_soc_dai_link) * ARRAY_SIZE(priv->dai_link));
|
||||
/*
|
||||
* "Default ASoC DAI Link": 1 cpus, 2 codecs, 1 platforms
|
||||
* "DPCM Link Front-End": 1 cpus, 1 codecs (dummy), 1 platforms
|
||||
* "DPCM Link Back-End": 1 cpus, 2 codecs
|
||||
* totally 10 components
|
||||
*/
|
||||
dlc = devm_kcalloc(&pdev->dev, 10, sizeof(*dlc), GFP_KERNEL);
|
||||
if (!dlc) {
|
||||
ret = -ENOMEM;
|
||||
goto asrc_fail;
|
||||
}
|
||||
|
||||
priv->dai_link[0].cpus = &dlc[0];
|
||||
priv->dai_link[0].num_cpus = 1;
|
||||
priv->dai_link[0].codecs = &dlc[1];
|
||||
priv->dai_link[0].num_codecs = 1;
|
||||
priv->dai_link[0].platforms = &dlc[3];
|
||||
priv->dai_link[0].num_platforms = 1;
|
||||
|
||||
priv->dai_link[1].cpus = &dlc[4];
|
||||
priv->dai_link[1].num_cpus = 1;
|
||||
priv->dai_link[1].codecs = &dlc[5];
|
||||
priv->dai_link[1].num_codecs = 0; /* dummy */
|
||||
priv->dai_link[1].platforms = &dlc[6];
|
||||
priv->dai_link[1].num_platforms = 1;
|
||||
|
||||
priv->dai_link[2].cpus = &dlc[7];
|
||||
priv->dai_link[2].num_cpus = 1;
|
||||
priv->dai_link[2].codecs = &dlc[8];
|
||||
priv->dai_link[2].num_codecs = 1;
|
||||
|
||||
priv->card.dapm_routes = audio_map;
|
||||
|
@ -64,6 +64,15 @@ static const struct codec_map amps[] = {
|
||||
CODEC_MAP_ENTRY("RT1015P", "rt1015", RT1015P_ACPI_HID, CODEC_RT1015P),
|
||||
CODEC_MAP_ENTRY("RT1019P", "rt1019", RT1019P_ACPI_HID, CODEC_RT1019P),
|
||||
CODEC_MAP_ENTRY("RT1308", "rt1308", RT1308_ACPI_HID, CODEC_RT1308),
|
||||
|
||||
/*
|
||||
* Monolithic components
|
||||
*
|
||||
* Only put components that can serve as both the amp and the codec below this line.
|
||||
* This will ensure that if the part is used just as a codec and there is an amp as well
|
||||
* then the amp will be selected properly.
|
||||
*/
|
||||
CODEC_MAP_ENTRY("RT5650", "rt5650", RT5650_ACPI_HID, CODEC_RT5650),
|
||||
};
|
||||
|
||||
enum snd_soc_acpi_intel_codec
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <linux/platform_data/x86/soc.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_X86)
|
||||
#if IS_REACHABLE(CONFIG_IOSF_MBI)
|
||||
|
||||
#include <linux/dmi.h>
|
||||
#include <asm/iosf_mbi.h>
|
||||
|
@ -34,7 +34,6 @@ static const struct sof_amd_acp_desc vangogh_chip_info = {
|
||||
.dsp_intr_base = ACP5X_DSP_SW_INTR_BASE,
|
||||
.sram_pte_offset = ACP5X_SRAM_PTE_OFFSET,
|
||||
.hw_semaphore_offset = ACP5X_AXI2DAGB_SEM_0,
|
||||
.acp_clkmux_sel = ACP5X_CLKMUX_SEL,
|
||||
.probe_reg_offset = ACP5X_FUTURE_REG_ACLK_0,
|
||||
};
|
||||
|
||||
|
@ -234,7 +234,7 @@ static int imx8m_probe(struct snd_sof_dev *sdev)
|
||||
/* set default mailbox offset for FW ready message */
|
||||
sdev->dsp_box.offset = MBOX_OFFSET;
|
||||
|
||||
priv->regmap = syscon_regmap_lookup_by_compatible("fsl,dsp-ctrl");
|
||||
priv->regmap = syscon_regmap_lookup_by_phandle(np, "fsl,dsp-ctrl");
|
||||
if (IS_ERR(priv->regmap)) {
|
||||
dev_err(sdev->dev, "cannot find dsp-ctrl registers");
|
||||
ret = PTR_ERR(priv->regmap);
|
||||
|
@ -310,15 +310,19 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Wait for completion of transfer */
|
||||
time_left = wait_for_completion_timeout(&hda_stream->ioc,
|
||||
msecs_to_jiffies(HDA_CL_DMA_IOC_TIMEOUT_MS));
|
||||
if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) {
|
||||
/* Wait for completion of transfer */
|
||||
time_left = wait_for_completion_timeout(&hda_stream->ioc,
|
||||
msecs_to_jiffies(HDA_CL_DMA_IOC_TIMEOUT_MS));
|
||||
|
||||
if (!time_left) {
|
||||
dev_err(sdev->dev, "Code loader DMA did not complete\n");
|
||||
return -ETIMEDOUT;
|
||||
if (!time_left) {
|
||||
dev_err(sdev->dev, "Code loader DMA did not complete\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
dev_dbg(sdev->dev, "Code loader DMA done\n");
|
||||
}
|
||||
dev_dbg(sdev->dev, "Code loader DMA done, waiting for FW_ENTERED status\n");
|
||||
|
||||
dev_dbg(sdev->dev, "waiting for FW_ENTERED status\n");
|
||||
|
||||
status = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR,
|
||||
chip->rom_status_reg, reg,
|
||||
|
@ -1307,9 +1307,10 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
|
||||
const struct sof_dev_desc *desc = sof_pdata->desc;
|
||||
struct hdac_bus *bus = sof_to_bus(sdev);
|
||||
struct snd_soc_acpi_mach *mach = NULL;
|
||||
enum snd_soc_acpi_intel_codec codec_type;
|
||||
enum snd_soc_acpi_intel_codec codec_type, amp_type;
|
||||
const char *tplg_filename;
|
||||
const char *tplg_suffix;
|
||||
bool amp_name_valid;
|
||||
|
||||
/* Try I2S or DMIC if it is supported */
|
||||
if (interface_mask & (BIT(SOF_DAI_INTEL_SSP) | BIT(SOF_DAI_INTEL_DMIC)))
|
||||
@ -1413,15 +1414,16 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
|
||||
}
|
||||
}
|
||||
|
||||
codec_type = snd_soc_acpi_intel_detect_amp_type(sdev->dev);
|
||||
amp_type = snd_soc_acpi_intel_detect_amp_type(sdev->dev);
|
||||
codec_type = snd_soc_acpi_intel_detect_codec_type(sdev->dev);
|
||||
amp_name_valid = amp_type != CODEC_NONE && amp_type != codec_type;
|
||||
|
||||
if (tplg_fixup &&
|
||||
mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_AMP_NAME &&
|
||||
codec_type != CODEC_NONE) {
|
||||
tplg_suffix = snd_soc_acpi_intel_get_amp_tplg_suffix(codec_type);
|
||||
if (tplg_fixup && amp_name_valid &&
|
||||
mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_AMP_NAME) {
|
||||
tplg_suffix = snd_soc_acpi_intel_get_amp_tplg_suffix(amp_type);
|
||||
if (!tplg_suffix) {
|
||||
dev_err(sdev->dev, "no tplg suffix found, amp %d\n",
|
||||
codec_type);
|
||||
amp_type);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1436,7 +1438,6 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
|
||||
add_extension = true;
|
||||
}
|
||||
|
||||
codec_type = snd_soc_acpi_intel_detect_codec_type(sdev->dev);
|
||||
|
||||
if (tplg_fixup &&
|
||||
mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME &&
|
||||
|
@ -1358,7 +1358,13 @@ static void sof_ipc4_unprepare_copier_module(struct snd_sof_widget *swidget)
|
||||
ipc4_copier = dai->private;
|
||||
|
||||
if (pipeline->use_chain_dma) {
|
||||
pipeline->msg.primary = 0;
|
||||
/*
|
||||
* Preserve the DMA Link ID and clear other bits since
|
||||
* the DMA Link ID is only configured once during
|
||||
* dai_config, other fields are expected to be 0 for
|
||||
* re-configuration
|
||||
*/
|
||||
pipeline->msg.primary &= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
|
||||
pipeline->msg.extension = 0;
|
||||
}
|
||||
|
||||
@ -3095,8 +3101,14 @@ static int sof_ipc4_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *
|
||||
return 0;
|
||||
|
||||
if (pipeline->use_chain_dma) {
|
||||
pipeline->msg.primary &= ~SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
|
||||
pipeline->msg.primary |= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID(data->dai_data);
|
||||
/*
|
||||
* Only configure the DMA Link ID for ChainDMA when this op is
|
||||
* invoked with SOF_DAI_CONFIG_FLAGS_HW_PARAMS
|
||||
*/
|
||||
if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) {
|
||||
pipeline->msg.primary &= ~SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
|
||||
pipeline->msg.primary |= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID(data->dai_data);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,7 @@ config SND_SOC_TEGRA210_DMIC
|
||||
|
||||
config SND_SOC_TEGRA210_I2S
|
||||
tristate "Tegra210 I2S module"
|
||||
select SND_SIMPLE_CARD_UTILS
|
||||
help
|
||||
Config to enable the Inter-IC Sound (I2S) Controller which
|
||||
implements full-duplex and bidirectional and single direction
|
||||
|
@ -1211,6 +1211,13 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
|
||||
cval->res = 16;
|
||||
}
|
||||
break;
|
||||
case USB_ID(0x1bcf, 0x2281): /* HD Webcam */
|
||||
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
|
||||
usb_audio_info(chip,
|
||||
"set resolution quirk: cval->res = 16\n");
|
||||
cval->res = 16;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2125,6 +2125,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
||||
QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
||||
DEVICE_FLG(0x0b0e, 0x0349, /* Jabra 550a */
|
||||
QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
||||
DEVICE_FLG(0x0c45, 0x6340, /* Sonix HD USB Camera */
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */
|
||||
QUIRK_FLAG_FIXED_RATE),
|
||||
DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */
|
||||
@ -2167,6 +2169,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x19f7, 0x0035, /* RODE NT-USB+ */
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x1bcf, 0x2283, /* NexiGo N930AF FHD Webcam */
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x2040, 0x7200, /* Hauppauge HVR-950Q */
|
||||
|
Loading…
Reference in New Issue
Block a user