wm8731.c (b9f12a5d97f652c77ef6803dccd0d40d1290f5be) | wm8731.c (dfb6778e64c6aef0a763f42b93487ea578670008) |
---|---|
1/* 2 * wm8731.c -- WM8731 ALSA SoC Audio driver 3 * 4 * Copyright 2005 Openedhand Ltd. 5 * Copyright 2006-12 Wolfson Microelectronics, plc 6 * 7 * Author: Richard Purdie <richard@openedhand.com> 8 * --- 334 unchanged lines hidden (view full) --- 343 u16 srate = (coeff_div[i].sr << 2) | 344 (coeff_div[i].bosr << 1) | coeff_div[i].usb; 345 346 wm8731->playback_fs = params_rate(params); 347 348 snd_soc_write(codec, WM8731_SRATE, srate); 349 350 /* bit size */ | 1/* 2 * wm8731.c -- WM8731 ALSA SoC Audio driver 3 * 4 * Copyright 2005 Openedhand Ltd. 5 * Copyright 2006-12 Wolfson Microelectronics, plc 6 * 7 * Author: Richard Purdie <richard@openedhand.com> 8 * --- 334 unchanged lines hidden (view full) --- 343 u16 srate = (coeff_div[i].sr << 2) | 344 (coeff_div[i].bosr << 1) | coeff_div[i].usb; 345 346 wm8731->playback_fs = params_rate(params); 347 348 snd_soc_write(codec, WM8731_SRATE, srate); 349 350 /* bit size */ |
351 switch (params_format(params)) { 352 case SNDRV_PCM_FORMAT_S16_LE: | 351 switch (params_width(params)) { 352 case 16: |
353 break; | 353 break; |
354 case SNDRV_PCM_FORMAT_S20_3LE: | 354 case 20: |
355 iface |= 0x0004; 356 break; | 355 iface |= 0x0004; 356 break; |
357 case SNDRV_PCM_FORMAT_S24_LE: | 357 case 24: |
358 iface |= 0x0008; 359 break; 360 } 361 362 wm8731_set_deemph(codec); 363 364 snd_soc_write(codec, WM8731_IFACE, iface); 365 return 0; --- 450 unchanged lines hidden --- | 358 iface |= 0x0008; 359 break; 360 } 361 362 wm8731_set_deemph(codec); 363 364 snd_soc_write(codec, WM8731_IFACE, iface); 365 return 0; --- 450 unchanged lines hidden --- |