Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HiFiBerry Amp driver missing in 4.9 #1775

Closed
ghost opened this issue Jan 2, 2017 · 11 comments
Closed

HiFiBerry Amp driver missing in 4.9 #1775

ghost opened this issue Jan 2, 2017 · 11 comments

Comments

@ghost
Copy link

ghost commented Jan 2, 2017

It seems that the HiFiBerry Amp driver sound/soc_bcm/hifiberry_amp got lost in the 4.9 tree. It is still included in 4.8.
Can you merge the module to 4.9?

@popcornmix
Copy link
Collaborator

It is currently reverted due to upstream API changes stopping it building.
Ping @hifiberry, @HiassofT for suggestions on a fix to get this enabled again.

Error:

sound/soc/codecs/tas5713.c:235:2: error: unknown field 'controls' specified in initializer
  .controls = tas5713_snd_controls,
  ^
sound/soc/codecs/tas5713.c:235:2: warning: initialization from incompatible pointer type
sound/soc/codecs/tas5713.c:235:2: warning: (near initialization for 'soc_codec_dev_tas5713.suspend')
sound/soc/codecs/tas5713.c:236:2: error: unknown field 'num_controls' specified in initializer
  .num_controls = ARRAY_SIZE(tas5713_snd_controls),
  ^
sound/soc/codecs/tas5713.c:236:101: warning: initialization makes pointer from integer without a cast
  .num_controls = ARRAY_SIZE(tas5713_snd_controls),
                                                                                                     ^
sound/soc/codecs/tas5713.c:236:101: warning: (near initialization for 'soc_codec_dev_tas5713.resume')
scripts/Makefile.build:293: recipe for target 'sound/soc/codecs/tas5713.o' failed

presumably due to this: https://patchwork.kernel.org/patch/9269067/

@HiassofT
Copy link
Contributor

HiassofT commented Jan 2, 2017

With the ASoC component refactoring the .control etc fields were moved from snd_soc_codec_driver to snd_soc_component_driver. The codec driver needs to be changed (put .controls etc inside the .component_driver struct), like eg this one: d25f113

@hifiberry could you do a functional test with this change?

@HiassofT
Copy link
Contributor

HiassofT commented Jan 2, 2017

With this patch tas5713 compiles again, but I can't test myself as I don't have such a card

--- a/sound/soc/codecs/tas5713.c
+++ b/sound/soc/codecs/tas5713.c
@@ -232,8 +232,10 @@ static int tas5713_probe(struct snd_soc_codec *codec)
 static struct snd_soc_codec_driver soc_codec_dev_tas5713 = {
        .probe = tas5713_probe,
        .remove = tas5713_remove,
-       .controls = tas5713_snd_controls,
-       .num_controls = ARRAY_SIZE(tas5713_snd_controls),
+       .component_driver = {
+               .controls = tas5713_snd_controls,
+               .num_controls = ARRAY_SIZE(tas5713_snd_controls),
+       },
 };

@popcornmix
Copy link
Collaborator

@usul27 are you able to test @HiassofT's suggested patch?
You should drop 57d1640
If you confirm it works I can add it to tree.

@hifiberry
Copy link

I will look into this in the next days.

@hifiberry
Copy link

Tried the first time to compile the kernel directly on the Raspberry Pi ;-) After some hours (had to compile it multiple times), I can confirm now that the patch from @HiassofT works.

@popcornmix Can you please integrate this into the 4.9 tree ?

pelwell pushed a commit that referenced this issue Jan 9, 2017
@pelwell
Copy link
Contributor

pelwell commented Jan 9, 2017

Done.

@ckarrie
Copy link

ckarrie commented Jan 9, 2017

Awesome, thank you!

@popcornmix
Copy link
Collaborator

Fix is already in 4.10 tree.
@usul27 okay to close?

@ghost
Copy link
Author

ghost commented Jan 9, 2017

Yes, please close this. Thanks to everyone who worked on this.

@cjbrigato
Copy link

cjbrigato commented Jan 9, 2017 via email

popcornmix pushed a commit that referenced this issue Feb 20, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: #1775
ED6E0F17 pushed a commit to ED6E0F17/linux that referenced this issue Feb 24, 2017
HiassofT pushed a commit to HiassofT/rpi-linux that referenced this issue Feb 24, 2017
Noltari pushed a commit to Noltari/linux that referenced this issue Mar 8, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: raspberrypi/linux#1775
ED6E0F17 pushed a commit to ED6E0F17/linux that referenced this issue Mar 12, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: raspberrypi#1775
popcornmix pushed a commit that referenced this issue Apr 2, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: #1775
popcornmix pushed a commit that referenced this issue Apr 24, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: #1775
popcornmix pushed a commit that referenced this issue May 24, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: #1775
popcornmix pushed a commit that referenced this issue Jul 12, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: #1775
popcornmix pushed a commit that referenced this issue Aug 10, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: #1775
popcornmix pushed a commit that referenced this issue Aug 13, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: #1775
popcornmix pushed a commit that referenced this issue Oct 29, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: #1775
raspbian-autopush pushed a commit to raspbian-packages/linux-4.9 that referenced this issue Nov 2, 2017
commit 6557bba
Author: Daniel Matuschek <info@crazy-audio.com>
Date:   Mon Aug 4 11:09:58 2014 +0200

    Added driver for HiFiBerry Amp amplifier add-on board
    
    The driver contains a low-level hardware driver for the TAS5713 and the
    drivers for the Raspberry Pi I2S subsystem.
    
    TAS5713: return error if initialisation fails
    
    Existing TAS5713 driver logs errors during initialisation, but does not return
    an error code. Therefore even if initialisation fails, the driver will still be
    loaded, but won't work. This patch fixes this. I2C communication error will now
    reported correctly by a non-zero return code.
    
    HiFiBerry Amp: fix device-tree problems
    
    Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.
    
    hifiberry-amp: Adjust for ALSA object refactoring
    
    See: raspberrypi/linux#1775


Gbp-Pq: Topic rpi
Gbp-Pq: Name rpi_1071_6557bbad6011db37a1a30fa4ef53bff5df055e36.patch
ryncsn pushed a commit to ryncsn/linux-rasp that referenced this issue Nov 21, 2017
The driver contains a low-level hardware driver for the TAS5713 and the
drivers for the Raspberry Pi I2S subsystem.

TAS5713: return error if initialisation fails

Existing TAS5713 driver logs errors during initialisation, but does not return
an error code. Therefore even if initialisation fails, the driver will still be
loaded, but won't work. This patch fixes this. I2C communication error will now
reported correctly by a non-zero return code.

HiFiBerry Amp: fix device-tree problems

Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.

hifiberry-amp: Adjust for ALSA object refactoring

See: raspberrypi#1775
raspbian-autopush pushed a commit to raspbian-packages/linux-4.9 that referenced this issue Apr 7, 2018
commit 53077bb
Author: Daniel Matuschek <info@crazy-audio.com>
Date:   Mon Aug 4 11:09:58 2014 +0200

    Added driver for HiFiBerry Amp amplifier add-on board
    
    The driver contains a low-level hardware driver for the TAS5713 and the
    drivers for the Raspberry Pi I2S subsystem.
    
    TAS5713: return error if initialisation fails
    
    Existing TAS5713 driver logs errors during initialisation, but does not return
    an error code. Therefore even if initialisation fails, the driver will still be
    loaded, but won't work. This patch fixes this. I2C communication error will now
    reported correctly by a non-zero return code.
    
    HiFiBerry Amp: fix device-tree problems
    
    Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.
    
    hifiberry-amp: Adjust for ALSA object refactoring
    
    See: raspberrypi/linux#1775


Gbp-Pq: Topic rpi
Gbp-Pq: Name rpi_1071_53077bb6c5f524bbffb6b8e7a61cdf1eb2049785.patch
raspbian-autopush pushed a commit to raspbian-packages/linux-4.9 that referenced this issue Nov 11, 2018
commit 53077bb
Author: Daniel Matuschek <info@crazy-audio.com>
Date:   Mon Aug 4 11:09:58 2014 +0200

    Added driver for HiFiBerry Amp amplifier add-on board
    
    The driver contains a low-level hardware driver for the TAS5713 and the
    drivers for the Raspberry Pi I2S subsystem.
    
    TAS5713: return error if initialisation fails
    
    Existing TAS5713 driver logs errors during initialisation, but does not return
    an error code. Therefore even if initialisation fails, the driver will still be
    loaded, but won't work. This patch fixes this. I2C communication error will now
    reported correctly by a non-zero return code.
    
    HiFiBerry Amp: fix device-tree problems
    
    Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.
    
    hifiberry-amp: Adjust for ALSA object refactoring
    
    See: raspberrypi/linux#1775


Gbp-Pq: Topic rpi
Gbp-Pq: Name rpi_1071_53077bb6c5f524bbffb6b8e7a61cdf1eb2049785.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants