public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Hans de Goede <hdegoede@redhat.com>
Cc: Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org, linux-usb@vger.kernel.org,
	LMML <linux-media@vger.kernel.org>
Subject: Re: [alsa-devel] Fw: Isochronous transfer error on USB3
Date: Thu, 09 Jan 2014 09:17:13 +0100	[thread overview]
Message-ID: <52CE5B09.6070203@ladisch.de> (raw)
In-Reply-To: <20140108164800.70ea4169@samsung.com>

Mauro Carvalho Chehab wrote:
> I'm getting an weird behavior with em28xx, especially when the device
> is connected into an audio port.
>
> 	http://git.linuxtv.org/mchehab/experimental.git/blob/refs/heads/em28xx-v4l2-v6:/drivers/media/usb/em28xx/em28xx-audio.c
>
> What happens is that, when I require xawtv3 to use any latency lower
> than 65 ms, the audio doesn't work, as it gets lots of underruns per
> second.

The driver uses five URBs with 64 frames each, so of course it
will not be able to properly handle periods smaller than that.

> FYI, em28xx works at a 48000 KHz sampling rate, and its PM capture Hw
> is described as:
>
> static struct snd_pcm_hardware snd_em28xx_hw_capture = {
> 	.info = SNDRV_PCM_INFO_BLOCK_TRANSFER |
> 		SNDRV_PCM_INFO_MMAP           |
> 		SNDRV_PCM_INFO_INTERLEAVED    |
> 		SNDRV_PCM_INFO_BATCH	      |
> 		SNDRV_PCM_INFO_MMAP_VALID,
>
> 	.formats = SNDRV_PCM_FMTBIT_S16_LE,
>
> 	.rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_KNOT,

This should be just SNDRV_PCM_RATE_48000.

> 	.period_bytes_min = 64,		/* 12544/2, */

This is wrong (if the driver doesn't install other constraints on the
period length, like the USB audio class driver does).


Regards,
Clemens

  parent reply	other threads:[~2014-01-09  8:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08 18:48 Fw: Isochronous transfer error on USB3 Mauro Carvalho Chehab
2014-01-08 20:14 ` Alan Stern
2014-01-09  8:17 ` Clemens Ladisch [this message]
2014-01-09 11:29   ` [alsa-devel] " Mauro Carvalho Chehab
2014-01-09 11:31     ` Mauro Carvalho Chehab
2014-01-09 12:10     ` Clemens Ladisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52CE5B09.6070203@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox