Re: USB audio device - Error: parse_audio_format_rates_v2(): unable to retrieve number of sample rates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/14/2012 10:18 PM, jem_7@xxxxxx wrote:
> Want to give a short feedback for other user waiting for a solution.
> 
> Thanks to Daniel the problem is solved now by the following patch:

Yes, but Joachim wanted to contact the vendor and ask for a firmware
upgrade to fix this on the device side. Only if they refuse to provide a
fix for that, we can merge this hack.


Thanks,
Daniel

> 
> diff --git a/sound/usb/clock.c b/sound/usb/clock.c
> index 379baad..b05111d 100644
> --- a/sound/usb/clock.c
> +++ b/sound/usb/clock.c
> @@ -255,6 +255,13 @@ static int set_sample_rate_v2(struct snd_usb_audio
> *chip, int iface,
>      int err, crate;
>      int clock = snd_usb_clock_find_source(chip, fmt->clock);
>  +    /*
> +     * Fractal Audio Systems AXE-FX II does not respond to sample rate
> +     * set requests. The only valid rate is 48000.
> +     */
> +    if (chip->usb_id == USB_ID(0x2466, 0x8003) && rate == 48000)
> +        return 0;
> +
>      if (clock < 0)
>          return clock;
>  diff --git a/sound/usb/format.c b/sound/usb/format.c
> index ddfef57..7a9e82a 100644
> --- a/sound/usb/format.c
> +++ b/sound/usb/format.c
> @@ -279,6 +279,20 @@ static int parse_audio_format_rates_v2(struct
> snd_usb_audio *chip,
>      int nr_triplets, data_size, ret = 0;
>      int clock = snd_usb_clock_find_source(chip, fp->clock);
>  +    /*
> +     * Fractal Audio Systems AXE-FX II does not respond to sample rate
> +     * query requests. The only valid rate is 48000.
> +     */
> +    if (chip->usb_id == USB_ID(0x2466, 0x8003)) {
> +        fp->nr_rates = 1;
> +        fp->rate_min = 48000;
> +        fp->rate_max = 48000;
> +        fp->rates = SNDRV_PCM_RATE_48000;
> +        fp->rate_table = kmalloc(sizeof(int), GFP_KERNEL);
> +        fp->rate_table[0] = 48000;
> +        return 0;
> +    }
> +
>      if (clock < 0) {
>          snd_printk(KERN_ERR "%s(): unable to find clock source (clock
> %d)\n",
>                  __func__, clock);
> 
> In addition to the previously posted patch it was necessary to modify
> clock.c also, because the Axe-FX II currently neither responds to get
> sample rate requests nor set sample rate requests.
> 
> Many thanks again to Daniel.
> 
> Best regards
> 
> Joachim
> 
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Alsa-user mailing list
> Alsa-user@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/alsa-user


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux