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

Commit f187700c authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'for-3.1' of...

Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc
parents 56aa5339 f1442bc1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -534,6 +534,7 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers)
W:	http://wiki.analog.com/
S:	Supported
F:	sound/soc/codecs/adau*
F:	sound/soc/codecs/adav*
F:	sound/soc/codecs/ad1*
F:	sound/soc/codecs/ssm*

+8 −0
Original line number Diff line number Diff line
@@ -312,6 +312,10 @@ int snd_soc_default_readable_register(struct snd_soc_codec *codec,
				      unsigned int reg);
int snd_soc_default_writable_register(struct snd_soc_codec *codec,
				      unsigned int reg);
int snd_soc_platform_read(struct snd_soc_platform *platform,
					unsigned int reg);
int snd_soc_platform_write(struct snd_soc_platform *platform,
					unsigned int reg, unsigned int val);

/* Utility functions to get clock rates from various things */
int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
@@ -658,6 +662,10 @@ struct snd_soc_platform_driver {
	/* probe ordering - for components with runtime dependencies */
	int probe_order;
	int remove_order;

	/* platform IO - used for platform DAPM */
	unsigned int (*read)(struct snd_soc_platform *, unsigned int);
	int (*write)(struct snd_soc_platform *, unsigned int, unsigned int);
};

struct snd_soc_platform {
+13 −0
Original line number Diff line number Diff line
@@ -27,6 +27,19 @@ config SND_SOC_BFIN_EVAL_ADAU1701
	  board connected to one of the Blackfin evaluation boards like the
	  BF5XX-STAMP or BF5XX-EZKIT.

config SND_SOC_BFIN_EVAL_ADAV80X
	tristate "Support for the EVAL-ADAV80X boards on Blackfin eval boards"
	depends on SND_BF5XX_I2S && (SPI_MASTER || I2C)
	select SND_BF5XX_SOC_I2S
	select SND_SOC_ADAV80X
	help
	  Say Y if you want to add support for the Analog Devices EVAL-ADAV801 or
	  EVAL-ADAV803 board connected to one of the Blackfin evaluation boards
	  like the BF5XX-STAMP or BF5XX-EZKIT.

	  Note: This driver assumes that the ADAV80X digital record and playback
	  interfaces are connected to the first SPORT port on the BF5XX board.

config SND_BF5XX_SOC_AD73311
	tristate "SoC AD73311 Audio support for Blackfin"
	depends on SND_BF5XX_I2S
+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ snd-ssm2602-objs := bf5xx-ssm2602.o
snd-ad73311-objs := bf5xx-ad73311.o
snd-ad193x-objs := bf5xx-ad193x.o
snd-soc-bfin-eval-adau1701-objs := bfin-eval-adau1701.o
snd-soc-bfin-eval-adav80x-objs := bfin-eval-adav80x.o

obj-$(CONFIG_SND_BF5XX_SOC_AD1836) += snd-ad1836.o
obj-$(CONFIG_SND_BF5XX_SOC_AD1980) += snd-ad1980.o
@@ -29,3 +30,4 @@ obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o
obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o
obj-$(CONFIG_SND_BF5XX_SOC_AD193X) += snd-ad193x.o
obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) += snd-soc-bfin-eval-adau1701.o
obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) += snd-soc-bfin-eval-adav80x.o
+11 −2
Original line number Diff line number Diff line
@@ -138,11 +138,20 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream)
	pr_debug("%s enter\n", __func__);
	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
		diff = sport_curr_offset_tx(sport);
		frames = bytes_to_frames(substream->runtime, diff);
	} else {
		diff = sport_curr_offset_rx(sport);
		frames = bytes_to_frames(substream->runtime, diff);
	}

	/*
	 * TX at least can report one frame beyond the end of the
	 * buffer if we hit the wraparound case - clamp to within the
	 * buffer as the ALSA APIs require.
	 */
	if (diff == snd_pcm_lib_buffer_bytes(substream))
		diff = 0;

	frames = bytes_to_frames(substream->runtime, diff);

	return frames;
}

Loading