Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7425b16 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa

* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: (148 commits)
  [ALSA] intel8x0m - Free irq in suspend
  [ALSA] Move CONFIG_SND_AC97_POWER_SAVE to pci/Kconfig
  [ALSA] usb-audio: add mixer control names for the Aureon 5.1 MkII
  [ALSA] ES1938: remove duplicate field initialization
  [ALSA] usb-audio: increase number of packets per URB
  [ALSA] hda-codec - Fix headphone auto-toggle on sigmatel codec
  [ALSA] hda-intel - A slight cleanup of timeout check in azx_get_response()
  [ALSA] hda-codec - Fix mic input with STAC92xx codecs
  [ALSA] mixart: Use SEEK_{SET,CUR,END} instead of hardcoded values
  [ALSA] gus: Use SEEK_{SET,CUR,END} instead of hardcoded values
  [ALSA] opl4: Use SEEK_{SET,CUR,END} instead of hardcoded values
  [ALSA] sound core: Use SEEK_{SET,CUR,END} instead of hardcoded values
  [ALSA] hda-codec - Support multiple headphone pins
  [ALSA] hda_intel prefer 24bit instead of 20bit
  [ALSA] hda-codec - Add vendor ids for Motorola and Conexant
  [ALSA] hda-codec - Add device id for Motorola si3054-compatible codec
  [ALSA] Add missing compat ioctls for ALSA control API
  [ALSA] powermac - Fix Oops when conflicting with aoa driver
  [ALSA] aoa: add locking to tas codec
  [ALSA] hda-intel - Fix suspend/resume with MSI
  ...
parents 9f261e01 f0063c44
Loading
Loading
Loading
Loading
+39 −5
Original line number Diff line number Diff line
@@ -758,6 +758,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
    position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
    single_cmd  - Use single immediate commands to communicate with
		codecs (for debugging only)
    disable_msi - Disable Message Signaled Interrupt (MSI)

    This module supports one card and autoprobe.

@@ -778,11 +779,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
	  6stack-digout	6-jack with a SPDIF out
	  w810		3-jack
	  z71v		3-jack (HP shared SPDIF)
	  asus		3-jack
	  asus		3-jack (ASUS Mobo)
	  asus-w1v	ASUS W1V
	  asus-dig	ASUS with SPDIF out
	  asus-dig2	ASUS with SPDIF out (using GPIO2)
	  uniwill	3-jack
	  F1734		2-jack
	  lg		LG laptop (m1 express dual)
	  lg-lw		LG LW20 laptop
	  lg-lw		LG LW20/LW25 laptop
	  tcl		TCL S700
	  clevo		Clevo laptops (m520G, m665n)
	  test		for testing/debugging purpose, almost all controls can be
			adjusted.  Appearing only when compiled with
			$CONFIG_SND_DEBUG=y
@@ -790,6 +796,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

	ALC260
	  hp		HP machines
	  hp-3013	HP machines (3013-variant)
	  fujitsu	Fujitsu S7020
	  acer		Acer TravelMate
	  basic		fixed pin assignment (old default model)
@@ -797,24 +804,32 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

	ALC262
	  fujitsu	Fujitsu Laptop
	  hp-bpc	HP xw4400/6400/8400/9400 laptops
	  benq		Benq ED8
	  basic		fixed pin assignment w/o SPDIF
	  auto		auto-config reading BIOS (default)

	ALC882/885
	  3stack-dig	3-jack with SPDIF I/O
	  6stck-dig	6-jack digital with SPDIF I/O
	  arima		Arima W820Di1
	  auto		auto-config reading BIOS (default)

	ALC883/888
	  3stack-dig	3-jack with SPDIF I/O
	  6stack-dig	6-jack digital with SPDIF I/O
	  6stack-dig-demo  6-stack digital for Intel demo board
	  3stack-6ch    3-jack 6-channel
	  3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
	  6stack-dig-demo  6-jack digital for Intel demo board
	  acer		Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
	  auto		auto-config reading BIOS (default)

	ALC861/660
	  3stack	3-jack
	  3stack-dig	3-jack with SPDIF I/O
	  6stack-dig	6-jack with SPDIF I/O
	  3stack-660	3-jack (for ALC660)
	  uniwill-m31	Uniwill M31 laptop
	  auto		auto-config reading BIOS (default)

	CMI9880
@@ -843,10 +858,21 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
	  3stack-dig	ditto with SPDIF
	  laptop	3-jack with hp-jack automute
	  laptop-dig	ditto with SPDIF
	  auto		auto-confgi reading BIOS (default)
	  auto		auto-config reading BIOS (default)

	STAC9200/9205/9220/9221/9254
	  ref		Reference board
	  3stack	D945 3stack
	  5stack	D945 5stack + SPDIF

	STAC7661(?)
	STAC9227/9228/9229/927x
	  ref		Reference board
	  3stack	D965 3stack
	  5stack	D965 5stack + SPDIF

	STAC9872
	  vaio		Setup for VAIO FE550G/SZ110
	  vaio-ar Setup for VAIO AR

    If the default configuration doesn't work and one of the above
    matches with your device, report it together with the PCI
@@ -1213,6 +1239,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
    
    Module supports only 1 card.  This module has no enable option.

  Module snd-mts64
  ----------------

    Module for Ego Systems (ESI) Miditerminal 4140

    This module supports multiple devices.
    Requires parport (CONFIG_PARPORT).

  Module snd-nm256
  ----------------

+2 −3
Original line number Diff line number Diff line
@@ -1054,9 +1054,8 @@

      <para>
      For a device which allows hotplugging, you can use
      <function>snd_card_free_in_thread</function>.  This one will
      postpone the destruction and wait in a kernel-thread until all
      devices are closed.
      <function>snd_card_free_when_closed</function>.  This one will
      postpone the destruction until all devices are closed.
      </para>

    </section>
+32 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@

#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/workqueue.h>
#include "pcm.h"
#include "control.h"
#include "info.h"
@@ -140,6 +141,20 @@
#define AC97_GP_DRSS_1011	0x0000	/* LR(C) 10+11(+12) */
#define AC97_GP_DRSS_78		0x0400	/* LR 7+8 */

/* powerdown bits */
#define AC97_PD_ADC_STATUS	0x0001	/* ADC status (RO) */
#define AC97_PD_DAC_STATUS	0x0002	/* DAC status (RO) */
#define AC97_PD_MIXER_STATUS	0x0004	/* Analog mixer status (RO) */
#define AC97_PD_VREF_STATUS	0x0008	/* Vref status (RO) */
#define AC97_PD_PR0		0x0100	/* Power down PCM ADCs and input MUX */
#define AC97_PD_PR1		0x0200	/* Power down PCM front DAC */
#define AC97_PD_PR2		0x0400	/* Power down Mixer (Vref still on) */
#define AC97_PD_PR3		0x0800	/* Power down Mixer (Vref off) */
#define AC97_PD_PR4		0x1000	/* Power down AC-Link */
#define AC97_PD_PR5		0x2000	/* Disable internal clock usage */
#define AC97_PD_PR6		0x4000	/* Headphone amplifier */
#define AC97_PD_EAPD		0x8000	/* External Amplifer Power Down (EAPD) */

/* extended audio ID bit defines */
#define AC97_EI_VRA		0x0001	/* Variable bit rate supported */
#define AC97_EI_DRA		0x0002	/* Double rate supported */
@@ -359,6 +374,7 @@
#define AC97_SCAP_INV_EAPD	(1<<7)	/* inverted EAPD */
#define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */
#define AC97_SCAP_NO_SPDIF	(1<<9)	/* don't build SPDIF controls */
#define AC97_SCAP_EAPD_LED	(1<<10)	/* EAPD as mute LED */

/* ac97->flags */
#define AC97_HAS_PC_BEEP	(1<<0)	/* force PC Speaker usage */
@@ -491,6 +507,12 @@ struct snd_ac97 {
	/* jack-sharing info */
	unsigned char indep_surround;
	unsigned char channel_mode;

#ifdef CONFIG_SND_AC97_POWER_SAVE
	unsigned int power_up;	/* power states */
	struct workqueue_struct *power_workq;
	struct work_struct power_work;
#endif
	struct device dev;
};

@@ -532,6 +554,15 @@ unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value);
int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value);
int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value);
#ifdef CONFIG_SND_AC97_POWER_SAVE
int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup);
#else
static inline int snd_ac97_update_power(struct snd_ac97 *ac97, int reg,
					int powerup)
{
	return 0;
}
#endif
#ifdef CONFIG_PM
void snd_ac97_suspend(struct snd_ac97 *ac97);
void snd_ac97_resume(struct snd_ac97 *ac97);
@@ -583,6 +614,7 @@ struct ac97_pcm {
		     copy_flag: 1,	   /* lowlevel driver must fill all entries */
		     spdif: 1;		   /* spdif pcm */
	unsigned short aslots;		   /* active slots */
	unsigned short cur_dbl;		   /* current double-rate state */
	unsigned int rates;		   /* available rates */
	struct {
		unsigned short slots;	   /* driver input: requested AC97 slot numbers */
+16 −6
Original line number Diff line number Diff line
@@ -179,14 +179,13 @@ enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
#define AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) \
	((left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22))

int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int type, unsigned long value);

/* for ease of use */
struct ad1848_mix_elem {
	const char *name;
	int index;
	int type;
	unsigned long private_value;
	unsigned int *tlv;
};

#define AD1848_SINGLE(xname, xindex, reg, shift, mask, invert) \
@@ -195,15 +194,26 @@ struct ad1848_mix_elem {
  .type = AD1848_MIX_SINGLE, \
  .private_value = AD1848_MIXVAL_SINGLE(reg, shift, mask, invert) }

#define AD1848_SINGLE_TLV(xname, xindex, reg, shift, mask, invert, xtlv) \
{ .name = xname, \
  .index = xindex, \
  .type = AD1848_MIX_SINGLE, \
  .private_value = AD1848_MIXVAL_SINGLE(reg, shift, mask, invert), \
  .tlv = xtlv }

#define AD1848_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \
{ .name = xname, \
  .index = xindex, \
  .type = AD1848_MIX_DOUBLE, \
  .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) }

static inline int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip, const struct ad1848_mix_elem *c)
{
	return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value);
}
#define AD1848_DOUBLE_TLV(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert, xtlv) \
{ .name = xname, \
  .index = xindex, \
  .type = AD1848_MIX_DOUBLE, \
  .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert), \
  .tlv = xtlv }

int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip, const struct ad1848_mix_elem *c);

#endif /* __SOUND_AD1848_H */
+25 −12
Original line number Diff line number Diff line
@@ -39,26 +39,39 @@ struct snd_ak4xxx_ops {

#define AK4XXX_IMAGE_SIZE	(AK4XXX_MAX_CHIPS * 16)	/* 64 bytes */

/* DAC label and channels */
struct snd_akm4xxx_dac_channel {
	char *name;		/* mixer volume name */
	unsigned int num_channels;
};

/* ADC labels and channels */
struct snd_akm4xxx_adc_channel {
	char *name;		/* capture gain volume label */
	char *switch_name;	/* capture switch */
	unsigned int num_channels;
};

struct snd_akm4xxx {
	struct snd_card *card;
	unsigned int num_adcs;			/* AK4524 or AK4528 ADCs */
	unsigned int num_dacs;			/* AK4524 or AK4528 DACs */
	unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */
	unsigned char ipga_gain[AK4XXX_MAX_CHIPS][2]; /* saved register image
						       * for IPGA (AK4528)
						       */
	unsigned char volumes[AK4XXX_IMAGE_SIZE]; /* saved volume values */
	unsigned long private_value[AK4XXX_MAX_CHIPS];	/* helper for driver */
	void *private_data[AK4XXX_MAX_CHIPS];		/* helper for driver */
	/* template should fill the following fields */
	unsigned int idx_offset;		/* control index offset */
	enum {
		SND_AK4524, SND_AK4528, SND_AK4529,
		SND_AK4355, SND_AK4358, SND_AK4381
		SND_AK4355, SND_AK4358, SND_AK4381,
		SND_AK5365
	} type;
	unsigned int *num_stereo;	/* array of combined counts
					 * for the mixer
					 */
	char **channel_names;		/* array of mixer channel names */

	/* (array) information of combined codecs */
	struct snd_akm4xxx_dac_channel *dac_info;
	struct snd_akm4xxx_adc_channel *adc_info;

	struct snd_ak4xxx_ops ops;
};

@@ -72,9 +85,9 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak);
	(ak)->images[(chip) * 16 + (reg)]
#define snd_akm4xxx_set(ak,chip,reg,val) \
	((ak)->images[(chip) * 16 + (reg)] = (val))
#define snd_akm4xxx_get_ipga(ak,chip,reg) \
	(ak)->ipga_gain[chip][(reg)-4]
#define snd_akm4xxx_set_ipga(ak,chip,reg,val) \
	((ak)->ipga_gain[chip][(reg)-4] = (val))
#define snd_akm4xxx_get_vol(ak,chip,reg) \
	(ak)->volumes[(chip) * 16 + (reg)]
#define snd_akm4xxx_set_vol(ak,chip,reg,val) \
	((ak)->volumes[(chip) * 16 + (reg)] = (val))

#endif /* __SOUND_AK4XXX_ADDA_H */
Loading