diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2015-11-01 08:32:03 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-11-01 11:40:49 -0500 |
commit | 030270ba1aa2072d2967c11129c67d9de9aa762b (patch) | |
tree | 60abeb41e64c62775cb3232e75fdea0591a18b61 /sound | |
parent | d1482fb335b8f3f5e667df72b043c5b3d9d03106 (diff) |
ALSA: maestro3: Enable docking support for Dell Latitude C810
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/maestro3.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 72e89cedc52d..965d5c6f2fa0 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) | |||
1932 | } | 1932 | } |
1933 | 1933 | ||
1934 | 1934 | ||
1935 | static void snd_m3_remote_codec_config(int io, int isremote) | 1935 | static void snd_m3_remote_codec_config(struct snd_m3 *chip, int isremote) |
1936 | { | 1936 | { |
1937 | int io = chip->iobase; | ||
1938 | u16 tmp; | ||
1939 | |||
1937 | isremote = isremote ? 1 : 0; | 1940 | isremote = isremote ? 1 : 0; |
1938 | 1941 | ||
1939 | outw((inw(io + RING_BUS_CTRL_B) & ~SECOND_CODEC_ID_MASK) | isremote, | 1942 | tmp = inw(io + RING_BUS_CTRL_B) & ~SECOND_CODEC_ID_MASK; |
1940 | io + RING_BUS_CTRL_B); | 1943 | /* enable dock on Dell Latitude C810 */ |
1944 | if (chip->pci->subsystem_vendor == 0x1028 && | ||
1945 | chip->pci->subsystem_device == 0x00e5) | ||
1946 | tmp |= M3I_DOCK_ENABLE; | ||
1947 | outw(tmp | isremote, io + RING_BUS_CTRL_B); | ||
1941 | outw((inw(io + SDO_OUT_DEST_CTRL) & ~COMMAND_ADDR_OUT) | isremote, | 1948 | outw((inw(io + SDO_OUT_DEST_CTRL) & ~COMMAND_ADDR_OUT) | isremote, |
1942 | io + SDO_OUT_DEST_CTRL); | 1949 | io + SDO_OUT_DEST_CTRL); |
1943 | outw((inw(io + SDO_IN_DEST_CTRL) & ~STATUS_ADDR_IN) | isremote, | 1950 | 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) | |||
1989 | if (!chip->irda_workaround) | 1996 | if (!chip->irda_workaround) |
1990 | dir |= 0x10; /* assuming pci bus master? */ | 1997 | dir |= 0x10; /* assuming pci bus master? */ |
1991 | 1998 | ||
1992 | snd_m3_remote_codec_config(io, 0); | 1999 | snd_m3_remote_codec_config(chip, 0); |
1993 | 2000 | ||
1994 | outw(IO_SRAM_ENABLE, io + RING_BUS_CTRL_A); | 2001 | outw(IO_SRAM_ENABLE, io + RING_BUS_CTRL_A); |
1995 | udelay(20); | 2002 | udelay(20); |