[alsa-devel] [PATCH1/1] hda: digital slave support for IDT codecs
Added slave_dig_outs entries for several IDT codecs that have multiple SPDIF outs, and enabled these SPDIF outs in several pin configs.
--- Signed-off-by: Matthew Ranostay mranostay@embeddedalley.com
diff --git a/pci/hda/patch_sigmatel.c b/pci/hda/patch_sigmatel.c index 9968ee4..52b3579 100644 --- a/pci/hda/patch_sigmatel.c +++ b/pci/hda/patch_sigmatel.c @@ -229,6 +229,10 @@ static hda_nid_t stac92hd73xx_pwr_nids[8] = { 0x0f, 0x10, 0x11 };
+static hda_nid_t stac92hd73xx_slave_dig_outs[2] = { + 0x26, 0, +}; + static hda_nid_t stac92hd73xx_adc_nids[2] = { 0x1a, 0x1b }; @@ -274,6 +278,10 @@ static hda_nid_t stac92hd83xxx_pwr_nids[4] = { 0xa, 0xb, 0xd, 0xe, };
+static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = { + 0x1e, 0, +}; + static unsigned int stac92hd83xxx_pwr_mapping[4] = { 0x03, 0x0c, 0x10, 0x40, }; @@ -303,6 +311,10 @@ static hda_nid_t stac92hd71bxx_dmic_nids[STAC92HD71BXX_NUM_DMICS + 1] = { 0x18, 0x19, 0 };
+static hda_nid_t stac92hd71bxx_slave_dig_outs[2] = { + 0x22, 0 +}; + static hda_nid_t stac925x_adc_nids[1] = { 0x03, }; @@ -396,9 +408,10 @@ static hda_nid_t stac92hd83xxx_pin_nids[14] = { 0x0f, 0x10, 0x11, 0x12, 0x13, 0x1d, 0x1e, 0x1f, 0x20 }; -static hda_nid_t stac92hd71bxx_pin_nids[10] = { +static hda_nid_t stac92hd71bxx_pin_nids[11] = { 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x14, 0x18, 0x19, 0x1e, + 0x1f, };
static hda_nid_t stac927x_pin_nids[14] = { @@ -1424,22 +1437,22 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { "DFI LanParty", STAC_92HD71BXX_REF), };
-static unsigned int ref92hd71bxx_pin_configs[10] = { +static unsigned int ref92hd71bxx_pin_configs[11] = { 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0, - 0x90a000f0, 0x01452050, + 0x90a000f0, 0x01452050, 0x01452050, };
-static unsigned int dell_m4_1_pin_configs[10] = { +static unsigned int dell_m4_1_pin_configs[11] = { 0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110, 0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0, - 0x40f000f0, 0x4f0000f0, + 0x40f000f0, 0x4f0000f0, 0x4f0000f0, };
-static unsigned int dell_m4_2_pin_configs[10] = { +static unsigned int dell_m4_2_pin_configs[11] = { 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110, 0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0, - 0x40f000f0, 0x044413b0, + 0x40f000f0, 0x044413b0, 0x044413b0, };
static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { @@ -3841,8 +3854,9 @@ again:
spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids); spec->pwr_nids = stac92hd73xx_pwr_nids; + codec->slave_dig_outs = stac92hd73xx_slave_dig_outs;
- err = stac92xx_parse_auto_config(codec, 0x22, 0x24); + err = stac92xx_parse_auto_config(codec, 0x22, 0x25);
if (!err) { if (spec->board_config < 0) { @@ -3883,6 +3897,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) return -ENOMEM;
codec->spec = spec; + codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; spec->mono_nid = 0x19; spec->digbeep_nid = 0x21; spec->dmic_nids = stac92hd83xxx_dmic_nids; @@ -4033,6 +4048,7 @@ again: case 0x111d76b5: spec->mixer = stac92hd71bxx_mixer; spec->init = stac92hd71bxx_core_init; + codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; break; case 0x111d7608: /* 5 Port with Analog Mixer */ if ((codec->revision_id & 0xf) == 0 || @@ -4065,6 +4081,7 @@ again: default: spec->mixer = stac92hd71bxx_analog_mixer; spec->init = stac92hd71bxx_analog_core_init; + codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; }
spec->aloopback_mask = 0x20;
At Sun, 07 Sep 2008 14:36:53 -0400, Matthew Ranostay wrote:
Added slave_dig_outs entries for several IDT codecs that have multiple SPDIF outs, and enabled these SPDIF outs in several pin configs.
Signed-off-by: Matthew Ranostay mranostay@embeddedalley.com
This patch seems not applicable. Could you rebuild from my latest git tree? Note that the core changes for slave SPDIF was already added.
thanks,
Takashi
diff --git a/pci/hda/patch_sigmatel.c b/pci/hda/patch_sigmatel.c index 9968ee4..52b3579 100644 --- a/pci/hda/patch_sigmatel.c +++ b/pci/hda/patch_sigmatel.c @@ -229,6 +229,10 @@ static hda_nid_t stac92hd73xx_pwr_nids[8] = { 0x0f, 0x10, 0x11 };
+static hda_nid_t stac92hd73xx_slave_dig_outs[2] = {
- 0x26, 0,
+};
static hda_nid_t stac92hd73xx_adc_nids[2] = { 0x1a, 0x1b }; @@ -274,6 +278,10 @@ static hda_nid_t stac92hd83xxx_pwr_nids[4] = { 0xa, 0xb, 0xd, 0xe, };
+static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = {
- 0x1e, 0,
+};
static unsigned int stac92hd83xxx_pwr_mapping[4] = { 0x03, 0x0c, 0x10, 0x40, }; @@ -303,6 +311,10 @@ static hda_nid_t stac92hd71bxx_dmic_nids[STAC92HD71BXX_NUM_DMICS + 1] = { 0x18, 0x19, 0 };
+static hda_nid_t stac92hd71bxx_slave_dig_outs[2] = {
- 0x22, 0
+};
static hda_nid_t stac925x_adc_nids[1] = { 0x03, }; @@ -396,9 +408,10 @@ static hda_nid_t stac92hd83xxx_pin_nids[14] = { 0x0f, 0x10, 0x11, 0x12, 0x13, 0x1d, 0x1e, 0x1f, 0x20 }; -static hda_nid_t stac92hd71bxx_pin_nids[10] = { +static hda_nid_t stac92hd71bxx_pin_nids[11] = { 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x14, 0x18, 0x19, 0x1e,
- 0x1f,
};
static hda_nid_t stac927x_pin_nids[14] = { @@ -1424,22 +1437,22 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { "DFI LanParty", STAC_92HD71BXX_REF), };
-static unsigned int ref92hd71bxx_pin_configs[10] = { +static unsigned int ref92hd71bxx_pin_configs[11] = { 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0,
- 0x90a000f0, 0x01452050,
- 0x90a000f0, 0x01452050, 0x01452050,
};
-static unsigned int dell_m4_1_pin_configs[10] = { +static unsigned int dell_m4_1_pin_configs[11] = { 0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110, 0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0,
- 0x40f000f0, 0x4f0000f0,
- 0x40f000f0, 0x4f0000f0, 0x4f0000f0,
};
-static unsigned int dell_m4_2_pin_configs[10] = { +static unsigned int dell_m4_2_pin_configs[11] = { 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110, 0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0,
- 0x40f000f0, 0x044413b0,
- 0x40f000f0, 0x044413b0, 0x044413b0,
};
static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { @@ -3841,8 +3854,9 @@ again:
spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids); spec->pwr_nids = stac92hd73xx_pwr_nids;
- codec->slave_dig_outs = stac92hd73xx_slave_dig_outs;
- err = stac92xx_parse_auto_config(codec, 0x22, 0x24);
err = stac92xx_parse_auto_config(codec, 0x22, 0x25);
if (!err) { if (spec->board_config < 0) {
@@ -3883,6 +3897,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) return -ENOMEM;
codec->spec = spec;
- codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; spec->mono_nid = 0x19; spec->digbeep_nid = 0x21; spec->dmic_nids = stac92hd83xxx_dmic_nids;
@@ -4033,6 +4048,7 @@ again: case 0x111d76b5: spec->mixer = stac92hd71bxx_mixer; spec->init = stac92hd71bxx_core_init;
break; case 0x111d7608: /* 5 Port with Analog Mixer */ if ((codec->revision_id & 0xf) == 0 ||codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
@@ -4065,6 +4081,7 @@ again: default: spec->mixer = stac92hd71bxx_analog_mixer; spec->init = stac92hd71bxx_analog_core_init;
codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
}
spec->aloopback_mask = 0x20;
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Takashi Iwai wrote:
At Sun, 07 Sep 2008 14:36:53 -0400, Matthew Ranostay wrote:
Added slave_dig_outs entries for several IDT codecs that have multiple SPDIF outs, and enabled these SPDIF outs in several pin configs.
Have you pushed your changes lately? I don't see any update since last Wednesday in the git log.
- -Matt
Signed-off-by: Matthew Ranostay mranostay@embeddedalley.com
This patch seems not applicable. Could you rebuild from my latest git tree? Note that the core changes for slave SPDIF was already added.
thanks,
Takashi
diff --git a/pci/hda/patch_sigmatel.c b/pci/hda/patch_sigmatel.c index 9968ee4..52b3579 100644 --- a/pci/hda/patch_sigmatel.c +++ b/pci/hda/patch_sigmatel.c @@ -229,6 +229,10 @@ static hda_nid_t stac92hd73xx_pwr_nids[8] = { 0x0f, 0x10, 0x11 };
+static hda_nid_t stac92hd73xx_slave_dig_outs[2] = {
- 0x26, 0,
+};
static hda_nid_t stac92hd73xx_adc_nids[2] = { 0x1a, 0x1b }; @@ -274,6 +278,10 @@ static hda_nid_t stac92hd83xxx_pwr_nids[4] = { 0xa, 0xb, 0xd, 0xe, };
+static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = {
- 0x1e, 0,
+};
static unsigned int stac92hd83xxx_pwr_mapping[4] = { 0x03, 0x0c, 0x10, 0x40, }; @@ -303,6 +311,10 @@ static hda_nid_t stac92hd71bxx_dmic_nids[STAC92HD71BXX_NUM_DMICS + 1] = { 0x18, 0x19, 0 };
+static hda_nid_t stac92hd71bxx_slave_dig_outs[2] = {
- 0x22, 0
+};
static hda_nid_t stac925x_adc_nids[1] = { 0x03, }; @@ -396,9 +408,10 @@ static hda_nid_t stac92hd83xxx_pin_nids[14] = { 0x0f, 0x10, 0x11, 0x12, 0x13, 0x1d, 0x1e, 0x1f, 0x20 }; -static hda_nid_t stac92hd71bxx_pin_nids[10] = { +static hda_nid_t stac92hd71bxx_pin_nids[11] = { 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x14, 0x18, 0x19, 0x1e,
- 0x1f,
};
static hda_nid_t stac927x_pin_nids[14] = { @@ -1424,22 +1437,22 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { "DFI LanParty", STAC_92HD71BXX_REF), };
-static unsigned int ref92hd71bxx_pin_configs[10] = { +static unsigned int ref92hd71bxx_pin_configs[11] = { 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0,
- 0x90a000f0, 0x01452050,
- 0x90a000f0, 0x01452050, 0x01452050,
};
-static unsigned int dell_m4_1_pin_configs[10] = { +static unsigned int dell_m4_1_pin_configs[11] = { 0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110, 0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0,
- 0x40f000f0, 0x4f0000f0,
- 0x40f000f0, 0x4f0000f0, 0x4f0000f0,
};
-static unsigned int dell_m4_2_pin_configs[10] = { +static unsigned int dell_m4_2_pin_configs[11] = { 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110, 0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0,
- 0x40f000f0, 0x044413b0,
- 0x40f000f0, 0x044413b0, 0x044413b0,
};
static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { @@ -3841,8 +3854,9 @@ again:
spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids); spec->pwr_nids = stac92hd73xx_pwr_nids;
- codec->slave_dig_outs = stac92hd73xx_slave_dig_outs;
- err = stac92xx_parse_auto_config(codec, 0x22, 0x24);
err = stac92xx_parse_auto_config(codec, 0x22, 0x25);
if (!err) { if (spec->board_config < 0) {
@@ -3883,6 +3897,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) return -ENOMEM;
codec->spec = spec;
- codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; spec->mono_nid = 0x19; spec->digbeep_nid = 0x21; spec->dmic_nids = stac92hd83xxx_dmic_nids;
@@ -4033,6 +4048,7 @@ again: case 0x111d76b5: spec->mixer = stac92hd71bxx_mixer; spec->init = stac92hd71bxx_core_init;
break; case 0x111d7608: /* 5 Port with Analog Mixer */ if ((codec->revision_id & 0xf) == 0 ||codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
@@ -4065,6 +4081,7 @@ again: default: spec->mixer = stac92hd71bxx_analog_mixer; spec->init = stac92hd71bxx_analog_core_init;
codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
}
spec->aloopback_mask = 0x20;
At Mon, 08 Sep 2008 10:28:53 -0400, Matthew Ranostay wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Takashi Iwai wrote:
At Sun, 07 Sep 2008 14:36:53 -0400, Matthew Ranostay wrote:
Added slave_dig_outs entries for several IDT codecs that have multiple SPDIF outs, and enabled these SPDIF outs in several pin configs.
Have you pushed your changes lately? I don't see any update since last Wednesday in the git log.
Take sound-2.6.git tree from the below: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git Gitweb is http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=summary
thanks,
Takashi
Signed-off-by: Matthew Ranostay mranostay@embeddedalley.com
This patch seems not applicable. Could you rebuild from my latest git tree? Note that the core changes for slave SPDIF was already added.
thanks,
Takashi
diff --git a/pci/hda/patch_sigmatel.c b/pci/hda/patch_sigmatel.c index 9968ee4..52b3579 100644 --- a/pci/hda/patch_sigmatel.c +++ b/pci/hda/patch_sigmatel.c @@ -229,6 +229,10 @@ static hda_nid_t stac92hd73xx_pwr_nids[8] = { 0x0f, 0x10, 0x11 };
+static hda_nid_t stac92hd73xx_slave_dig_outs[2] = {
- 0x26, 0,
+};
static hda_nid_t stac92hd73xx_adc_nids[2] = { 0x1a, 0x1b }; @@ -274,6 +278,10 @@ static hda_nid_t stac92hd83xxx_pwr_nids[4] = { 0xa, 0xb, 0xd, 0xe, };
+static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = {
- 0x1e, 0,
+};
static unsigned int stac92hd83xxx_pwr_mapping[4] = { 0x03, 0x0c, 0x10, 0x40, }; @@ -303,6 +311,10 @@ static hda_nid_t stac92hd71bxx_dmic_nids[STAC92HD71BXX_NUM_DMICS + 1] = { 0x18, 0x19, 0 };
+static hda_nid_t stac92hd71bxx_slave_dig_outs[2] = {
- 0x22, 0
+};
static hda_nid_t stac925x_adc_nids[1] = { 0x03, }; @@ -396,9 +408,10 @@ static hda_nid_t stac92hd83xxx_pin_nids[14] = { 0x0f, 0x10, 0x11, 0x12, 0x13, 0x1d, 0x1e, 0x1f, 0x20 }; -static hda_nid_t stac92hd71bxx_pin_nids[10] = { +static hda_nid_t stac92hd71bxx_pin_nids[11] = { 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x14, 0x18, 0x19, 0x1e,
- 0x1f,
};
static hda_nid_t stac927x_pin_nids[14] = { @@ -1424,22 +1437,22 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { "DFI LanParty", STAC_92HD71BXX_REF), };
-static unsigned int ref92hd71bxx_pin_configs[10] = { +static unsigned int ref92hd71bxx_pin_configs[11] = { 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0,
- 0x90a000f0, 0x01452050,
- 0x90a000f0, 0x01452050, 0x01452050,
};
-static unsigned int dell_m4_1_pin_configs[10] = { +static unsigned int dell_m4_1_pin_configs[11] = { 0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110, 0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0,
- 0x40f000f0, 0x4f0000f0,
- 0x40f000f0, 0x4f0000f0, 0x4f0000f0,
};
-static unsigned int dell_m4_2_pin_configs[10] = { +static unsigned int dell_m4_2_pin_configs[11] = { 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110, 0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0,
- 0x40f000f0, 0x044413b0,
- 0x40f000f0, 0x044413b0, 0x044413b0,
};
static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { @@ -3841,8 +3854,9 @@ again:
spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids); spec->pwr_nids = stac92hd73xx_pwr_nids;
- codec->slave_dig_outs = stac92hd73xx_slave_dig_outs;
- err = stac92xx_parse_auto_config(codec, 0x22, 0x24);
err = stac92xx_parse_auto_config(codec, 0x22, 0x25);
if (!err) { if (spec->board_config < 0) {
@@ -3883,6 +3897,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) return -ENOMEM;
codec->spec = spec;
- codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; spec->mono_nid = 0x19; spec->digbeep_nid = 0x21; spec->dmic_nids = stac92hd83xxx_dmic_nids;
@@ -4033,6 +4048,7 @@ again: case 0x111d76b5: spec->mixer = stac92hd71bxx_mixer; spec->init = stac92hd71bxx_core_init;
break; case 0x111d7608: /* 5 Port with Analog Mixer */ if ((codec->revision_id & 0xf) == 0 ||codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
@@ -4065,6 +4081,7 @@ again: default: spec->mixer = stac92hd71bxx_analog_mixer; spec->init = stac92hd71bxx_analog_core_init;
codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
}
spec->aloopback_mask = 0x20;
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEUEARECAAYFAkjFNqUACgkQ7s2wy7nhBHWKUgCgjg0/PAGApjKAsGEbDeeg2Qx4 hTUAl02y0SZSv5HD4O2gTZfzRKP+jgc= =uD7P -----END PGP SIGNATURE-----
The following changes since commit 17c4badb6077b14d1cc67860511abd2001cefbf1: Cliff Cai (1): ASoC: Blackfin: Include Blackfin architecture support in build
are available in the git repository at:
git://opensource.wolfsonmicro.com/linux-2.6-asoc for-tiwai
Mark Brown (3): ALSA: ASoC: Fix indentation in WM9713 ALSA: ASoC: Sort Kconfig and Makefile entries for codecs ALSA: ASoC: Use codec digital mute when stopping playback
sound/soc/codecs/Kconfig | 64 ++++++++++++++++++++++---------------------- sound/soc/codecs/Makefile | 16 +++++----- sound/soc/codecs/wm9713.c | 22 +++++++------- sound/soc/soc-core.c | 6 ++++ 4 files changed, 57 insertions(+), 51 deletions(-)
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/codecs/wm9713.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 38d1fe0..c10f8a3 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -949,17 +949,17 @@ static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream,
static void wm9713_voiceshutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_device *socdev = rtd->socdev; - struct snd_soc_codec *codec = socdev->codec; - u16 status; - - /* Gracefully shut down the voice interface. */ - status = ac97_read(codec, AC97_EXTENDED_STATUS) | 0x1000; - ac97_write(codec, AC97_HANDSET_RATE, 0x0280); - schedule_timeout_interruptible(msecs_to_jiffies(1)); - ac97_write(codec, AC97_HANDSET_RATE, 0x0F80); - ac97_write(codec, AC97_EXTENDED_MID, status); + struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_device *socdev = rtd->socdev; + struct snd_soc_codec *codec = socdev->codec; + u16 status; + + /* Gracefully shut down the voice interface. */ + status = ac97_read(codec, AC97_EXTENDED_STATUS) | 0x1000; + ac97_write(codec, AC97_HANDSET_RATE, 0x0280); + schedule_timeout_interruptible(msecs_to_jiffies(1)); + ac97_write(codec, AC97_HANDSET_RATE, 0x0F80); + ac97_write(codec, AC97_EXTENDED_MID, status); }
static int ac97_hifi_prepare(struct snd_pcm_substream *substream)
Hopefully this will make merges a little bit easier.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/codecs/Kconfig | 64 ++++++++++++++++++++++---------------------- sound/soc/codecs/Makefile | 16 +++++----- 2 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 8b4bb5c..27f2dfa 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -4,7 +4,10 @@ config SND_SOC_ALL_CODECS select SPI select SPI_MASTER select SND_SOC_AK4535 + select SND_SOC_CS4270 select SND_SOC_SSM2602 + select SND_SOC_TLV320AIC26 + select SND_SOC_TLV320AIC3X select SND_SOC_UDA1380 select SND_SOC_WM8510 select SND_SOC_WM8580 @@ -14,9 +17,6 @@ config SND_SOC_ALL_CODECS select SND_SOC_WM8900 select SND_SOC_WM8903 select SND_SOC_WM8990 - select SND_SOC_CS4270 - select SND_SOC_TLV320AIC26 - select SND_SOC_TLV320AIC3X help Normally ASoC codec drivers are only built if a machine driver which uses them is also built since they are only usable with a machine @@ -36,6 +36,35 @@ config SND_SOC_AD1980 config SND_SOC_AK4535 tristate
+# Cirrus Logic CS4270 Codec +config SND_SOC_CS4270 + tristate + +# Cirrus Logic CS4270 Codec Hardware Mute Support +# Select if you have external muting circuitry attached to your CS4270. +config SND_SOC_CS4270_HWMUTE + bool + depends on SND_SOC_CS4270 + +# Cirrus Logic CS4270 Codec VD = 3.3V Errata +# Select if you are affected by the errata where the part will not function +# if MCLK divide-by-1.5 is selected and VD is set to 3.3V. The driver will +# not select any sample rates that require MCLK to be divided by 1.5. +config SND_SOC_CS4270_VD33_ERRATA + bool + depends on SND_SOC_CS4270 + +config SND_SOC_SSM2602 + tristate + +config SND_SOC_TLV320AIC26 + tristate "TI TLV320AIC26 Codec support" + depends on SND_SOC && SPI + +config SND_SOC_TLV320AIC3X + tristate + depends on I2C + config SND_SOC_UDA1380 tristate
@@ -68,32 +97,3 @@ config SND_SOC_WM9712
config SND_SOC_WM9713 tristate - -# Cirrus Logic CS4270 Codec -config SND_SOC_CS4270 - tristate - -# Cirrus Logic CS4270 Codec Hardware Mute Support -# Select if you have external muting circuitry attached to your CS4270. -config SND_SOC_CS4270_HWMUTE - bool - depends on SND_SOC_CS4270 - -# Cirrus Logic CS4270 Codec VD = 3.3V Errata -# Select if you are affected by the errata where the part will not function -# if MCLK divide-by-1.5 is selected and VD is set to 3.3V. The driver will -# not select any sample rates that require MCLK to be divided by 1.5. -config SND_SOC_CS4270_VD33_ERRATA - bool - depends on SND_SOC_CS4270 - -config SND_SOC_TLV320AIC26 - tristate "TI TLV320AIC26 Codec support" - depends on SND_SOC && SPI - -config SND_SOC_TLV320AIC3X - tristate - depends on I2C - -config SND_SOC_SSM2602 - tristate diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index 0cd55ee..c2b8783 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -1,6 +1,10 @@ snd-soc-ac97-objs := ac97.o snd-soc-ad1980-objs := ad1980.o snd-soc-ak4535-objs := ak4535.o +snd-soc-cs4270-objs := cs4270.o +snd-soc-ssm2602-objs := ssm2602.o +snd-soc-tlv320aic26-objs := tlv320aic26.o +snd-soc-tlv320aic3x-objs := tlv320aic3x.o snd-soc-uda1380-objs := uda1380.o snd-soc-wm8510-objs := wm8510.o snd-soc-wm8580-objs := wm8580.o @@ -12,14 +16,14 @@ snd-soc-wm8903-objs := wm8903.o snd-soc-wm8990-objs := wm8990.o snd-soc-wm9712-objs := wm9712.o snd-soc-wm9713-objs := wm9713.o -snd-soc-cs4270-objs := cs4270.o -snd-soc-tlv320aic26-objs := tlv320aic26.o -snd-soc-tlv320aic3x-objs := tlv320aic3x.o -snd-soc-ssm2602-objs := ssm2602.o
obj-$(CONFIG_SND_SOC_AC97_CODEC) += snd-soc-ac97.o obj-$(CONFIG_SND_SOC_AD1980) += snd-soc-ad1980.o obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o +obj-$(CONFIG_SND_SOC_CS4270) += snd-soc-cs4270.o +obj-$(CONFIG_SND_SOC_SSM2602) += snd-soc-ssm2602.o +obj-$(CONFIG_SND_SOC_TLV320AIC26) += snd-soc-tlv320aic26.o +obj-$(CONFIG_SND_SOC_TLV320AIC3X) += snd-soc-tlv320aic3x.o obj-$(CONFIG_SND_SOC_UDA1380) += snd-soc-uda1380.o obj-$(CONFIG_SND_SOC_WM8510) += snd-soc-wm8510.o obj-$(CONFIG_SND_SOC_WM8580) += snd-soc-wm8580.o @@ -31,7 +35,3 @@ obj-$(CONFIG_SND_SOC_WM8903) += snd-soc-wm8903.o obj-$(CONFIG_SND_SOC_WM8990) += snd-soc-wm8990.o obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o -obj-$(CONFIG_SND_SOC_CS4270) += snd-soc-cs4270.o -obj-$(CONFIG_SND_SOC_TLV320AIC26) += snd-soc-tlv320aic26.o -obj-$(CONFIG_SND_SOC_TLV320AIC3X) += snd-soc-tlv320aic3x.o -obj-$(CONFIG_SND_SOC_SSM2602) += snd-soc-ssm2602.o
Muting the DAC masks artefacts introduced as the digital stream shuts down, for example when the input stops being clocked.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/soc-core.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1563cee..ad38113 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -340,6 +340,12 @@ static int soc_codec_close(struct snd_pcm_substream *substream) } codec->active--;
+ /* Muting the DAC suppresses artifacts caused during digital + * shutdown, for example from stopping clocks. + */ + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + snd_soc_dai_digital_mute(codec_dai, 1); + if (cpu_dai->ops.shutdown) cpu_dai->ops.shutdown(substream);
At Mon, 8 Sep 2008 16:12:50 +0100, Mark Brown wrote:
The following changes since commit 17c4badb6077b14d1cc67860511abd2001cefbf1: Cliff Cai (1): ASoC: Blackfin: Include Blackfin architecture support in build
are available in the git repository at:
git://opensource.wolfsonmicro.com/linux-2.6-asoc for-tiwai
Mark Brown (3): ALSA: ASoC: Fix indentation in WM9713 ALSA: ASoC: Sort Kconfig and Makefile entries for codecs ALSA: ASoC: Use codec digital mute when stopping playback
sound/soc/codecs/Kconfig | 64 ++++++++++++++++++++++---------------------- sound/soc/codecs/Makefile | 16 +++++----- sound/soc/codecs/wm9713.c | 22 +++++++------- sound/soc/soc-core.c | 6 ++++ 4 files changed, 57 insertions(+), 51 deletions(-)
All looks good. Now pulled and pushed out. Thanks.
Takashi
participants (3)
-
Mark Brown
-
Matthew Ranostay
-
Takashi Iwai