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

Commit 27762b2c authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'fix/misc' into topic/usb

parents 7b7b9042 29aac005
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ struct ak4113 {

int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read,
		ak4113_write_t *write,
		const unsigned char pgm[AK4113_WRITABLE_REGS],
		const unsigned char *pgm,
		void *private_data, struct ak4113 **r_ak4113);
void snd_ak4113_reg_write(struct ak4113 *ak4113, unsigned char reg,
		unsigned char mask, unsigned char val);
+4 −2
Original line number Diff line number Diff line
@@ -148,6 +148,9 @@ static void pcm_debug_name(struct snd_pcm_substream *substream,

#define xrun_debug(substream, mask) \
			((substream)->pstr->xrun_debug & (mask))
#else
#define xrun_debug(substream, mask)	0
#endif

#define dump_stack_on_xrun(substream) do {			\
		if (xrun_debug(substream, XRUN_DEBUG_STACK))	\
@@ -169,6 +172,7 @@ static void xrun(struct snd_pcm_substream *substream)
	}
}

#ifdef CONFIG_SND_PCM_XRUN_DEBUG
#define hw_ptr_error(substream, fmt, args...)				\
	do {								\
		if (xrun_debug(substream, XRUN_DEBUG_BASIC)) {		\
@@ -255,8 +259,6 @@ static void xrun_log_show(struct snd_pcm_substream *substream)

#else /* ! CONFIG_SND_PCM_XRUN_DEBUG */

#define xrun_debug(substream, mask)	0
#define xrun(substream)			do { } while (0)
#define hw_ptr_error(substream, fmt, args...) do { } while (0)
#define xrun_log(substream, pos)	do { } while (0)
#define xrun_log_show(substream)	do { } while (0)
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ static int snd_ak4113_dev_free(struct snd_device *device)
}

int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read,
		ak4113_write_t *write, const unsigned char pgm[5],
		ak4113_write_t *write, const unsigned char *pgm,
		void *private_data, struct ak4113 **r_ak4113)
{
	struct ak4113 *chip;
+2 −0
Original line number Diff line number Diff line
@@ -1852,12 +1852,14 @@ static unsigned int ad1981_jacks_blacklist[] = {
	0x10140523, /* Thinkpad R40 */
	0x10140534, /* Thinkpad X31 */
	0x10140537, /* Thinkpad T41p */
	0x1014053e, /* Thinkpad R40e */
	0x10140554, /* Thinkpad T42p/R50p */
	0x10140567, /* Thinkpad T43p 2668-G7U */
	0x10140581, /* Thinkpad X41-2527 */
	0x10280160, /* Dell Dimension 2400 */
	0x104380b0, /* Asus A7V8X-MX */
	0x11790241, /* Toshiba Satellite A-15 S127 */
	0x1179ff10, /* Toshiba P500 */
	0x144dc01a, /* Samsung NP-X20C004/SEG */
	0 /* end */
};
+11 −3
Original line number Diff line number Diff line
@@ -941,13 +941,21 @@ static snd_pcm_uframes_t snd_cmipci_pcm_pointer(struct cmipci *cm, struct cmipci
						struct snd_pcm_substream *substream)
{
	size_t ptr;
	unsigned int reg;
	unsigned int reg, rem, tries;

	if (!rec->running)
		return 0;
#if 1 // this seems better..
	reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2;
	ptr = rec->dma_size - (snd_cmipci_read_w(cm, reg) + 1);
	ptr >>= rec->shift;
	for (tries = 0; tries < 3; tries++) {
		rem = snd_cmipci_read_w(cm, reg);
		if (rem < rec->dma_size)
			goto ok;
	} 
	printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem);
	return SNDRV_PCM_POS_XRUN;
ok:
	ptr = (rec->dma_size - (rem + 1)) >> rec->shift;
#else
	reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1;
	ptr = snd_cmipci_read(cm, reg) - rec->offset;
Loading