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

Commit e7990d45 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "Here is a bunch of small fixes that have been collected since the
  previous pull request.  In addition to various misc fixes, the
  following are included:

   - HD-audio quirks for Dell, HP, Chromebook, and ALC28x codecs
   - HD-audio AMD HDMI regression fix
   - Continued PM support/fixes for ice1712 driver
   - Multiplatform fixes for ASoC samsung drivers
   - Addition of device id tables to a few ASoC drivers
   - Bit clock polarity config and error flag fixes in ASoC fsl_sai"

* tag 'sound-fix-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits)
  ALSA: usb-audio: Suppress repetitive debug messages from retire_playback_urb()
  ALSA: hda - Make full_reset boolean
  ALSA: hda - add headset mic detect quirk for a Dell laptop
  sound: dmasound: use module_platform_driver_probe()
  ALSA: au1x00: use module_platform_driver()
  ALSA: hda - Use runtime helper to check active state.
  ALSA: ice1712: Fix boundary checks in PCM pointer ops
  ASoC: davinci-mcasp: Fix bit clock polarity settings
  ASoC: samsung: Fix build on multiplatform
  ASoC: fsl_sai: Fix Bit Clock Polarity configurations
  ALSA: hda - Do not assign streams in reverse order
  ALSA: hda/realtek - Add eapd shutup to ALC283
  ALSA: hda/realtek - Change model name alias for ChromeOS
  ASoC: da732x: Print correct major id
  ALSA: hda/realtek - Improve HP depop when system change power state on Chromebook
  ASoC: cs42l52: Fix mask for REVID
  sound/oss: Remove uncompilable DBG macro use
  ALSA: ice1712: Save/restore routing and rate registers
  ALSA: ice1712: restore AK4xxx volumes on resume
  ASoC: alc56(23|32): fix undefined return value of probing code
  ...
parents 190a3998 a5065eb6
Loading
Loading
Loading
Loading
+12 −9
Original line number Original line Diff line number Diff line
@@ -20,15 +20,6 @@ Required properties:
                    have.
                    have.
- interrupt-parent: The phandle for the interrupt controller that
- interrupt-parent: The phandle for the interrupt controller that
                    services interrupts for this device.
                    services interrupts for this device.
- fsl,mode:         The operating mode for the SSI interface.
                    "i2s-slave" - I2S mode, SSI is clock slave
                    "i2s-master" - I2S mode, SSI is clock master
                    "lj-slave" - left-justified mode, SSI is clock slave
                    "lj-master" - l.j. mode, SSI is clock master
                    "rj-slave" - right-justified mode, SSI is clock slave
                    "rj-master" - r.j., SSI is clock master
                    "ac97-slave" - AC97 mode, SSI is clock slave
                    "ac97-master" - AC97 mode, SSI is clock master
- fsl,playback-dma: Phandle to a node for the DMA channel to use for
- fsl,playback-dma: Phandle to a node for the DMA channel to use for
                    playback of audio.  This is typically dictated by SOC
                    playback of audio.  This is typically dictated by SOC
                    design.  See the notes below.
                    design.  See the notes below.
@@ -47,6 +38,9 @@ Required properties:
                    be connected together, and SRFS and STFS be connected
                    be connected together, and SRFS and STFS be connected
                    together.  This would still allow different sample sizes,
                    together.  This would still allow different sample sizes,
                    but not different sample rates.
                    but not different sample rates.
 - clocks:          "ipg" - Required clock for the SSI unit
                    "baud" - Required clock for SSI master mode. Otherwise this
		      clock is not used


Required are also ac97 link bindings if ac97 is used. See
Required are also ac97 link bindings if ac97 is used. See
Documentation/devicetree/bindings/sound/soc-ac97link.txt for the necessary
Documentation/devicetree/bindings/sound/soc-ac97link.txt for the necessary
@@ -64,6 +58,15 @@ Optional properties:
		    Documentation/devicetree/bindings/dma/dma.txt.
		    Documentation/devicetree/bindings/dma/dma.txt.
- dma-names:	    Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
- dma-names:	    Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
		    is not defined.
		    is not defined.
- fsl,mode:         The operating mode for the SSI interface.
                    "i2s-slave" - I2S mode, SSI is clock slave
                    "i2s-master" - I2S mode, SSI is clock master
                    "lj-slave" - left-justified mode, SSI is clock slave
                    "lj-master" - l.j. mode, SSI is clock master
                    "rj-slave" - right-justified mode, SSI is clock slave
                    "rj-master" - r.j., SSI is clock master
                    "ac97-slave" - AC97 mode, SSI is clock slave
                    "ac97-master" - AC97 mode, SSI is clock master


Child 'codec' node required properties:
Child 'codec' node required properties:
- compatible:       Compatible list, contains the name of the codec
- compatible:       Compatible list, contains the name of the codec
+1 −0
Original line number Original line Diff line number Diff line
@@ -188,6 +188,7 @@


struct snd_pcm_substream;
struct snd_pcm_substream;


int snd_cs8427_init(struct snd_i2c_bus *bus, struct snd_i2c_device *device);
int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr,
int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr,
		      unsigned int reset_timeout, struct snd_i2c_device **r_cs8427);
		      unsigned int reset_timeout, struct snd_i2c_device **r_cs8427);
int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg,
int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg,
+38 −19
Original line number Original line Diff line number Diff line
@@ -150,10 +150,8 @@ static void snd_cs8427_free(struct snd_i2c_device *device)
	kfree(device->private_data);
	kfree(device->private_data);
}
}


int snd_cs8427_create(struct snd_i2c_bus *bus,
int snd_cs8427_init(struct snd_i2c_bus *bus,
		      unsigned char addr,
		    struct snd_i2c_device *device)
		      unsigned int reset_timeout,
		      struct snd_i2c_device **r_cs8427)
{
{
	static unsigned char initvals1[] = {
	static unsigned char initvals1[] = {
	  CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC,
	  CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC,
@@ -200,22 +198,10 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
	     Inhibit E->F transfers. */
	     Inhibit E->F transfers. */
	  CS8427_UD | CS8427_EFTUI | CS8427_DETUI,
	  CS8427_UD | CS8427_EFTUI | CS8427_DETUI,
	};
	};
	struct cs8427 *chip = device->private_data;
	int err;
	int err;
	struct cs8427 *chip;
	struct snd_i2c_device *device;
	unsigned char buf[24];
	unsigned char buf[24];


	if ((err = snd_i2c_device_create(bus, "CS8427",
					 CS8427_ADDR | (addr & 7),
					 &device)) < 0)
		return err;
	chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL);
	if (chip == NULL) {
	      	snd_i2c_device_free(device);
		return -ENOMEM;
	}
	device->private_free = snd_cs8427_free;
	
	snd_i2c_lock(bus);
	snd_i2c_lock(bus);
	err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER);
	err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER);
	if (err != CS8427_VER8427A) {
	if (err != CS8427_VER8427A) {
@@ -264,10 +250,44 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
	snd_i2c_unlock(bus);
	snd_i2c_unlock(bus);


	/* turn on run bit and rock'n'roll */
	/* turn on run bit and rock'n'roll */
	snd_cs8427_reset(device);

	return 0;

__fail:
	snd_i2c_unlock(bus);

	return err;
}
EXPORT_SYMBOL(snd_cs8427_init);

int snd_cs8427_create(struct snd_i2c_bus *bus,
		      unsigned char addr,
		      unsigned int reset_timeout,
		      struct snd_i2c_device **r_cs8427)
{
	int err;
	struct cs8427 *chip;
	struct snd_i2c_device *device;

	err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7),
				    &device);
	if (err < 0)
		return err;
	chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL);
	if (chip == NULL) {
		snd_i2c_device_free(device);
		return -ENOMEM;
	}
	device->private_free = snd_cs8427_free;

	if (reset_timeout < 1)
	if (reset_timeout < 1)
		reset_timeout = 1;
		reset_timeout = 1;
	chip->reset_timeout = reset_timeout;
	chip->reset_timeout = reset_timeout;
	snd_cs8427_reset(device);

	err = snd_cs8427_init(bus, device);
	if (err)
		goto __fail;


#if 0	// it's nice for read tests
#if 0	// it's nice for read tests
	{
	{
@@ -286,7 +306,6 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
	return 0;
	return 0;


      __fail:
      __fail:
      	snd_i2c_unlock(bus);
      	snd_i2c_device_free(device);
      	snd_i2c_device_free(device);
      	return err < 0 ? err : -EIO;
      	return err < 0 ? err : -EIO;
}
}
+1 −12
Original line number Original line Diff line number Diff line
@@ -725,15 +725,4 @@ struct platform_driver au1000_ac97c_driver = {
	.remove		= au1000_ac97_remove,
	.remove		= au1000_ac97_remove,
};
};


static int __init au1000_ac97_load(void)
module_platform_driver(au1000_ac97c_driver);
{
	return platform_driver_register(&au1000_ac97c_driver);
}

static void __exit au1000_ac97_unload(void)
{
	platform_driver_unregister(&au1000_ac97c_driver);
}

module_init(au1000_ac97_load);
module_exit(au1000_ac97_unload);
+0 −4
Original line number Original line Diff line number Diff line
@@ -50,8 +50,6 @@
#include <linux/pnp.h>
#include <linux/pnp.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>


#define DEB(x)
#define DEB1(x)
#include "sound_config.h"
#include "sound_config.h"


#include "ad1848.h"
#include "ad1848.h"
@@ -1016,8 +1014,6 @@ static void ad1848_close(int dev)
	ad1848_info    *devc = (ad1848_info *) audio_devs[dev]->devc;
	ad1848_info    *devc = (ad1848_info *) audio_devs[dev]->devc;
	ad1848_port_info *portc = (ad1848_port_info *) audio_devs[dev]->portc;
	ad1848_port_info *portc = (ad1848_port_info *) audio_devs[dev]->portc;


	DEB(printk("ad1848_close(void)\n"));

	devc->intr_active = 0;
	devc->intr_active = 0;
	ad1848_halt(dev);
	ad1848_halt(dev);


Loading