Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260158 > unrolled thread
| Started by | Ondrej Zary <linux@rainbow-software.org> |
|---|---|
| First post | 2015-11-01 14:40 +0100 |
| Last post | 2015-11-01 17:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] snd-maestro3: Enable docking support for Dell Latitude C810 Ondrej Zary <linux@rainbow-software.org> - 2015-11-01 14:40 +0100
Re: [PATCH] snd-maestro3: Enable docking support for Dell Latitude C810 Takashi Iwai <tiwai@suse.de> - 2015-11-01 17:50 +0100
| From | Ondrej Zary <linux@rainbow-software.org> |
|---|---|
| Date | 2015-11-01 14:40 +0100 |
| Subject | [PATCH] snd-maestro3: Enable docking support for Dell Latitude C810 |
| Message-ID | <qq11v-sb-1@gated-at.bofh.it> |
Enable I2S docking for Dell Latitude C810.
This allows the audio output on C/Port II to work (and probably also
the audio inputs on C/Dock II).
The volume can't be adjusted - none of the mixer controls currently
supported affects the I2S output (they belong to the STAC9721/23 AC'97
codec responsible for the laptop internal connectors & speakers).
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
sound/pci/maestro3.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 72e89ce..965d5c6 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -1932,12 +1932,19 @@ snd_m3_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
}
-static void snd_m3_remote_codec_config(int io, int isremote)
+static void snd_m3_remote_codec_config(struct snd_m3 *chip, int isremote)
{
+ int io = chip->iobase;
+ u16 tmp;
+
isremote = isremote ? 1 : 0;
- outw((inw(io + RING_BUS_CTRL_B) & ~SECOND_CODEC_ID_MASK) | isremote,
- io + RING_BUS_CTRL_B);
+ tmp = inw(io + RING_BUS_CTRL_B) & ~SECOND_CODEC_ID_MASK;
+ /* enable dock on Dell Latitude C810 */
+ if (chip->pci->subsystem_vendor == 0x1028 &&
+ chip->pci->subsystem_device == 0x00e5)
+ tmp |= M3I_DOCK_ENABLE;
+ outw(tmp | isremote, io + RING_BUS_CTRL_B);
outw((inw(io + SDO_OUT_DEST_CTRL) & ~COMMAND_ADDR_OUT) | isremote,
io + SDO_OUT_DEST_CTRL);
outw((inw(io + SDO_IN_DEST_CTRL) & ~STATUS_ADDR_IN) | isremote,
@@ -1989,7 +1996,7 @@ static void snd_m3_ac97_reset(struct snd_m3 *chip)
if (!chip->irda_workaround)
dir |= 0x10; /* assuming pci bus master? */
- snd_m3_remote_codec_config(io, 0);
+ snd_m3_remote_codec_config(chip, 0);
outw(IO_SRAM_ENABLE, io + RING_BUS_CTRL_A);
udelay(20);
--
Ondrej Zary
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2015-11-01 17:50 +0100 |
| Message-ID | <qq3Zo-2li-13@gated-at.bofh.it> |
| In reply to | #1260158 |
On Sun, 01 Nov 2015 14:32:03 +0100,
Ondrej Zary wrote:
>
> Enable I2S docking for Dell Latitude C810.
> This allows the audio output on C/Port II to work (and probably also
> the audio inputs on C/Dock II).
>
> The volume can't be adjusted - none of the mixer controls currently
> supported affects the I2S output (they belong to the STAC9721/23 AC'97
> codec responsible for the laptop internal connectors & speakers).
>
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Applied, thanks.
Takashi
> ---
> sound/pci/maestro3.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
> index 72e89ce..965d5c6 100644
> --- a/sound/pci/maestro3.c
> +++ b/sound/pci/maestro3.c
> @@ -1932,12 +1932,19 @@ snd_m3_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
> }
>
>
> -static void snd_m3_remote_codec_config(int io, int isremote)
> +static void snd_m3_remote_codec_config(struct snd_m3 *chip, int isremote)
> {
> + int io = chip->iobase;
> + u16 tmp;
> +
> isremote = isremote ? 1 : 0;
>
> - outw((inw(io + RING_BUS_CTRL_B) & ~SECOND_CODEC_ID_MASK) | isremote,
> - io + RING_BUS_CTRL_B);
> + tmp = inw(io + RING_BUS_CTRL_B) & ~SECOND_CODEC_ID_MASK;
> + /* enable dock on Dell Latitude C810 */
> + if (chip->pci->subsystem_vendor == 0x1028 &&
> + chip->pci->subsystem_device == 0x00e5)
> + tmp |= M3I_DOCK_ENABLE;
> + outw(tmp | isremote, io + RING_BUS_CTRL_B);
> outw((inw(io + SDO_OUT_DEST_CTRL) & ~COMMAND_ADDR_OUT) | isremote,
> io + SDO_OUT_DEST_CTRL);
> outw((inw(io + SDO_IN_DEST_CTRL) & ~STATUS_ADDR_IN) | isremote,
> @@ -1989,7 +1996,7 @@ static void snd_m3_ac97_reset(struct snd_m3 *chip)
> if (!chip->irda_workaround)
> dir |= 0x10; /* assuming pci bus master? */
>
> - snd_m3_remote_codec_config(io, 0);
> + snd_m3_remote_codec_config(chip, 0);
>
> outw(IO_SRAM_ENABLE, io + RING_BUS_CTRL_A);
> udelay(20);
> --
> Ondrej Zary
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web